Bug 1453499 - Expose processMessageManager for RDM frames. r=ochameau
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 10 Apr 2018 18:35:05 -0500
changeset 412983 25d8980ea60ba5720e02037e4fc36f413a499be4
parent 412982 b1704c46dd795635702b9e2d1aab9e57c9764957
child 412984 7c2c4073bac609d1481bc1b6388b161276405490
push id33828
push userarchaeopteryx@coole-files.de
push dateThu, 12 Apr 2018 19:19:41 +0000
treeherdermozilla-central@6e22c4a726c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1453499
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453499 - Expose processMessageManager for RDM frames. r=ochameau RDM frames with their custom message manager hadn't exposed a value for `processMessageManager`. This was just a oversight. By adding this value, we get a working Browser Content Toolbox for RDM tabs. MozReview-Commit-ID: 95QskEMKgZK
devtools/client/responsive.html/browser/tunnel.js
--- a/devtools/client/responsive.html/browser/tunnel.js
+++ b/devtools/client/responsive.html/browser/tunnel.js
@@ -550,16 +550,25 @@ MessageManagerTunnel.prototype = {
       this.destroy();
     }
     if (subject == this.outerParentMM) {
       debug("Outer messageManager has closed");
       this.destroy();
     }
   },
 
+  /**
+   * Expose the inner frame's value for `processMessageManager`.  This is done mainly to
+   * allow Browser Content Toolbox (which needs to find a tab's process) to work for RDM
+   * tabs.  (The property is quite rarely used in general.)
+   */
+  get processMessageManager() {
+    return this.innerParentMM.processMessageManager;
+  },
+
   loadFrameScript(url, ...args) {
     debug(`Calling loadFrameScript for ${url}`);
 
     if (!this.OUTER_TO_INNER_FRAME_SCRIPTS.includes(url)) {
       debug(`Should load ${url} into inner?`);
       this.outerParentMM.loadFrameScript(url, ...args);
       return;
     }