зеркало из https://github.com/mozilla/gecko-dev.git
Bug 980530 - [e10s] remote-browser.xml shouldn't send IPC messages in constructor (r=felipe)
This commit is contained in:
Родитель
96f886f1cf
Коммит
e4ba24146f
|
@ -282,10 +282,6 @@ addEventListener("TextZoomChange", function (aEvent) {
|
|||
|
||||
RemoteAddonsChild.init(this);
|
||||
|
||||
addMessageListener("History:UseGlobalHistory", function (aMessage) {
|
||||
docShell.useGlobalHistory = aMessage.data.enabled;
|
||||
});
|
||||
|
||||
addMessageListener("NetworkPrioritizer:AdjustPriority", (msg) => {
|
||||
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||
let loadGroup = webNav.QueryInterface(Ci.nsIDocumentLoader)
|
||||
|
@ -352,6 +348,8 @@ let AutoCompletePopup = {
|
|||
}
|
||||
}
|
||||
|
||||
addMessageListener("FormAutoComplete:InitPopup", function (aMessage) {
|
||||
let [initData] = sendSyncMessage("Browser:Init");
|
||||
docShell.useGlobalHistory = initData.useGlobalHistory;
|
||||
if (initData.initPopup) {
|
||||
setTimeout(function() AutoCompletePopup.init(), 0);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -181,10 +181,16 @@
|
|||
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
/*
|
||||
* Don't try to send messages from this function. The message manager for
|
||||
* the <browser> element may not be initialized yet.
|
||||
*/
|
||||
|
||||
let jsm = "resource://gre/modules/RemoteWebNavigation.jsm";
|
||||
let RemoteWebNavigation = Cu.import(jsm, {}).RemoteWebNavigation;
|
||||
this._remoteWebNavigation = new RemoteWebNavigation(this);
|
||||
|
||||
this.messageManager.addMessageListener("Browser:Init", this);
|
||||
this.messageManager.addMessageListener("DOMTitleChanged", this);
|
||||
this.messageManager.addMessageListener("ImageDocumentLoaded", this);
|
||||
this.messageManager.addMessageListener("SetSyncHandler", this);
|
||||
|
@ -207,14 +213,6 @@
|
|||
jsm = "resource://gre/modules/RemoteAddonsParent.jsm";
|
||||
let RemoteAddonsParent = Components.utils.import(jsm, {}).RemoteAddonsParent;
|
||||
RemoteAddonsParent.init();
|
||||
|
||||
if (!this.hasAttribute("disableglobalhistory")) {
|
||||
this.messageManager.sendAsyncMessage("History:UseGlobalHistory", {enabled:true});
|
||||
}
|
||||
|
||||
if (this.autoCompletePopup) {
|
||||
this.messageManager.sendAsyncMessage("FormAutoComplete:InitPopup");
|
||||
}
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
|
@ -223,6 +221,12 @@
|
|||
<body><![CDATA[
|
||||
let data = aMessage.data;
|
||||
switch (aMessage.name) {
|
||||
case "Browser:Init":
|
||||
let result = {};
|
||||
result.useGlobalHistory = !this.hasAttribute("disableglobalhistory");
|
||||
result.initPopup = this.autoCompletePopup;
|
||||
return result;
|
||||
break;
|
||||
case "DOMTitleChanged":
|
||||
this._contentTitle = data.title;
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче