Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.

--HG--
extra : rebase_source : 05d1b150ffa84931ace6dbd66385d1d014a03afe
This commit is contained in:
Peter Van der Beken 2017-11-23 16:27:27 +01:00
Родитель 40a044892a
Коммит ab910ec03f
71 изменённых файлов: 194 добавлений и 342 удалений

Просмотреть файл

@ -168,8 +168,7 @@ function waitForSuggestions(cb) {
}
function waitForContentSearchEvent(messageType, cb) {
let mm = content.SpecialPowers.Cc["@mozilla.org/globalmessagemanager;1"].
getService(content.SpecialPowers.Ci.nsIMessageListenerManager);
let mm = content.SpecialPowers.Cc["@mozilla.org/globalmessagemanager;1"].getService();
mm.addMessageListener("ContentSearch", function listener(aMsg) {
if (aMsg.data.type != messageType) {
return;

Просмотреть файл

@ -42,10 +42,7 @@ var gTests = [
// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = ppmm.childCount;
let childCount = Services.ppmm.childCount;
let maxContentProcess = Services.prefs.getIntPref("dom.ipc.processCount");
// The first check is because if we are on a branch where e10s-multi is
// disabled, we want to keep testing e10s with a single content process.
@ -146,10 +143,7 @@ var gTests = [
// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = ppmm.childCount;
let childCount = Services.ppmm.childCount;
let maxContentProcess = Services.prefs.getIntPref("dom.ipc.processCount");
// The first check is because if we are on a branch where e10s-multi is
// disabled, we want to keep testing e10s with a single content process.
@ -255,10 +249,7 @@ var gTests = [
// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = ppmm.childCount;
let childCount = Services.ppmm.childCount;
let maxContentProcess = Services.prefs.getIntPref("dom.ipc.processCount");
// The first check is because if we are on a branch where e10s-multi is
// disabled, we want to keep testing e10s with a single content process.

Просмотреть файл

@ -19,12 +19,6 @@ add_task(async function testExecuteScript() {
Services.ppmm.getChildAt(0),
];
for (let mm of messageManagerMap.keys()) {
// Sanity check: mm is a message manager.
try {
mm.QueryInterface(Ci.nsIMessageSender);
} catch (e) {
mm.QueryInterface(Ci.nsIMessageBroadcaster);
}
if (!globalMMs.includes(mm)) {
++count;
}

Просмотреть файл

@ -3194,14 +3194,13 @@ this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
// Listen for UITour messages.
// Do it here instead of the UITour module itself so that the UITour module is lazy loaded
// when the first message is received.
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
globalMM.addMessageListener("UITour:onPageEvent", function(aMessage) {
Services.mm.addMessageListener("UITour:onPageEvent", function(aMessage) {
UITour.onPageEvent(aMessage, aMessage.data);
});
// Listen for HybridContentTelemetry messages.
// Do it here instead of HybridContentTelemetry.init() so that
// the module can be lazily loaded on the first message.
globalMM.addMessageListener("HybridContentTelemetry:onTelemetryMessage", aMessage => {
Services.mm.addMessageListener("HybridContentTelemetry:onTelemetryMessage", aMessage => {
HybridContentTelemetry.onTelemetryMessage(aMessage, aMessage.data);
});

Просмотреть файл

@ -15,16 +15,13 @@ const FRAME_SCRIPTS = [
ROOT + "content-forms.js"
];
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
for (let script of FRAME_SCRIPTS) {
globalMM.loadFrameScript(script, true);
Services.mm.loadFrameScript(script, true);
}
registerCleanupFunction(() => {
for (let script of FRAME_SCRIPTS) {
globalMM.removeDelayedFrameScript(script, true);
Services.mm.removeDelayedFrameScript(script, true);
}
});

Просмотреть файл

@ -68,8 +68,7 @@ var PdfjsChromeUtils = {
this._browsers = new WeakSet();
if (!this._ppmm) {
// global parent process message manager (PPMM)
this._ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"].
getService(Ci.nsIMessageBroadcaster);
this._ppmm = Services.ppmm;
this._ppmm.addMessageListener("PDFJS:Parent:clearUserPref", this);
this._ppmm.addMessageListener("PDFJS:Parent:setIntPref", this);
this._ppmm.addMessageListener("PDFJS:Parent:setBoolPref", this);
@ -78,8 +77,7 @@ var PdfjsChromeUtils = {
this._ppmm.addMessageListener("PDFJS:Parent:isDefaultHandlerApp", this);
// global dom message manager (MMg)
this._mmg = Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageListenerManager);
this._mmg = Services.mm;
this._mmg.addMessageListener("PDFJS:Parent:displayWarning", this);
this._mmg.addMessageListener("PDFJS:Parent:addEventListener", this);

Просмотреть файл

@ -35,8 +35,7 @@ var PdfjsContentUtils = {
// child *process* mm, or when loaded into the parent for in-content
// support the psuedo child process mm 'child PPMM'.
if (!this._mm) {
this._mm = Cc["@mozilla.org/childprocessmessagemanager;1"].
getService(Ci.nsISyncMessageSender);
this._mm = Services.cpmm;
this._mm.addMessageListener("PDFJS:Child:updateSettings", this);
Services.obs.addObserver(this, "quit-application");

4
browser/extensions/pocket/bootstrap.js поставляемый
Просмотреть файл

@ -408,9 +408,7 @@ var PocketOverlay = {
}
},
shutdown(reason) {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.broadcastAsyncMessage("PocketShuttingDown");
Services.ppmm.broadcastAsyncMessage("PocketShuttingDown");
Services.obs.removeObserver(this, "browser-delayed-startup-finished");
// Although the ppmm loads the scripts into the chrome process as well,
// we need to manually unregister here anyway to ensure these aren't part

Просмотреть файл

@ -178,8 +178,7 @@ var AboutHome = {
if (target && target.messageManager) {
target.messageManager.sendAsyncMessage("AboutHome:Update", data);
} else {
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("AboutHome:Update", data);
Services.mm.broadcastAsyncMessage("AboutHome:Update", data);
}
}).catch(function onError(x) {
Cu.reportError("Error in AboutHome.sendAboutHomeData: " + x);

Просмотреть файл

@ -995,12 +995,10 @@ this.PluginCrashReporter = {
// Only the parent process gets the gmp-plugin-crash observer
// notification, so we need to inform any content processes that
// the GMP has crashed.
if (Cc["@mozilla.org/parentprocessmessagemanager;1"]) {
if (Services.ppmm) {
let pluginName = propertyBag.getPropertyAsAString("pluginName");
let mm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("gmp-plugin-crash",
{ pluginName, pluginID });
Services.ppmm.broadcastAsyncMessage("gmp-plugin-crash",
{ pluginName, pluginID });
}
break;
}

Просмотреть файл

@ -489,9 +489,7 @@ this.ContentSearch = {
},
_broadcast(type, data) {
Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageListenerManager).
broadcastAsyncMessage(...this._msgArgs(type, data));
Services.mm.broadcastAsyncMessage(...this._msgArgs(type, data));
},
_msgArgs(type, data) {

Просмотреть файл

@ -6,7 +6,7 @@
"use strict";
const {Cc, Ci, Cu, CC} = require("chrome");
const {Ci, Cu, CC} = require("chrome");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const Services = require("Services");
@ -17,9 +17,6 @@ loader.lazyGetter(this, "debug", function () {
return !!(AppConstants.DEBUG || AppConstants.DEBUG_JS_MODULES);
});
const childProcessMessageManager =
Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
const BinaryInput = CC("@mozilla.org/binaryinputstream;1",
"nsIBinaryInputStream", "setInputStream");
const BufferStream = CC("@mozilla.org/io/arraybuffer-input-stream;1",
@ -304,7 +301,7 @@ function onContentMessage(e) {
let value = e.detail.value;
switch (e.detail.type) {
case "save":
childProcessMessageManager.sendAsyncMessage(
Services.cpmm.sendAsyncMessage(
"devtools:jsonview:save", value);
}
}

Просмотреть файл

@ -20,12 +20,10 @@ function waitForDeviceClosed() {
return new Promise((resolve, reject) => {
const message = "webrtc:UpdateGlobalIndicators";
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.addMessageListener(message, function listener(aMessage) {
Services.ppmm.addMessageListener(message, function listener(aMessage) {
info("Received " + message + " message");
if (!aMessage.data.showGlobalIndicator) {
ppmm.removeMessageListener(message, listener);
Services.ppmm.removeMessageListener(message, listener);
resolve();
}
});

Просмотреть файл

@ -4,11 +4,10 @@
"use strict";
var { Cc, Ci } = require("chrome");
var { Cc } = require("chrome");
loader.lazyGetter(this, "ppmm", () => {
return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(
Ci.nsIMessageBroadcaster);
return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
});
function ProcessActorList() {

Просмотреть файл

@ -6,15 +6,11 @@
"use strict";
const { Cc, Ci, Cu } = require("chrome");
const { Cu } = require("chrome");
const Services = require("Services");
const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
const { DebuggerServer } = require("devtools/server/main");
loader.lazyGetter(this, "ppmm", () => {
return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(
Ci.nsIMessageBroadcaster);
});
loader.lazyRequireGetter(this, "WindowActor",
"devtools/server/actors/window", true);
@ -547,7 +543,7 @@ RootActor.prototype = {
}
let { id } = request;
let mm = ppmm.getChildAt(id);
let mm = Services.ppmm.getChildAt(id);
if (!mm) {
return { error: "noProcess",
message: "There is no process with id '" + id + "'." };

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const {Cc, Ci, Cu, CC} = require("chrome");
const {Ci, Cu, CC} = require("chrome");
const protocol = require("devtools/shared/protocol");
const {LongStringActor} = require("devtools/server/actors/string");
const {DebuggerServer} = require("devtools/server/main");
@ -1938,20 +1938,14 @@ StorageActors.createActor({
var indexedDBHelpers = {
backToChild(...args) {
let mm = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
Services.mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
method: "backToChild",
args: args
});
},
onItemUpdated(action, host, path) {
let mm = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
Services.mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
method: "onItemUpdated",
args: [ action, host, path ]
});

Просмотреть файл

@ -7,9 +7,6 @@
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {});
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsIMessageSender");
ChromeUtils.defineModuleGetter(this, "E10SUtils",
"resource://gre/modules/E10SUtils.jsm");
@ -37,7 +34,7 @@ const MSG_MGR_CONSOLE_INFO_MAX = 1024;
function ContentProcessForward() {
Services.obs.addObserver(this, "console-api-log-event");
Services.obs.addObserver(this, "xpcom-shutdown");
cpmm.addMessageListener("DevTools:StopForwardingContentProcessMessage", this);
Services.cpmm.addMessageListener("DevTools:StopForwardingContentProcessMessage", this);
}
ContentProcessForward.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
@ -108,7 +105,7 @@ ContentProcessForward.prototype = {
}
}
cpmm.sendAsyncMessage("Console:Log", msgData);
Services.cpmm.sendAsyncMessage("Console:Log", msgData);
break;
}
@ -121,7 +118,8 @@ ContentProcessForward.prototype = {
uninit() {
Services.obs.removeObserver(this, "console-api-log-event");
Services.obs.removeObserver(this, "xpcom-shutdown");
cpmm.removeMessageListener("DevTools:StopForwardingContentProcessMessage", this);
Services.cpmm.removeMessageListener("DevTools:StopForwardingContentProcessMessage",
this);
}
};

Просмотреть файл

@ -49,7 +49,6 @@ function setupServer(mm) {
function init(msg) {
let mm = msg.target;
mm.QueryInterface(Ci.nsISyncMessageSender);
let prefix = msg.data.prefix;
// Using the JS debugger causes problems when we're trying to

Просмотреть файл

@ -1,8 +1,7 @@
"use strict";
const {Cc, Ci} = require("chrome");
const cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
const {Cc} = require("chrome");
const cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService();
const { DebuggerServer } = require("devtools/server/main");
exports.setupChild = function (a, b, c) {

Просмотреть файл

@ -49,10 +49,8 @@ function runTests() {
let client = new DebuggerClient(transport);
// Wait for a response from setupInChild
const ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
let onChild = msg => {
ppmm.removeMessageListener("test:setupChild", onChild);
Services.ppmm.removeMessageListener("test:setupChild", onChild);
let args = msg.json;
is(args[0], 1, "Got first numeric argument");
@ -65,7 +63,7 @@ function runTests() {
setupChild: "callParent"
});
};
ppmm.addMessageListener("test:setupChild", onChild);
Services.ppmm.addMessageListener("test:setupChild", onChild);
// Wait also for a reponse from setupInParent called from setup-in-child.js
let onParent = (_, topic, args) => {

Просмотреть файл

@ -649,11 +649,10 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
*aSink = GetTabChild().take();
return *aSink ? NS_OK : NS_ERROR_FAILURE;
} else if (aIID.Equals(NS_GET_IID(nsIContentFrameMessageManager))) {
nsCOMPtr<nsITabChild> tabChild =
do_GetInterface(static_cast<nsIDocShell*>(this));
RefPtr<TabChild> tabChild = TabChild::GetFrom(this);
nsCOMPtr<nsIContentFrameMessageManager> mm;
if (tabChild) {
tabChild->GetMessageManager(getter_AddRefs(mm));
mm = tabChild->GetMessageManager();
} else {
if (nsPIDOMWindowOuter* win = GetWindow()) {
mm = do_QueryInterface(win->GetParentTarget());

Просмотреть файл

@ -21,10 +21,6 @@ this.EXPORTED_SYMBOLS = ["DOMRequestIpcHelper"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsIMessageListenerManager");
this.DOMRequestIpcHelper = function DOMRequestIpcHelper() {
// _listeners keeps a list of messages for which we added a listener and the
// kind of listener that we added (strong or weak). It's an object of this
@ -89,8 +85,8 @@ DOMRequestIpcHelper.prototype = {
}
}
aMsg.weakRef ? cpmm.addWeakMessageListener(name, this)
: cpmm.addMessageListener(name, this);
aMsg.weakRef ? Services.cpmm.addWeakMessageListener(name, this)
: Services.cpmm.addMessageListener(name, this);
this._listeners[name] = {
weakRef: !!aMsg.weakRef,
count: 1
@ -120,8 +116,8 @@ DOMRequestIpcHelper.prototype = {
// be waiting on a message.
if (!--this._listeners[aName].count) {
this._listeners[aName].weakRef ?
cpmm.removeWeakMessageListener(aName, this)
: cpmm.removeMessageListener(aName, this);
Services.cpmm.removeWeakMessageListener(aName, this)
: Services.cpmm.removeMessageListener(aName, this);
delete this._listeners[aName];
}
});
@ -181,8 +177,9 @@ DOMRequestIpcHelper.prototype = {
if (this._listeners) {
Object.keys(this._listeners).forEach((aName) => {
this._listeners[aName].weakRef ? cpmm.removeWeakMessageListener(aName, this)
: cpmm.removeMessageListener(aName, this);
this._listeners[aName].weakRef ?
Services.cpmm.removeWeakMessageListener(aName, this)
: Services.cpmm.removeMessageListener(aName, this);
});
}

Просмотреть файл

@ -17,7 +17,6 @@
#include "nsISHistory.h"
#include "nsISHEntry.h"
#include "nsISHContainer.h"
#include "nsITabChild.h"
#include "nsIWindowWatcher.h"
#include "mozilla/Services.h"
#include "nsIXULWindow.h"
@ -33,6 +32,7 @@
#include "mozilla/EventListenerManager.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ProcessGlobal.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/TimeoutManager.h"
#include "xpcpublic.h"
#include "nsObserverService.h"
@ -311,11 +311,9 @@ MarkWindowList(nsISimpleEnumerator* aWindowList, bool aCleanupJS,
MarkDocShell(rootDocShell, aCleanupJS, aPrepareForCC);
nsCOMPtr<nsITabChild> tabChild =
rootDocShell ? rootDocShell->GetTabChild() : nullptr;
RefPtr<TabChild> tabChild = TabChild::GetFrom(rootDocShell);
if (tabChild) {
nsCOMPtr<nsIContentFrameMessageManager> mm;
tabChild->GetMessageManager(getter_AddRefs(mm));
nsCOMPtr<nsIContentFrameMessageManager> mm = tabChild->GetMessageManager();
if (mm) {
// MarkForCC ends up calling UnmarkGray on message listeners, which
// TraceBlackJS can't do yet.
@ -533,7 +531,7 @@ mozilla::dom::TraceBlackJS(JSTracer* aTrc, bool aIsShutdownGC)
if (ds) {
nsCOMPtr<nsITabChild> tabChild = ds->GetTabChild();
if (tabChild) {
nsCOMPtr<nsIContentFrameMessageManager> mm;
nsCOMPtr<nsISupports> mm;
tabChild->GetMessageManager(getter_AddRefs(mm));
nsCOMPtr<EventTarget> et = do_QueryInterface(mm);
if (et) {

Просмотреть файл

@ -203,7 +203,7 @@ interface nsIMessageListener : nsISupports
void receiveMessage();
};
[scriptable, builtinclass, uuid(b949bfec-bb7d-47bc-b387-ac6a9b655072)]
[uuid(b949bfec-bb7d-47bc-b387-ac6a9b655072)]
interface nsIMessageListenerManager : nsISupports
{
/**
@ -261,7 +261,7 @@ interface nsIMessageListenerManager : nsISupports
* messages that are only delivered to its one parent-process message
* manager.
*/
[scriptable, builtinclass, uuid(bb5d79e4-e73c-45e7-9651-4d718f4b994c)]
[uuid(bb5d79e4-e73c-45e7-9651-4d718f4b994c)]
interface nsIMessageSender : nsIMessageListenerManager
{
/**
@ -309,7 +309,7 @@ interface nsIMessageSender : nsIMessageListenerManager
* manager will broadcast the message to all frame message managers
* within its window.
*/
[scriptable, builtinclass, uuid(4d7d62ad-4725-4f39-86cf-8fb22bf9c1d8)]
[uuid(4d7d62ad-4725-4f39-86cf-8fb22bf9c1d8)]
interface nsIMessageBroadcaster : nsIMessageListenerManager
{
/**
@ -342,7 +342,7 @@ interface nsIMessageBroadcaster : nsIMessageListenerManager
void releaseCachedProcesses();
};
[scriptable, builtinclass, uuid(0e602c9e-1977-422a-a8e4-fe0d4a4f78d0)]
[uuid(0e602c9e-1977-422a-a8e4-fe0d4a4f78d0)]
interface nsISyncMessageSender : nsIMessageSender
{
/**
@ -372,7 +372,7 @@ interface nsISyncMessageSender : nsIMessageSender
[optional] in nsIPrincipal principal);
};
[scriptable, builtinclass, uuid(13f3555f-769e-44ea-b607-5239230c3162)]
[uuid(13f3555f-769e-44ea-b607-5239230c3162)]
interface nsIMessageManagerGlobal : nsISyncMessageSender
{
/**
@ -393,7 +393,7 @@ interface nsIMessageManagerGlobal : nsISyncMessageSender
DOMString btoa(in DOMString aBase64Data);
};
[scriptable, builtinclass, uuid(694e367c-aa25-4446-8499-2c527c4bd838)]
[uuid(694e367c-aa25-4446-8499-2c527c4bd838)]
interface nsIContentFrameMessageManager : nsIMessageManagerGlobal
{
/**
@ -420,7 +420,7 @@ interface nsIInProcessContentFrameMessageManager : nsIContentFrameMessageManager
[notxpcom] void cacheFrameLoader(in nsIFrameLoader aFrameLoader);
};
[scriptable, builtinclass, uuid(6d12e467-2446-46db-9965-e4e93cb87ca5)]
[uuid(6d12e467-2446-46db-9965-e4e93cb87ca5)]
interface nsIContentProcessMessageManager : nsIMessageManagerGlobal
{
/**
@ -431,7 +431,7 @@ interface nsIContentProcessMessageManager : nsIMessageManagerGlobal
readonly attribute jsval initialProcessData;
};
[scriptable, builtinclass, uuid(bf61446b-ba24-4b1d-88c7-4f94724b9ce1)]
[uuid(bf61446b-ba24-4b1d-88c7-4f94724b9ce1)]
interface nsIFrameScriptLoader : nsISupports
{
/**
@ -458,7 +458,7 @@ interface nsIFrameScriptLoader : nsISupports
jsval getDelayedFrameScripts();
};
[scriptable, builtinclass, uuid(7e1e1a20-b24f-11e4-ab27-0800200c9a66)]
[uuid(7e1e1a20-b24f-11e4-ab27-0800200c9a66)]
interface nsIProcessScriptLoader : nsISupports
{
/**
@ -483,7 +483,7 @@ interface nsIProcessScriptLoader : nsISupports
jsval getDelayedProcessScripts();
};
[scriptable, builtinclass, uuid(5b390753-abb3-49b0-ae3b-b803dab58144)]
[uuid(5b390753-abb3-49b0-ae3b-b803dab58144)]
interface nsIGlobalProcessScriptLoader : nsIProcessScriptLoader
{
/**

Просмотреть файл

@ -1,10 +1,6 @@
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
const BASE_NUMBER_OF_PROCESSES = 3;
function checkBaseProcessCount(description) {
const {childCount} = ppmm;
const {childCount} = Services.ppmm;
// With preloaded activity-stream, process count is a bit undeterministic, so
// allow for some variation
const extraCount = BASE_NUMBER_OF_PROCESSES + 1;
@ -12,14 +8,12 @@ function checkBaseProcessCount(description) {
}
function processScript() {
let cpmm = Components.classes["@mozilla.org/childprocessmessagemanager;1"]
.getService(Components.interfaces.nsISyncMessageSender);
if (cpmm !== this) {
if (Services.cpmm !== this) {
dump("Test failed: wrong global object\n");
return;
}
this.cpmm = cpmm;
this.cpmm = Services.cpmm;
addMessageListener("ProcessTest:Reply", function listener(msg) {
removeMessageListener("ProcessTest:Reply", listener);
@ -70,7 +64,7 @@ add_task(async function(){
if (!gMultiProcessBrowser)
return;
ppmm.releaseCachedProcesses();
Services.ppmm.releaseCachedProcesses();
await SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 5]]})
await SpecialPowers.pushPrefEnv({"set": [["dom.ipc.keepProcessesAlive.web", 5]]})
@ -84,17 +78,17 @@ add_task(async function(){
await BrowserTestUtils.removeTab(tabs[i]);
}
ppmm.releaseCachedProcesses();
Services.ppmm.releaseCachedProcesses();
checkBaseProcessCount("Should get back to the base number of processes at this point");
})
// Test that loading a process script loads in all existing processes
add_task(async function() {
let checks = [];
for (let i = 0; i < ppmm.childCount; i++)
checks.push(checkProcess(ppmm.getChildAt(i)));
for (let i = 0; i < Services.ppmm.childCount; i++)
checks.push(checkProcess(Services.ppmm.getChildAt(i)));
ppmm.loadProcessScript(processScriptURL, false);
Services.ppmm.loadProcessScript(processScriptURL, false);
await Promise.all(checks);
});
@ -110,7 +104,7 @@ add_task(async function() {
gBrowser.selectedBrowser.loadURI("about:robots");
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
let init = ppmm.initialProcessData;
let init = Services.ppmm.initialProcessData;
init.test123 = "hello";
init.test456 = new Map();
init.test456.set("hi", "bye");
@ -119,16 +113,16 @@ add_task(async function() {
// However, stuff like remote thumbnails can cause a content
// process to exist nonetheless. This should be rare, though,
// so the test is useful most of the time.
if (ppmm.childCount == 2) {
let mainMM = ppmm.getChildAt(0);
if (Services.ppmm.childCount == 2) {
let mainMM = Services.ppmm.getChildAt(0);
let check = checkProcess(ppmm);
ppmm.loadProcessScript(processScriptURL, true);
let check = checkProcess(Services.ppmm);
Services.ppmm.loadProcessScript(processScriptURL, true);
// The main process should respond
await check;
check = checkProcess(ppmm);
check = checkProcess(Services.ppmm);
// Reset the default browser to start a new child process
gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser, true);
gBrowser.selectedBrowser.loadURI("about:blank");
@ -139,10 +133,10 @@ add_task(async function() {
// The new process should have responded
await check;
ppmm.removeDelayedProcessScript(processScriptURL);
Services.ppmm.removeDelayedProcessScript(processScriptURL);
let childMM;
childMM = ppmm.getChildAt(2);
childMM = Services.ppmm.getChildAt(2);
childMM.loadProcessScript(initTestScriptURL, false);
let msg = await promiseMessage(childMM, "ProcessTest:InitGood");

Просмотреть файл

@ -11,8 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1139964
<label value="Mozilla Bug 1139964"/>
<!-- test code goes here -->
<script type="application/javascript"><![CDATA[
var ppm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
var ppm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
function ok(cond, msg) {
opener.wrappedJSObject.ok(cond, msg);

Просмотреть файл

@ -14,12 +14,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=549682
var didRunAsync = false;
var didRunLocal = false;
var global = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Components.interfaces.nsIMessageBroadcaster);
var ppm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Components.interfaces.nsIMessageBroadcaster);
var cpm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Components.interfaces.nsISyncMessageSender);
var global = Cc["@mozilla.org/globalmessagemanager;1"].getService();
var ppm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
var cpm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService();
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -16,8 +16,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT_WINDOW = "data:,sendSyncMessage('test', 'window')";
var FRAME_SCRIPT_GROUP = "data:,sendSyncMessage('test', 'group')";
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -15,8 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT = "data:,sendAsyncMessage('test')";
var order = ["group", "window", "global"];
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -15,8 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT = "data:,addMessageListener('test', function (msg) {" +
"sendSyncMessage('test', msg.data)})";
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -17,8 +17,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT2 = "data:,addMessageListener('test', function () {" +
"sendSyncMessage('test', 'frame2')})";
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -17,8 +17,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT2 = "data:,addMessageListener('test', function () {" +
"sendSyncMessage('test', 'group2')})";
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -16,8 +16,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=990812
var FRAME_SCRIPT_WINDOW = "data:,sendSyncMessage('test', 'window')";
var FRAME_SCRIPT_GROUP = "data:,sendSyncMessage('test', 'group')";
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
function is(val, exp, msg) {
opener.wrappedJSObject.is(val, exp, msg);

Просмотреть файл

@ -21,8 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1098074
// with SimpleTest.finish as a continuation function.
SimpleTest.monitorConsole(SimpleTest.finish, [{errorMessage: new RegExp('acopia')}]);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
globalMM.addMessageListener("flimfniffle", function onMessage(msg) {
globalMM.removeMessageListener("flimfniffle", onMessage);
is(msg.data, "teufeltor", "correct message");

Просмотреть файл

@ -18,8 +18,7 @@
ChromeUtils.import("resource://gre/modules/DOMRequestHelper.jsm");
let obs = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"].
getService(Ci.nsIMessageBroadcaster);
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
function DummyHelperSubclass() {
this.onuninit = null;

Просмотреть файл

@ -5,7 +5,6 @@
#include "nsISupports.idl"
interface nsIDOMElement;
interface nsIMessageSender;
interface nsIURI;
[scriptable, builtinclass, uuid(456f58be-29dd-4973-885b-95aece1c9a8a)]
@ -36,7 +35,7 @@ interface nsIContentProcessInfo : nsISupports
* The process manager for this ContentParent (so a process message manager
* as opposed to a frame message manager.
*/
readonly attribute nsIMessageSender messageManager;
readonly attribute nsISupports messageManager;
};
[scriptable, uuid(83ffb063-5f65-4c45-ae07-3f553e0809bb)]

Просмотреть файл

@ -6,7 +6,6 @@
#include "domstubs.idl"
#include "nsIDroppedLinkHandler.idl"
interface nsIContentFrameMessageManager;
interface nsIWebBrowserChrome3;
native CommandsArray(nsTArray<nsCString>);
@ -15,7 +14,7 @@ native CommandsArray(nsTArray<nsCString>);
[scriptable, uuid(1fb79c27-e760-4088-b19c-1ce3673ec24e)]
interface nsITabChild : nsISupports
{
readonly attribute nsIContentFrameMessageManager messageManager;
readonly attribute nsISupports messageManager;
attribute nsIWebBrowserChrome3 webBrowserChrome;

Просмотреть файл

@ -526,7 +526,7 @@ ScriptableCPInfo::GetTabCount(int32_t* aTabCount)
}
NS_IMETHODIMP
ScriptableCPInfo::GetMessageManager(nsIMessageSender** aMessenger)
ScriptableCPInfo::GetMessageManager(nsISupports** aMessenger)
{
*aMessenger = nullptr;
if (!mContentParent) {

Просмотреть файл

@ -2965,14 +2965,11 @@ TabChild::IsVisible()
}
NS_IMETHODIMP
TabChild::GetMessageManager(nsIContentFrameMessageManager** aResult)
TabChild::GetMessageManager(nsISupports** aResult)
{
if (mTabChildGlobal) {
NS_ADDREF(*aResult = mTabChildGlobal);
return NS_OK;
}
*aResult = nullptr;
return NS_ERROR_FAILURE;
nsCOMPtr<nsIContentFrameMessageManager> mm(mTabChildGlobal);
mm.forget(aResult);
return *aResult ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP

Просмотреть файл

@ -279,6 +279,11 @@ public:
FORWARD_SHMEM_ALLOCATOR_TO(PBrowserChild)
nsIContentFrameMessageManager* GetMessageManager()
{
return mTabChildGlobal;
}
/**
* MessageManagerCallback methods that we override.
*/

Просмотреть файл

@ -5,8 +5,7 @@
dump("Loading remote script!\n");
dump(content + "\n");
var cpm = Components.classes["@mozilla.org/childprocessmessagemanager;1"]
.getService(Components.interfaces.nsISyncMessageSender);
var cpm = Components.classes["@mozilla.org/childprocessmessagemanager;1"].getService();
cpm.addMessageListener("cpm-async",
function(m) {
cpm.sendSyncMessage("ppm-sync");

Просмотреть файл

@ -85,11 +85,11 @@
// 1. Test that loading a script works, and that accessing process level mm and
// global mm works.
var ppm = Components.classes["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Components.interfaces.nsIMessageBroadcaster);
.getService();
var gm = Components.classes["@mozilla.org/globalmessagemanager;1"]
.getService(Components.interfaces.nsIMessageBroadcaster);
.getService();
var cpm = Components.classes["@mozilla.org/childprocessmessagemanager;1"]
.getService(Components.interfaces.nsISyncMessageSender);
.getService();
if (ppm.childCount != 2) {
alert("Should have two child processes!");

Просмотреть файл

@ -68,9 +68,8 @@ class GlobalPCList {
Services.obs.addObserver(this, "gmp-plugin-crash", true);
Services.obs.addObserver(this, "PeerConnection:response:allow", true);
Services.obs.addObserver(this, "PeerConnection:response:deny", true);
if (Cc["@mozilla.org/childprocessmessagemanager;1"]) {
let mm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
mm.addMessageListener("gmp-plugin-crash", this);
if (Services.cpmm) {
Services.cpmm.addMessageListener("gmp-plugin-crash", this);
}
}

Просмотреть файл

@ -15,10 +15,6 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
ChromeUtils.defineModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
"@mozilla.org/parentprocessmessagemanager;1",
"nsIMessageListenerManager");
XPCOMUtils.defineLazyServiceGetter(this, "notificationStorage",
"@mozilla.org/notificationStorage;1",
"nsINotificationStorage");
@ -56,13 +52,13 @@ var NotificationDB = {
registerListeners: function() {
for (let message of kMessages) {
ppmm.addMessageListener(message, this);
Services.ppmm.addMessageListener(message, this);
}
},
unregisterListeners: function() {
for (let message of kMessages) {
ppmm.removeMessageListener(message, this);
Services.ppmm.removeMessageListener(message, this);
}
},

Просмотреть файл

@ -15,10 +15,6 @@ const NOTIFICATIONSTORAGE_CONTRACTID = "@mozilla.org/notificationStorage;1";
ChromeUtils.defineModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsIMessageSender");
const kMessageNotificationGetAllOk = "Notification:GetAll:Return:OK";
const kMessageNotificationGetAllKo = "Notification:GetAll:Return:KO";
const kMessageNotificationSaveKo = "Notification:Save:Return:KO";
@ -50,13 +46,13 @@ NotificationStorage.prototype = {
registerListeners: function() {
for (let message of kMessages) {
cpmm.addMessageListener(message, this);
Services.cpmm.addMessageListener(message, this);
}
},
unregisterListeners: function() {
for (let message of kMessages) {
cpmm.removeMessageListener(message, this);
Services.cpmm.removeMessageListener(message, this);
}
},
@ -104,7 +100,7 @@ NotificationStorage.prototype = {
};
if (serviceWorkerRegistrationScope) {
cpmm.sendAsyncMessage("Notification:Save", {
Services.cpmm.sendAsyncMessage("Notification:Save", {
origin: origin,
notification: notification
});
@ -149,7 +145,7 @@ NotificationStorage.prototype = {
delete this._notifications[id];
}
cpmm.sendAsyncMessage("Notification:Delete", {
Services.cpmm.sendAsyncMessage("Notification:Delete", {
origin: origin,
id: id
});
@ -194,7 +190,7 @@ NotificationStorage.prototype = {
};
var requestID = this._requestCount++;
this._requests[requestID] = request;
cpmm.sendAsyncMessage("Notification:GetAll", {
Services.cpmm.sendAsyncMessage("Notification:GetAll", {
origin: origin,
requestID: requestID
});

Просмотреть файл

@ -3,10 +3,6 @@
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsIMessageSender");
function getNotificationObject(app, id, tag) {
return {
origin: "https://" + app + ".gaiamobile.org/",
@ -36,7 +32,7 @@ function addAndSend(msg, reply, callback, payload, runNext = true) {
let handler = {
receiveMessage: function(message) {
if (message.name === reply) {
cpmm.removeMessageListener(reply, handler);
Services.cpmm.removeMessageListener(reply, handler);
callback(message);
if (runNext) {
run_next_test();
@ -44,8 +40,8 @@ function addAndSend(msg, reply, callback, payload, runNext = true) {
}
}
};
cpmm.addMessageListener(reply, handler);
cpmm.sendAsyncMessage(msg, payload);
Services.cpmm.addMessageListener(reply, handler);
Services.cpmm.sendAsyncMessage(msg, payload);
}
// helper fonction, comparing two notifications

Просмотреть файл

@ -164,7 +164,7 @@ add_test(function test_send_two_get_one() {
let msgGetNotifHandler = {
receiveMessage: function(message) {
if (message.name === msgGetReply) {
cpmm.removeMessageListener(msgGetReply, msgGetNotifHandler);
Services.cpmm.removeMessageListener(msgGetReply, msgGetNotifHandler);
let notifications = message.data.notifications;
// same tag, so replaced
Assert.equal(1, notifications.length);
@ -175,7 +175,7 @@ add_test(function test_send_two_get_one() {
}
};
cpmm.addMessageListener(msgGetReply, msgGetNotifHandler);
Services.cpmm.addMessageListener(msgGetReply, msgGetNotifHandler);
let msgSaveReply = "Notification:Save:Return:OK";
let msgSaveCalls = 0;
@ -183,7 +183,7 @@ add_test(function test_send_two_get_one() {
msgSaveCalls++;
// Once both request have been sent, trigger getall
if (msgSaveCalls === 2) {
cpmm.sendAsyncMessage("Notification:GetAll", {
Services.cpmm.sendAsyncMessage("Notification:GetAll", {
origin: systemNotification1.origin,
requestID: message.data.requestID + 2 // 12, 13
});
@ -247,14 +247,14 @@ add_test(function test_send_two_get_two() {
// second and last call should be calendar notification
if (msgGetCalls === 2) {
cpmm.removeMessageListener(msgGetReply, msgGetHandler);
Services.cpmm.removeMessageListener(msgGetReply, msgGetHandler);
compareNotification(calendarNotification2, notifications[0]);
run_next_test();
}
}
}
};
cpmm.addMessageListener(msgGetReply, msgGetHandler);
Services.cpmm.addMessageListener(msgGetReply, msgGetHandler);
let msgSaveReply = "Notification:Save:Return:OK";
let msgSaveCalls = 0;
@ -263,15 +263,15 @@ add_test(function test_send_two_get_two() {
if (message.name === msgSaveReply) {
msgSaveCalls++;
if (msgSaveCalls === 2) {
cpmm.removeMessageListener(msgSaveReply, msgSaveHandler);
Services.cpmm.removeMessageListener(msgSaveReply, msgSaveHandler);
// Trigger getall for each origin
cpmm.sendAsyncMessage("Notification:GetAll", {
Services.cpmm.sendAsyncMessage("Notification:GetAll", {
origin: systemNotification1.origin,
requestID: message.data.requestID + 1 // 22
});
cpmm.sendAsyncMessage("Notification:GetAll", {
Services.cpmm.sendAsyncMessage("Notification:GetAll", {
origin: calendarNotification2.origin,
requestID: message.data.requestID + 2 // 23
});
@ -279,15 +279,15 @@ add_test(function test_send_two_get_two() {
}
}
};
cpmm.addMessageListener(msgSaveReply, msgSaveHandler);
Services.cpmm.addMessageListener(msgSaveReply, msgSaveHandler);
cpmm.sendAsyncMessage("Notification:Save", {
Services.cpmm.sendAsyncMessage("Notification:Save", {
origin: systemNotification1.origin,
notification: systemNotification1,
requestID: requestID // 20
});
cpmm.sendAsyncMessage("Notification:Save", {
Services.cpmm.sendAsyncMessage("Notification:Save", {
origin: calendarNotification2.origin,
notification: calendarNotification2,
requestID: (requestID + 1) // 21

Просмотреть файл

@ -117,7 +117,7 @@ function PushServiceParent() {
PushServiceParent.prototype = Object.create(PushServiceBase.prototype);
XPCOMUtils.defineLazyServiceGetter(PushServiceParent.prototype, "_mm",
"@mozilla.org/parentprocessmessagemanager;1", "nsIMessageBroadcaster");
"@mozilla.org/parentprocessmessagemanager;1", "nsISupports");
Object.assign(PushServiceParent.prototype, {
_xpcom_factory: XPCOMUtils.generateSingletonFactory(PushServiceParent),
@ -212,14 +212,13 @@ Object.assign(PushServiceParent.prototype, {
this.reportDeliveryError(data.messageId, data.reason);
return;
}
let sender = target.QueryInterface(Ci.nsIMessageSender);
return this._handleRequest(name, principal, data).then(result => {
sender.sendAsyncMessage(this._getResponseName(name, "OK"), {
target.sendAsyncMessage(this._getResponseName(name, "OK"), {
requestID: data.requestID,
result: result
});
}, error => {
sender.sendAsyncMessage(this._getResponseName(name, "KO"), {
target.sendAsyncMessage(this._getResponseName(name, "KO"), {
requestID: data.requestID,
result: error.result,
});
@ -320,7 +319,7 @@ PushServiceContent.prototype = Object.create(PushServiceBase.prototype);
XPCOMUtils.defineLazyServiceGetter(PushServiceContent.prototype,
"_mm", "@mozilla.org/childprocessmessagemanager;1",
"nsISyncMessageSender");
"nsISupports");
Object.assign(PushServiceContent.prototype, {
_xpcom_factory: XPCOMUtils.generateSingletonFactory(PushServiceContent),

Просмотреть файл

@ -16,8 +16,8 @@ ChromeUtils.import("resource://services-sync/main.js");
// BrowserTestUtils.jsm. Moreover, we can't resolve the URI it loads the content
// frame script from ("chrome://mochikit/content/tests/BrowserTestUtils/content-utils.js"),
// hence the hackiness here and in BrowserTabs.Add.
Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager)
Services
.mm
.loadFrameScript("data:application/javascript;charset=utf-8," + encodeURIComponent(`
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
addEventListener("load", function(event) {

Просмотреть файл

@ -104,8 +104,7 @@ const SUPPORTED_STRATEGIES = new Set([
]);
const logger = Log.repository.getLogger("Marionette");
const globalMessageManager = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
const globalMessageManager = Services.mm;
/**
* The Marionette WebDriver services provides a standard conforming

Просмотреть файл

@ -76,8 +76,7 @@ const SUPPORTED_STRATEGIES = new Set([
]);
const logger = Log.repository.getLogger("Marionette");
const globalMessageManager = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
const globalMessageManager = Services.mm;
/**
* The Marionette WebDriver services provides a standard conforming

Просмотреть файл

@ -19,9 +19,6 @@ this.EXPORTED_SYMBOLS = ["proxy"];
XPCOMUtils.defineLazyServiceGetter(
this, "uuidgen", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator");
XPCOMUtils.defineLazyServiceGetter(
this, "globalMessageManager", "@mozilla.org/globalmessagemanager;1",
"nsIMessageBroadcaster");
const log = Log.repository.getLogger("Marionette");
@ -289,7 +286,7 @@ proxy.AsyncMessageChannel = class {
callback(msg);
};
globalMessageManager.addMessageListener(path, autoRemover);
Services.mm.addMessageListener(path, autoRemover);
this.listeners_.set(path, autoRemover);
}
@ -299,7 +296,7 @@ proxy.AsyncMessageChannel = class {
}
let l = this.listeners_.get(path);
globalMessageManager.removeMessageListener(path, l);
Services.mm.removeMessageListener(path, l);
return this.listeners_.delete(path);
}

Просмотреть файл

@ -21,8 +21,8 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://testing-common/TestUtils.jsm");
ChromeUtils.import("resource://testing-common/ContentTask.jsm");
Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager)
Services
.mm
.loadFrameScript(
"chrome://mochikit/content/tests/BrowserTestUtils/content-utils.js", true);

Просмотреть файл

@ -20,9 +20,7 @@ var ContentCollector = {
return;
}
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
cpmm.addMessageListener("browser-test:collect-request", this);
Services.cpmm.addMessageListener("browser-test:collect-request", this);
},
receiveMessage: function(aMessage) {
@ -59,9 +57,7 @@ var ContentCollector = {
let pid = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).processID;
dump("Completed ShutdownLeaks collections in process " + pid + "\n");
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
cpmm.removeMessageListener("browser-test:collect-request", this);
Services.cpmm.removeMessageListener("browser-test:collect-request", this);
},
};

Просмотреть файл

@ -110,16 +110,13 @@ function testInit() {
prefs.setIntPref("dom.ipc.keepProcessesAlive.web", processCount);
}
let globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
globalMM.loadFrameScript("chrome://mochikit/content/shutdown-leaks-collector.js", true);
Services.mm.loadFrameScript("chrome://mochikit/content/shutdown-leaks-collector.js", true);
} else {
// In non-e10s, only run the ShutdownLeaksCollector in the parent process.
ChromeUtils.import("chrome://mochikit/content/ShutdownLeaksCollector.jsm");
}
let gmm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
gmm.loadFrameScript("chrome://mochikit/content/tests/SimpleTest/AsyncUtilsContent.js", true);
Services.mm.loadFrameScript("chrome://mochikit/content/tests/SimpleTest/AsyncUtilsContent.js", true);
var testSuite = Cc["@mozilla.org/process/environment;1"].
getService(Ci.nsIEnvironment).

Просмотреть файл

@ -28,8 +28,7 @@ Services.scriptloader.loadSubScript("chrome://specialpowers/content/SpecialPower
/* XPCOM gunk */
this.SpecialPowersObserver = function SpecialPowersObserver() {
this._isFrameScriptLoaded = false;
this._messageManager = Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageBroadcaster);
this._messageManager = Services.mm;
};

Просмотреть файл

@ -1260,9 +1260,9 @@ function do_await_remote_message(name, optionalCallback) {
var mm;
if (runningInParent) {
mm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(Ci.nsIMessageBroadcaster);
mm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
} else {
mm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService(Ci.nsISyncMessageSender);
mm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService();
}
do_test_pending();
mm.addMessageListener(name, listener);
@ -1277,10 +1277,10 @@ function do_send_remote_message(name) {
var mm;
var sender;
if (runningInParent) {
mm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(Ci.nsIMessageBroadcaster);
mm = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
sender = "broadcastAsyncMessage";
} else {
mm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService(Ci.nsISyncMessageSender);
mm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService();
sender = "sendAsyncMessage";
}
mm[sender](name);

Просмотреть файл

@ -43,10 +43,8 @@ function setDefault(dict, key, default_) {
// with a given component.
var NotificationTracker = {
init() {
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
cpmm.addMessageListener("Addons:ChangeNotification", this);
this._paths = cpmm.initialProcessData.remoteAddonsNotificationPaths;
Services.cpmm.addMessageListener("Addons:ChangeNotification", this);
this._paths = Services.cpmm.initialProcessData.remoteAddonsNotificationPaths;
this._registered = new Map();
this._watchers = {};
},
@ -248,9 +246,7 @@ var ContentPolicyChild = {
addons, {InitNode: node});
cpows.node = node;
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
let rval = cpmm.sendRpcMessage("Addons:ContentPolicy:Run", {
let rval = Services.cpmm.sendRpcMessage("Addons:ContentPolicy:Run", {
contentType,
contentLocation: contentLocation.spec,
requestOrigin: requestOrigin ? requestOrigin.spec : null,
@ -312,9 +308,7 @@ AboutProtocolChannel.prototype = {
asyncOpen(listener, context) {
// Ask the parent to synchronously read all the data from the channel.
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
let rval = cpmm.sendRpcMessage("Addons:AboutProtocol:OpenChannel", {
let rval = Services.cpmm.sendRpcMessage("Addons:AboutProtocol:OpenChannel", {
uri: this.URI.spec,
contractID: this._contractID,
loadingPrincipal: this._loadingPrincipal,
@ -406,10 +400,7 @@ AboutProtocolInstance.prototype = {
return this._uriFlags;
}
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
let rval = cpmm.sendRpcMessage("Addons:AboutProtocol:GetURIFlags", {
let rval = Services.cpmm.sendRpcMessage("Addons:AboutProtocol:GetURIFlags", {
uri: uri.spec,
contractID: this._contractID
});
@ -485,9 +476,7 @@ var ObserverChild = {
},
observe(subject, topic, data) {
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender);
cpmm.sendRpcMessage("Addons:Observer:Run", {}, {
Services.cpmm.sendRpcMessage("Addons:Observer:Run", {}, {
topic,
subject,
data

Просмотреть файл

@ -43,9 +43,7 @@ var NotificationTracker = {
_paths: {},
init() {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.initialProcessData.remoteAddonsNotificationPaths = this._paths;
Services.ppmm.initialProcessData.remoteAddonsNotificationPaths = this._paths;
},
add(path) {
@ -57,9 +55,7 @@ var NotificationTracker = {
count++;
tracked._count = count;
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count});
Services.ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count});
},
remove(path) {
@ -69,9 +65,7 @@ var NotificationTracker = {
}
tracked._count--;
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count: tracked._count});
Services.ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count: tracked._count});
},
};
NotificationTracker.init();
@ -98,9 +92,7 @@ function Interposition(name, base) {
// add-on content policies when the child asks it to do so.
var ContentPolicyParent = {
init() {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.addMessageListener("Addons:ContentPolicy:Run", this);
Services.ppmm.addMessageListener("Addons:ContentPolicy:Run", this);
this._policies = new Map();
},
@ -188,10 +180,8 @@ CategoryManagerInterposition.methods.deleteCategoryEntry =
// use it. This code is pretty specific to Adblock's usage.
var AboutProtocolParent = {
init() {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.addMessageListener("Addons:AboutProtocol:GetURIFlags", this);
ppmm.addMessageListener("Addons:AboutProtocol:OpenChannel", this);
Services.ppmm.addMessageListener("Addons:AboutProtocol:GetURIFlags", this);
Services.ppmm.addMessageListener("Addons:AboutProtocol:OpenChannel", this);
this._protocols = [];
},
@ -326,9 +316,7 @@ ComponentRegistrarInterposition.methods.unregisterFactory =
// won't expect to get notified in this case.
var ObserverParent = {
init() {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.addMessageListener("Addons:Observer:Run", this);
Services.ppmm.addMessageListener("Addons:Observer:Run", this);
},
addObserver(addon, observer, topic, ownsWeak) {
@ -406,9 +394,7 @@ var EventTargetParent = {
// or windows) to a dictionary from event types to listeners.
this._listeners = new WeakMap();
let mm = Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageListenerManager);
mm.addMessageListener("Addons:Event:Run", this);
Services.mm.addMessageListener("Addons:Event:Run", this);
},
// If target is not on the path from a <browser> element to the
@ -1053,8 +1039,7 @@ RemoteWebNavigationInterposition.getters.sessionHistory = function(addon, target
var RemoteAddonsParent = {
init() {
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
mm.addMessageListener("Addons:RegisterGlobal", this);
Services.mm.addMessageListener("Addons:RegisterGlobal", this);
Services.ppmm.initialProcessData.remoteAddonsParentInitted = true;

Просмотреть файл

@ -26,8 +26,7 @@ function contextArg(context) {
var ContentPrefServiceParent = {
// Called on all platforms.
alwaysInit() {
let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
globalMM.addMessageListener("child-process-shutdown", this);
},
@ -35,8 +34,7 @@ var ContentPrefServiceParent = {
// Only called on Android. Listeners are added in nsBrowserGlue.js on other
// platforms.
init() {
let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
// PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN nsBrowserGlue
globalMM.addMessageListener("ContentPrefs:FunctionCall", this);

Просмотреть файл

@ -220,8 +220,7 @@
for (let test of Object.getOwnPropertyNames(tests)) {
addMessageListener(`testRemoteContentPrefs:${test}`, function(message) {
let mm = message.target.QueryInterface(Ci.nsIMessageSender);
testHandler(mm, test);
testHandler(message.target, test);
});
}
}

Просмотреть файл

@ -412,8 +412,7 @@ if (this.addMessageListener) {
return rv;
});
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
globalMM.addMessageListener("RemoteLogins:onFormSubmit", function onFormSubmit(message) {
Services.mm.addMessageListener("RemoteLogins:onFormSubmit", function onFormSubmit(message) {
sendAsyncMessage("formSubmissionProcessed", message.data, message.objects);
});
} else {

Просмотреть файл

@ -52,12 +52,10 @@ FormHistoryStartup.prototype = {
Services.ppmm.loadProcessScript("chrome://satchel/content/formSubmitListener.js", true);
Services.ppmm.addMessageListener("FormHistory:FormSubmitEntries", this);
let messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
// For each of these messages, we could receive them from content,
// or we might receive them from the ppmm if the searchbar is
// having its history queried.
for (let manager of [messageManager, Services.ppmm]) {
for (let manager of [Services.mm, Services.ppmm]) {
manager.addMessageListener("FormHistory:AutoCompleteSearchAsync", this);
manager.addMessageListener("FormHistory:RemoveEntry", this);
}
@ -87,7 +85,10 @@ FormHistoryStartup.prototype = {
let mm;
let query = null;
if (message.target instanceof Ci.nsIMessageListenerManager) {
// MessageListenerManager is a Mozilla-only interface, so disable the eslint error
// for it.
// eslint-disable-next-line no-undef
if (message.target instanceof MessageListenerManager) {
// The target is the PPMM, meaning that the parent process
// is requesting FormHistory data on the searchbar.
mm = message.target;

Просмотреть файл

@ -105,10 +105,6 @@ var gWasDebuggerAttached = false;
XPCOMUtils.defineLazyServiceGetters(this, {
Telemetry: ["@mozilla.org/base/telemetry;1", "nsITelemetry"],
idleService: ["@mozilla.org/widget/idleservice;1", "nsIIdleService"],
cpmm: ["@mozilla.org/childprocessmessagemanager;1", "nsIMessageSender"],
cpml: ["@mozilla.org/childprocessmessagemanager;1", "nsIMessageListenerManager"],
ppmm: ["@mozilla.org/parentprocessmessagemanager;1", "nsIMessageBroadcaster"],
ppml: ["@mozilla.org/parentprocessmessagemanager;1", "nsIMessageListenerManager"],
});
function generateUUID() {
@ -1131,7 +1127,7 @@ var Impl = {
// Only the chrome process should gather total memory
// total = parent RSS + sum(child USS)
this._totalMemory = mgr.residentFast;
if (ppmm.childCount > 1) {
if (Services.ppmm.childCount > 1) {
// Do not report If we time out waiting for the children to call
this._totalMemoryTimeout = setTimeout(
() => {
@ -1141,8 +1137,8 @@ var Impl = {
TOTAL_MEMORY_COLLECTOR_TIMEOUT);
this._USSFromChildProcesses = [];
this._childrenToHearFrom = new Set();
for (let i = 1; i < ppmm.childCount; i++) {
let child = ppmm.getChildAt(i);
for (let i = 1; i < Services.ppmm.childCount; i++) {
let child = Services.ppmm.getChildAt(i);
try {
child.sendAsyncMessage(MESSAGE_TELEMETRY_GET_CHILD_USS, {id: this._nextTotalMemoryId});
this._childrenToHearFrom.add(this._nextTotalMemoryId);
@ -1471,8 +1467,8 @@ var Impl = {
this.attachEarlyObservers();
ppml.addMessageListener(MESSAGE_TELEMETRY_PAYLOAD, this);
ppml.addMessageListener(MESSAGE_TELEMETRY_USS, this);
Services.ppmm.addMessageListener(MESSAGE_TELEMETRY_PAYLOAD, this);
Services.ppmm.addMessageListener(MESSAGE_TELEMETRY_USS, this);
},
/**
@ -1558,7 +1554,7 @@ var Impl = {
}
this.addObserver("content-child-shutdown");
cpml.addMessageListener(MESSAGE_TELEMETRY_GET_CHILD_USS, this);
Services.cpmm.addMessageListener(MESSAGE_TELEMETRY_GET_CHILD_USS, this);
let delayedTask = new DeferredTask(() => {
this._initialized = true;
@ -1683,7 +1679,7 @@ var Impl = {
return;
}
cpmm.sendAsyncMessage(
Services.cpmm.sendAsyncMessage(
MESSAGE_TELEMETRY_USS,
{bytes: mgr.residentUnique, id: aMessageId}
);
@ -1694,7 +1690,7 @@ var Impl = {
const isSubsession = !this._isClassicReason(reason);
let payload = this.getSessionPayload(reason, isSubsession);
payload.childUUID = this._processUUID;
cpmm.sendAsyncMessage(MESSAGE_TELEMETRY_PAYLOAD, payload);
Services.cpmm.sendAsyncMessage(MESSAGE_TELEMETRY_PAYLOAD, payload);
},
/**

Просмотреть файл

@ -51,18 +51,6 @@ if (AppConstants.MOZ_CRASHREPORTER) {
});
}
XPCOMUtils.defineLazyGetter(Services, "mm", () => {
return Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster)
.QueryInterface(Ci.nsIFrameScriptLoader);
});
XPCOMUtils.defineLazyGetter(Services, "ppmm", () => {
return Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster)
.QueryInterface(Ci.nsIProcessScriptLoader);
});
XPCOMUtils.defineLazyGetter(Services, "io", () => {
return Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService)
@ -83,8 +71,10 @@ var initTable = {
intl: ["@mozilla.org/mozintl;1", "mozIMozIntl"],
locale: ["@mozilla.org/intl/localeservice;1", "mozILocaleService"],
logins: ["@mozilla.org/login-manager;1", "nsILoginManager"],
mm: ["@mozilla.org/globalmessagemanager;1", "nsISupports"],
obs: ["@mozilla.org/observer-service;1", "nsIObserverService"],
perms: ["@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
ppmm: ["@mozilla.org/parentprocessmessagemanager;1", "nsISupports"],
prompt: ["@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
scriptloader: ["@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
scriptSecurityManager: ["@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],

Просмотреть файл

@ -108,7 +108,7 @@ var WebChannelBroker = Object.create({
/**
* The global message manager operates on every <browser>
*/
_manager: Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager),
_manager: Services.mm,
/**
* Boolean used to detect if the global message manager event is already attached
*/

Просмотреть файл

@ -20,8 +20,7 @@ const MSG_JAR_FLUSH = "AddonJarFlush";
*/
function flushJarCache(aJarFile) {
Services.obs.notifyObservers(aJarFile, "flush-cache-entry");
Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageBroadcaster)
.broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path);
Services.mm.broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path);
}

Просмотреть файл

@ -64,9 +64,6 @@ XPCOMUtils.defineLazyGetter(this, "pluginsBundle",
XPCOMUtils.defineLazyGetter(this, "gmpService",
() => Cc["@mozilla.org/gecko-media-plugin-service;1"].getService(Ci.mozIGeckoMediaPluginChromeService));
var messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
var gLogger;
var gLogAppenderDump = null;
@ -109,7 +106,7 @@ function GMPWrapper(aPluginInfo) {
this, true);
if (this._plugin.isEME) {
Services.prefs.addObserver(GMPPrefs.KEY_EME_ENABLED, this, true);
messageManager.addMessageListener("EMEVideo:ContentMediaKeysRequest", this);
Services.mm.addMessageListener("EMEVideo:ContentMediaKeysRequest", this);
}
}
@ -458,7 +455,7 @@ GMPWrapper.prototype = {
this._plugin.id), this);
if (this._plugin.isEME) {
Services.prefs.removeObserver(GMPPrefs.KEY_EME_ENABLED, this);
messageManager.removeMessageListener("EMEVideo:ContentMediaKeysRequest", this);
Services.mm.removeMessageListener("EMEVideo:ContentMediaKeysRequest", this);
}
return this._updateTask;
},

Просмотреть файл

@ -28,8 +28,6 @@ var servicesASTParser = {
"nsIXULAppInfo": "appinfo",
"nsIDirectoryService": "dirsvc",
"nsIProperties": "dirsvc",
"nsIFrameScriptLoader": "mm",
"nsIProcessScriptLoader": "ppmm",
"nsIIOService": "io",
"nsISpeculativeConnect": "io",
"nsICookieManager": "cookies"
@ -109,6 +107,9 @@ function getInterfacesFromServicesFile() {
}
});
// nsISupports is used for multiple services, so we can't really warn for it.
delete servicesASTParser.result.nsISupports;
// nsIPropertyBag2 is used for system-info, but it is also used for other
// services and items as well, so we can't really warn for it.
delete servicesASTParser.result.nsIPropertyBag2;

Просмотреть файл

@ -24,12 +24,10 @@ QuitterObserver.prototype = {
} else if (!this.isFrameScriptLoaded &&
aTopic == "chrome-document-global-created") {
var messageManager = Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageBroadcaster);
// Register for any messages our API needs us to handle
messageManager.addMessageListener("Quitter.Quit", this);
Services.mm.addMessageListener("Quitter.Quit", this);
messageManager.loadFrameScript(CHILD_SCRIPT, true);
Services.mm.loadFrameScript(CHILD_SCRIPT, true);
this.isFrameScriptLoaded = true;
} else if (aTopic == "xpcom-shutdown") {
this.uninit();

Просмотреть файл

@ -55,6 +55,7 @@
#include "nsIDOMXULElement.h"
#include "nsIFrameLoader.h"
#include "nsIListBoxObject.h"
#include "nsIMessageManager.h"
#include "nsISelection.h"
#include "nsITreeBoxObject.h"
#include "nsIWebBrowserPersistable.h"
@ -97,6 +98,7 @@
#include "mozilla/dom/ListBoxObjectBinding.h"
#include "mozilla/dom/MediaListBinding.h"
#include "mozilla/dom/MessageEventBinding.h"
#include "mozilla/dom/MessageManagerBinding.h"
#include "mozilla/dom/MouseEventBinding.h"
#include "mozilla/dom/MouseScrollEventBinding.h"
#include "mozilla/dom/NodeListBinding.h"
@ -190,6 +192,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMClientRectList, DOMRectList),
DEFINE_SHIM(ClipboardEvent),
DEFINE_SHIM(Comment),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIContentFrameMessageManager, ContentFrameMessageManager),
DEFINE_SHIM(CustomEvent),
DEFINE_SHIM(DataTransfer),
DEFINE_SHIM(DOMCursor),
@ -210,6 +213,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM(HTMLFormElement),
DEFINE_SHIM(HTMLInputElement),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIListBoxObject, ListBoxObject),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIMessageSender, MessageSender),
DEFINE_SHIM(MouseEvent),
DEFINE_SHIM(MouseScrollEvent),
DEFINE_SHIM(NodeList),