From 342d3829cedc4983dec8990168424f3ba9164fab Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Sat, 28 Apr 2012 04:18:00 +0200 Subject: [PATCH 1/3] Bug 741070. (Bv1b-FF) browser_394759_basic.js: Use 'Services.prefs', Set 'general.warnOnAboutConfig' preference, Remove a 'whenWindowLoaded()' call, Add an 'info()' call, Nits. f=neil r=zpao. --- .../sessionstore/test/browser_394759_basic.js | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/browser/components/sessionstore/test/browser_394759_basic.js b/browser/components/sessionstore/test/browser_394759_basic.js index a7202527bc90..7540698585ff 100644 --- a/browser/components/sessionstore/test/browser_394759_basic.js +++ b/browser/components/sessionstore/test/browser_394759_basic.js @@ -73,12 +73,15 @@ function test() { let uniqueValue = "unik" + Date.now(); let uniqueText = "pi != " + Math.random(); + // Be consistent: let the page actually display, as we are "interacting" with it. + Services.prefs.setBoolPref("general.warnOnAboutConfig", false); + // make sure that the next closed window will increase getClosedWindowCount - let max_windows_undo = gPrefService.getIntPref("browser.sessionstore.max_windows_undo"); - gPrefService.setIntPref("browser.sessionstore.max_windows_undo", max_windows_undo + 1); + let max_windows_undo = Services.prefs.getIntPref("browser.sessionstore.max_windows_undo"); + Services.prefs.setIntPref("browser.sessionstore.max_windows_undo", max_windows_undo + 1); let closedWindowCount = ss.getClosedWindowCount(); - provideWindow(function (newWin) { + provideWindow(function onTestURLLoaded(newWin) { newWin.gBrowser.addTab().linkedBrowser.stop(); // mark the window with some unique data to be restored later on @@ -105,28 +108,31 @@ function test() { // SSTabRestored will fire more than once, so we need to make sure we count them let restoredTabs = 0; let expectedTabs = data.tabs.length; - whenWindowLoaded(newWin2, function () { - newWin2.gBrowser.tabContainer.addEventListener("SSTabRestored", function(aEvent) { - if (++restoredTabs < expectedTabs) - return; - newWin2.gBrowser.tabContainer.removeEventListener("SSTabRestored", arguments.callee, true); + newWin2.addEventListener("SSTabRestored", function sstabrestoredListener(aEvent) { + ++restoredTabs; + info("Restored tab " + restoredTabs + "/" + expectedTabs); + if (restoredTabs < expectedTabs) { + return; + } - is(newWin2.gBrowser.tabs.length, 2, - "The window correctly restored 2 tabs"); - is(newWin2.gBrowser.currentURI.spec, testURL, - "The window correctly restored the URL"); + newWin2.removeEventListener("SSTabRestored", sstabrestoredListener, true); - let textbox = newWin2.content.document.getElementById("textbox"); - is(textbox.value, uniqueText, - "The window correctly restored the form"); - is(ss.getWindowValue(newWin2, uniqueKey), uniqueValue, - "The window correctly restored the data associated with it"); + is(newWin2.gBrowser.tabs.length, 2, + "The window correctly restored 2 tabs"); + is(newWin2.gBrowser.currentURI.spec, testURL, + "The window correctly restored the URL"); - // clean up - newWin2.close(); - gPrefService.clearUserPref("browser.sessionstore.max_windows_undo"); - finish(); - }, true); - }); + let textbox = newWin2.content.document.getElementById("textbox"); + is(textbox.value, uniqueText, + "The window correctly restored the form"); + is(ss.getWindowValue(newWin2, uniqueKey), uniqueValue, + "The window correctly restored the data associated with it"); + + // clean up + newWin2.close(); + Services.prefs.clearUserPref("browser.sessionstore.max_windows_undo"); + Services.prefs.clearUserPref("general.warnOnAboutConfig"); + finish(); + }, true); }, testURL); } From 48499e1f52cf2c954133224bd8796de8b08321fa Mon Sep 17 00:00:00 2001 From: ffxbld Date: Sat, 28 Apr 2012 03:15:22 -0700 Subject: [PATCH 2/3] Automated blocklist update from host moz2-linux-slave44 --- browser/app/blocklist.xml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/browser/app/blocklist.xml b/browser/app/blocklist.xml index 7c58bb6a418c..861a62e94089 100644 --- a/browser/app/blocklist.xml +++ b/browser/app/blocklist.xml @@ -1,10 +1,14 @@ - + + + + + @@ -81,6 +85,10 @@ + + + + @@ -99,6 +107,10 @@ + + + + @@ -161,6 +173,10 @@ + + + + @@ -196,6 +212,9 @@ + + + From 246874ec4697b90ea1da04c00c8e68fe9590a24c Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Wed, 25 Apr 2012 16:43:18 +0300 Subject: [PATCH 3/3] Bug 747675, try to decrease max forgetSkippable times, r=mccr8 --- content/base/src/nsCCUncollectableMarker.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/content/base/src/nsCCUncollectableMarker.cpp b/content/base/src/nsCCUncollectableMarker.cpp index 2b8d26e74a0d..7b98ee210df0 100644 --- a/content/base/src/nsCCUncollectableMarker.cpp +++ b/content/base/src/nsCCUncollectableMarker.cpp @@ -362,12 +362,6 @@ nsCCUncollectableMarker::Observe(nsISupports* aSubject, const char* aTopic, } } - if (cleanupJS) { - nsContentUtils::UnmarkGrayJSListenersInCCGenerationDocuments(sGeneration); - MarkMessageManagers(); - xpc_UnmarkSkippableJSHolders(); - } - #ifdef MOZ_XUL nsXULPrototypeCache* xulCache = nsXULPrototypeCache::GetInstance(); if (xulCache) { @@ -375,6 +369,18 @@ nsCCUncollectableMarker::Observe(nsISupports* aSubject, const char* aTopic, } #endif + static bool previousWasJSCleanup = false; + if (cleanupJS) { + nsContentUtils::UnmarkGrayJSListenersInCCGenerationDocuments(sGeneration); + MarkMessageManagers(); + previousWasJSCleanup = true; + } else if (previousWasJSCleanup) { + previousWasJSCleanup = false; + if (!prepareForCC) { + xpc_UnmarkSkippableJSHolders(); + } + } + return NS_OK; }