зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d72fcfb5eb
Коммит
b4f70c2bee
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче