Bug 507583 - WindowIsClosing() cleanup. r=gavin

This commit is contained in:
Dão Gottwald 2009-08-01 18:17:30 +02:00
parent a4fec52cd4
commit 9f22b02d78

View File

@ -5652,15 +5652,13 @@ var OfflineApps = {
function WindowIsClosing()
{
var cn = gBrowser.tabContainer.childNodes;
var numtabs = cn.length;
var reallyClose = closeWindow(false, warnAboutClosingWindow);
if (!reallyClose)
return false;
for (var i = 0; reallyClose && i < numtabs; ++i) {
var ds = gBrowser.getBrowserForTab(cn[i]).docShell;
var numBrowsers = gBrowser.browsers.length;
for (let i = 0; reallyClose && i < numBrowsers; ++i) {
let ds = gBrowser.browsers[i].docShell;
if (ds.contentViewer && !ds.contentViewer.permitUnload())
reallyClose = false;