Skip to content

Commit

Permalink
Backed out 6 changesets (bug 888600) for beta simulation failures: bu…
Browse files Browse the repository at this point in the history
…ild bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout

Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
  • Loading branch information
Archaeopteryx committed Mar 1, 2018
1 parent 9f2b269 commit 3a10644
Show file tree
Hide file tree
Showing 137 changed files with 1,264 additions and 2,646 deletions.
3 changes: 2 additions & 1 deletion browser/base/content/test/general/contentSearchUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ function waitForSuggestions(cb) {
}

function waitForContentSearchEvent(messageType, cb) {
let mm = content.SpecialPowers.Cc["@mozilla.org/globalmessagemanager;1"].getService();
let mm = content.SpecialPowers.Cc["@mozilla.org/globalmessagemanager;1"].
getService(content.SpecialPowers.Ci.nsIMessageListenerManager);
mm.addMessageListener("ContentSearch", function listener(aMsg) {
if (aMsg.data.type != messageType) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ var gTests = [

// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
let childCount = Services.ppmm.childCount;
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = 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.
Expand Down Expand Up @@ -143,7 +146,10 @@ var gTests = [

// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
let childCount = Services.ppmm.childCount;
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = 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.
Expand Down Expand Up @@ -249,7 +255,10 @@ var gTests = [

// If we have reached the max process count already, increase it to ensure
// our new tab can have its own content process.
let childCount = Services.ppmm.childCount;
var ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.QueryInterface(Ci.nsIProcessScriptLoader);
let childCount = 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ 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;
}
Expand Down
5 changes: 3 additions & 2 deletions browser/components/nsBrowserGlue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3188,13 +3188,14 @@ 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.
Services.mm.addMessageListener("UITour:onPageEvent", function(aMessage) {
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
globalMM.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.
Services.mm.addMessageListener("HybridContentTelemetry:onTelemetryMessage", aMessage => {
globalMM.addMessageListener("HybridContentTelemetry:onTelemetryMessage", aMessage => {
HybridContentTelemetry.onTelemetryMessage(aMessage, aMessage.data);
});
7 changes: 5 additions & 2 deletions browser/components/sessionstore/test/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ const FRAME_SCRIPTS = [
ROOT + "content-forms.js"
];

var globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);

for (let script of FRAME_SCRIPTS) {
Services.mm.loadFrameScript(script, true);
globalMM.loadFrameScript(script, true);
}

registerCleanupFunction(() => {
for (let script of FRAME_SCRIPTS) {
Services.mm.removeDelayedFrameScript(script, true);
globalMM.removeDelayedFrameScript(script, true);
}
});

Expand Down
6 changes: 4 additions & 2 deletions browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ var PdfjsChromeUtils = {
this._browsers = new WeakSet();
if (!this._ppmm) {
// global parent process message manager (PPMM)
this._ppmm = Services.ppmm;
this._ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"].
getService(Ci.nsIMessageBroadcaster);
this._ppmm.addMessageListener("PDFJS:Parent:clearUserPref", this);
this._ppmm.addMessageListener("PDFJS:Parent:setIntPref", this);
this._ppmm.addMessageListener("PDFJS:Parent:setBoolPref", this);
Expand All @@ -77,7 +78,8 @@ var PdfjsChromeUtils = {
this._ppmm.addMessageListener("PDFJS:Parent:isDefaultHandlerApp", this);

// global dom message manager (MMg)
this._mmg = Services.mm;
this._mmg = Cc["@mozilla.org/globalmessagemanager;1"].
getService(Ci.nsIMessageListenerManager);
this._mmg.addMessageListener("PDFJS:Parent:displayWarning", this);

this._mmg.addMessageListener("PDFJS:Parent:addEventListener", this);
Expand Down
3 changes: 2 additions & 1 deletion browser/extensions/pdfjs/content/PdfjsContentUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ 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 = Services.cpmm;
this._mm = Cc["@mozilla.org/childprocessmessagemanager;1"].
getService(Ci.nsISyncMessageSender);
this._mm.addMessageListener("PDFJS:Child:updateSettings", this);

Services.obs.addObserver(this, "quit-application");
Expand Down
4 changes: 3 additions & 1 deletion browser/extensions/pocket/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ var PocketOverlay = {
}
},
shutdown(reason) {
Services.ppmm.broadcastAsyncMessage("PocketShuttingDown");
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
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
Expand Down
3 changes: 2 additions & 1 deletion browser/modules/AboutHome.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ var AboutHome = {
if (target && target.messageManager) {
target.messageManager.sendAsyncMessage("AboutHome:Update", data);
} else {
Services.mm.broadcastAsyncMessage("AboutHome:Update", data);
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("AboutHome:Update", data);
}
}).catch(function onError(x) {
Cu.reportError("Error in AboutHome.sendAboutHomeData: " + x);
Expand Down
8 changes: 5 additions & 3 deletions browser/modules/ContentCrashHandlers.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -995,10 +995,12 @@ var 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 (Services.ppmm) {
if (Cc["@mozilla.org/parentprocessmessagemanager;1"]) {
let pluginName = propertyBag.getPropertyAsAString("pluginName");
Services.ppmm.broadcastAsyncMessage("gmp-plugin-crash",
{ pluginName, pluginID });
let mm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
mm.broadcastAsyncMessage("gmp-plugin-crash",
{ pluginName, pluginID });
}
break;
}
Expand Down
4 changes: 3 additions & 1 deletion browser/modules/ContentSearch.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,9 @@ var ContentSearch = {
},

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

_msgArgs(type, data) {
Expand Down
7 changes: 5 additions & 2 deletions devtools/client/jsonview/converter-child.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"use strict";

const {Ci, Cu, CC} = require("chrome");
const {Cc, Ci, Cu, CC} = require("chrome");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const Services = require("Services");

Expand All @@ -17,6 +17,9 @@ 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",
Expand Down Expand Up @@ -301,7 +304,7 @@ function onContentMessage(e) {
let value = e.detail.value;
switch (e.detail.type) {
case "save":
Services.cpmm.sendAsyncMessage(
childProcessMessageManager.sendAsyncMessage(
"devtools:jsonview:save", value);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_task(async function () {
await waitForContentRequests;

info("Clicking stack-trace tab and waiting for stack-trace panel to open");
let wait = waitForDOM(document, "#stack-trace-panel .frame-link", 5);
let wait = waitForDOM(document, "#stack-trace-panel .frame-link", 4);
// Click on the first request
EventUtils.sendMouseEvent({ type: "mousedown" },
document.querySelector(".request-list-item"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ function waitForDeviceClosed() {

return new Promise((resolve, reject) => {
const message = "webrtc:UpdateGlobalIndicators";
Services.ppmm.addMessageListener(message, function listener(aMessage) {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.addMessageListener(message, function listener(aMessage) {
info("Received " + message + " message");
if (!aMessage.data.showGlobalIndicator) {
Services.ppmm.removeMessageListener(message, listener);
ppmm.removeMessageListener(message, listener);
resolve();
}
});
Expand Down
5 changes: 3 additions & 2 deletions devtools/server/actors/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

"use strict";

var { Cc } = require("chrome");
var { Cc, Ci } = require("chrome");

loader.lazyGetter(this, "ppmm", () => {
return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService();
return Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(
Ci.nsIMessageBroadcaster);
});

function ProcessActorList() {
Expand Down
8 changes: 6 additions & 2 deletions devtools/server/actors/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

"use strict";

const { Cu } = require("chrome");
const { Cc, Ci, 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);

Expand Down Expand Up @@ -543,7 +547,7 @@ RootActor.prototype = {
}

let { id } = request;
let mm = Services.ppmm.getChildAt(id);
let mm = ppmm.getChildAt(id);
if (!mm) {
return { error: "noProcess",
message: "There is no process with id '" + id + "'." };
Expand Down
12 changes: 9 additions & 3 deletions devtools/server/actors/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"use strict";

const {Ci, Cu, CC} = require("chrome");
const {Cc, Ci, Cu, CC} = require("chrome");
const protocol = require("devtools/shared/protocol");
const {LongStringActor} = require("devtools/server/actors/string");
const {DebuggerServer} = require("devtools/server/main");
Expand Down Expand Up @@ -1938,14 +1938,20 @@ StorageActors.createActor({

var indexedDBHelpers = {
backToChild(...args) {
Services.mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
let mm = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);

mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
method: "backToChild",
args: args
});
},

onItemUpdated(action, host, path) {
Services.mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
let mm = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);

mm.broadcastAsyncMessage("debug:storage-indexedDB-request-child", {
method: "onItemUpdated",
args: [ action, host, path ]
});
Expand Down
10 changes: 6 additions & 4 deletions devtools/server/actors/webconsole/content-process-forward.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
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");

Expand Down Expand Up @@ -34,7 +37,7 @@ const MSG_MGR_CONSOLE_INFO_MAX = 1024;
function ContentProcessForward() {
Services.obs.addObserver(this, "console-api-log-event");
Services.obs.addObserver(this, "xpcom-shutdown");
Services.cpmm.addMessageListener("DevTools:StopForwardingContentProcessMessage", this);
cpmm.addMessageListener("DevTools:StopForwardingContentProcessMessage", this);
}
ContentProcessForward.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Expand Down Expand Up @@ -105,7 +108,7 @@ ContentProcessForward.prototype = {
}
}

Services.cpmm.sendAsyncMessage("Console:Log", msgData);
cpmm.sendAsyncMessage("Console:Log", msgData);
break;
}

Expand All @@ -118,8 +121,7 @@ ContentProcessForward.prototype = {
uninit() {
Services.obs.removeObserver(this, "console-api-log-event");
Services.obs.removeObserver(this, "xpcom-shutdown");
Services.cpmm.removeMessageListener("DevTools:StopForwardingContentProcessMessage",
this);
cpmm.removeMessageListener("DevTools:StopForwardingContentProcessMessage", this);
}
};

Expand Down
1 change: 1 addition & 0 deletions devtools/server/content-server.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ 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
Expand Down
5 changes: 3 additions & 2 deletions devtools/server/tests/mochitest/setup-in-child.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use strict";

const {Cc} = require("chrome");
const cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"].getService();
const {Cc, Ci} = require("chrome");
const cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
const { DebuggerServer } = require("devtools/server/main");

exports.setupChild = function (a, b, c) {
Expand Down
6 changes: 4 additions & 2 deletions devtools/server/tests/mochitest/test_setupInParentChild.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
let client = new DebuggerClient(transport);

// Wait for a response from setupInChild
const ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
let onChild = msg => {
Services.ppmm.removeMessageListener("test:setupChild", onChild);
ppmm.removeMessageListener("test:setupChild", onChild);
let args = msg.json;

is(args[0], 1, "Got first numeric argument");
Expand All @@ -63,7 +65,7 @@
setupChild: "callParent"
});
};
Services.ppmm.addMessageListener("test:setupChild", onChild);
ppmm.addMessageListener("test:setupChild", onChild);

// Wait also for a reponse from setupInParent called from setup-in-child.js
let onParent = (_, topic, args) => {
Expand Down
5 changes: 3 additions & 2 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,11 @@ 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))) {
RefPtr<TabChild> tabChild = TabChild::GetFrom(this);
nsCOMPtr<nsITabChild> tabChild =
do_GetInterface(static_cast<nsIDocShell*>(this));
nsCOMPtr<nsIContentFrameMessageManager> mm;
if (tabChild) {
mm = tabChild->GetMessageManager();
tabChild->GetMessageManager(getter_AddRefs(mm));
} else {
if (nsPIDOMWindowOuter* win = GetWindow()) {
mm = do_QueryInterface(win->GetParentTarget());
Expand Down
Loading

0 comments on commit 3a10644

Please sign in to comment.