mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 14:54:17 +01:00
Workaround QueryInterface not properly mutating services.contentPrefs.
This commit is contained in:
@@ -70,7 +70,6 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
|
|
||||||
util.addObserver(this);
|
util.addObserver(this);
|
||||||
|
|
||||||
services.add("contentPrefs", "@mozilla.org/content-pref/service;1", Ci.nsIContentPrefService);
|
|
||||||
services.add("cookies", "@mozilla.org/cookiemanager;1", [Ci.nsICookieManager, Ci.nsICookieManager2,
|
services.add("cookies", "@mozilla.org/cookiemanager;1", [Ci.nsICookieManager, Ci.nsICookieManager2,
|
||||||
Ci.nsICookieService]);
|
Ci.nsICookieService]);
|
||||||
services.add("loginManager", "@mozilla.org/login-manager;1", Ci.nsILoginManager);
|
services.add("loginManager", "@mozilla.org/login-manager;1", Ci.nsILoginManager);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ var Services = Module("Services", {
|
|||||||
if (!service.interfaces.length)
|
if (!service.interfaces.length)
|
||||||
return res.wrappedJSObject || res;
|
return res.wrappedJSObject || res;
|
||||||
|
|
||||||
service.interfaces.forEach(function (iface) res.QueryInterface(Ci[iface]));
|
service.interfaces.forEach(function (iface) res instanceof Ci[iface]);
|
||||||
if (service.init && args.length) {
|
if (service.init && args.length) {
|
||||||
if (service.callable)
|
if (service.callable)
|
||||||
res[service.init].apply(res, args);
|
res[service.init].apply(res, args);
|
||||||
|
|||||||
Reference in New Issue
Block a user