Rollup of bug 819000: Preload about:blank. r=cjones,jlebar a=cjones

Includes the following patches

Bug 819000: Bail out of PresShell::Paint if not active. r=roc
Bug 819000: Make sure preloaded docshells are reset to active. r=jlebar
Bug 819000: Preload about:blank. r=cjones a=cjones
This commit is contained in:
Vivien Nicolas ext:(%20and%20Chris%20Jones%20%3Cjones.chris.g%40gmail.com%3E) 2013-01-24 10:39:18 -08:00
Родитель d72fcfb5eb
Коммит b4f70c2bee
5 изменённых файлов: 26 добавлений и 3 удалений

Просмотреть файл

@ -577,7 +577,7 @@ pref("hal.processPriorityManager.gonk.backgroundNice", 10);
// (hiding latency).
pref("dom.ipc.processPrelaunch.enabled", true);
// Wait this long before pre-launching a new subprocess.
pref("dom.ipc.processPrelaunch.delayMs", 1000);
pref("dom.ipc.processPrelaunch.delayMs", 5000);
#endif
// Ignore the "dialog=1" feature in window.open.

Просмотреть файл

@ -70,6 +70,11 @@ BrowserElementChild.prototype = {
_init: function() {
debug("Starting up.");
// NB: this must happen before we process any messages from
// mozbrowser API clients.
docShell.isActive = true;
sendAsyncMsg("hello");
// Set the docshell's name according to our <iframe>'s name attribute.

Просмотреть файл

@ -1151,8 +1151,15 @@ ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID)
{
mAppInfo.version.Assign(version);
mAppInfo.buildID.Assign(buildID);
PreloadSlowThings();
// If we're part of the mozbrowser machinery, go ahead and start
// preloading things. We can only do this for mozbrowser because
// PreloadSlowThings() may set the docshell of the first TabChild
// inactive, and we can only safely restore it to active from
// BrowserElementChild.js.
if ((mIsForApp || mIsForBrowser) &&
Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false)) {
PreloadSlowThings();
}
return true;
}

Просмотреть файл

@ -69,4 +69,11 @@
Cc["@mozilla.org/thread-manager;1"].getService(Ci["nsIThreadManager"]);
Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci["nsIAppStartup"]);
Cc["@mozilla.org/uriloader;1"].getService(Ci["nsIURILoader"]);
docShell.isActive = false;
docShell.QueryInterface(Ci.nsIWebNavigation)
.loadURI("about:blank",
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
null, null, null);
})();

Просмотреть файл

@ -5246,6 +5246,10 @@ PresShell::Paint(nsIView* aViewToPaint,
NS_ASSERTION(!mIsDestroying, "painting a destroyed PresShell");
NS_ASSERTION(aViewToPaint, "null view");
if (!mIsActive) {
return;
}
nsAutoNotifyDidPaint notifyDidPaint(aWillSendDidPaint);
nsPresContext* presContext = GetPresContext();