mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016031 - Fix ProfD race in b2g child processes. r=fabrice
This commit is contained in:
parent
d0c33feb10
commit
1e8598317b
@ -358,9 +358,6 @@ var shell = {
|
||||
ppmm.addMessageListener("sms-handler", this);
|
||||
ppmm.addMessageListener("mail-handler", this);
|
||||
ppmm.addMessageListener("file-picker", this);
|
||||
ppmm.addMessageListener("getProfD", function(message) {
|
||||
return Services.dirsvc.get("ProfD", Ci.nsIFile).path;
|
||||
});
|
||||
},
|
||||
|
||||
stop: function shell_stop() {
|
||||
|
@ -43,6 +43,16 @@ ProcessGlobal.prototype = {
|
||||
switch (topic) {
|
||||
case 'app-startup': {
|
||||
Services.obs.addObserver(this, 'console-api-log-event', false);
|
||||
let inParent = Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Ci.nsIXULRuntime)
|
||||
.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
|
||||
if (inParent) {
|
||||
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
|
||||
.getService(Ci.nsIMessageListenerManager);
|
||||
ppmm.addMessageListener("getProfD", function(message) {
|
||||
return Services.dirsvc.get("ProfD", Ci.nsIFile).path;
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'console-api-log-event': {
|
||||
|
Loading…
Reference in New Issue
Block a user