efs") .removeObserverForName(name, observer); }, getCachedByDomainAndName: NYI, getCachedBySubdomainAndName: NYI, getCachedGlobal: NYI, extractDomain: NYI, }; function forwardMethodToParent(method, signature, ...args) { // Ignore superfluous arguments args = args.slice(0, signature.length); // Process context argument for forwarding let contextIndex = signature.indexOf("context"); if (contextIndex > -1) { args[contextIndex] = contextArg(args[contextIndex]); } // Take out the callback argument, if present. let callbackIndex = signature.indexOf("callback"); let callback = null; if (callbackIndex > -1 && args.length > callbackIndex) { callback = args.splice(callbackIndex, 1)[0]; } let actor = ChromeUtils.domProcessChild.getActor("ContentPrefs"); actor.callFunction(method, args, callback); } for (let [method, signature] of _methodsCallableFromChild) { ContentPrefServiceChild[method] = forwardMethodToParent.bind( ContentPrefServiceChild, method, signature ); } PK