Bug 802108 - [MozActivity] fails for OOP applications [r=gwagner]

This commit is contained in:
Fabrice Desré 2012-10-17 13:44:39 -07:00
parent 7c419ef0f7
commit a94211d6a8

View File

@ -11,7 +11,6 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/ObjectWrapper.jsm");
Cu.import("resource://gre/modules/Webapps.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
@ -30,6 +29,11 @@ function debug(aMsg) {
function ActivityProxy() {
debug("ActivityProxy");
this.activity = null;
let inParent = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime)
.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
debug("inParent: " + inParent);
Cu.import(inParent ? "resource://gre/modules/Webapps.jsm"
: "resource://gre/modules/AppsServiceChild.jsm");
}
ActivityProxy.prototype = {