mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1173451 - RemoteAddonsChild init should be optional. r=mconley
This commit is contained in:
parent
33c7024ee2
commit
5a9279d81b
@ -83,6 +83,10 @@ let NotificationTracker = {
|
||||
},
|
||||
|
||||
findPaths: function(prefix) {
|
||||
if (!this._paths) {
|
||||
return [];
|
||||
}
|
||||
|
||||
let tracked = this._paths;
|
||||
for (let component of prefix) {
|
||||
tracked = setDefault(tracked, component, {});
|
||||
@ -524,7 +528,12 @@ let RemoteAddonsChild = {
|
||||
},
|
||||
|
||||
init: function(global) {
|
||||
|
||||
if (!this._ready) {
|
||||
if (!Services.cpmm.initialProcessData.remoteAddonsParentInitted){
|
||||
return null;
|
||||
}
|
||||
|
||||
this.makeReady();
|
||||
this._ready = true;
|
||||
}
|
||||
|
@ -960,6 +960,8 @@ let RemoteAddonsParent = {
|
||||
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
|
||||
mm.addMessageListener("Addons:RegisterGlobal", this);
|
||||
|
||||
Services.ppmm.initialProcessData.remoteAddonsParentInitted = true;
|
||||
|
||||
this.globalToBrowser = new WeakMap();
|
||||
this.browserToGlobal = new WeakMap();
|
||||
},
|
||||
|
@ -490,9 +490,11 @@ addMessageListener("Browser:Thumbnail:CheckState", function (aMessage) {
|
||||
// The AddonsChild needs to be rooted so that it stays alive as long as
|
||||
// the tab.
|
||||
let AddonsChild = RemoteAddonsChild.init(this);
|
||||
addEventListener("unload", () => {
|
||||
RemoteAddonsChild.uninit(AddonsChild);
|
||||
});
|
||||
if (AddonsChild) {
|
||||
addEventListener("unload", () => {
|
||||
RemoteAddonsChild.uninit(AddonsChild);
|
||||
});
|
||||
}
|
||||
|
||||
addMessageListener("NetworkPrioritizer:AdjustPriority", (msg) => {
|
||||
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||
|
Loading…
Reference in New Issue
Block a user