From b04134dbf23cd99f80e6c3bde8d82b62a1c9b381 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 11 Aug 2014 15:27:58 -0700 Subject: [PATCH] Backed out changeset 49086e9caa4e (bug 1051114) for making Gaia-unit tests timeout on a CLOSED TREE --- dom/apps/src/InterAppCommService.jsm | 7 ------- dom/apps/src/InterAppMessagePort.js | 11 ++--------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/dom/apps/src/InterAppCommService.jsm b/dom/apps/src/InterAppCommService.jsm index 4da7d5e901c..51a671a6b01 100644 --- a/dom/apps/src/InterAppCommService.jsm +++ b/dom/apps/src/InterAppCommService.jsm @@ -804,13 +804,6 @@ this.InterAppCommService = { if (pair.publisher.target === aTarget || pair.subscriber.target === aTarget) { messagePortIDs.push(messagePortID); - // Send a shutdown message to the part of the pair that is still alive. - let actor = pair.publisher.target === aTarget ? pair.subscriber - : pair.publisher; - actor.target.sendAsyncMessage("InterAppMessagePort:Shutdown", - { manifestURL: actor.manifestURL, - pageURL: actor.pageURL, - messagePortID: messagePortID }); } } messagePortIDs.forEach(function(aMessagePortID) { diff --git a/dom/apps/src/InterAppMessagePort.js b/dom/apps/src/InterAppMessagePort.js index 7d3ec9ba7a9..5b948408750 100644 --- a/dom/apps/src/InterAppMessagePort.js +++ b/dom/apps/src/InterAppMessagePort.js @@ -30,8 +30,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "appsService", "@mozilla.org/AppsService;1", "nsIAppsService"); -const kMessages = ["InterAppMessagePort:OnMessage", - "InterAppMessagePort:Shutdown"]; +const kMessages = ["InterAppMessagePort:OnMessage"]; function InterAppMessagePort() { if (DEBUG) debug("InterAppMessagePort()"); @@ -150,8 +149,6 @@ InterAppMessagePort.prototype = { cpmm.sendAsyncMessage("InterAppMessagePort:Unregister", { messagePortID: this._messagePortID, manifestURL: this._manifestURL }); - - this.removeMessageListeners(kMessages); }, get onmessage() { @@ -196,8 +193,7 @@ InterAppMessagePort.prototype = { if (message.manifestURL != this._manifestURL || message.pageURL != this._pageURL || message.messagePortID != this._messagePortID) { - if (DEBUG) debug("The message doesn't belong to this page. Returning. " + - uneval(message)); + if (DEBUG) debug("The message doesn't belong to this page. Returning."); return; } @@ -217,9 +213,6 @@ InterAppMessagePort.prototype = { this._dispatchMessage(message.message); break; - case "InterAppMessagePort:Shutdown": - this.close(); - break; default: if (DEBUG) debug("Error! Shouldn't fall into this case."); break;