Bug 1569570 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

With Fission, we have a direct communication channel between window Actors that are lazily created for each frame. So tunneling messages may not be a good idea since that will add an overhead of messages and instances of Actor. But, we may need to get the outer browser from the actors which can only access to the inner browser directly. To fix that, maybe we can expose the outer browser via the inner one in swap.js@start function with 

```
Object.defineProperty(innerBrowser, "outerBrowser", {
        get() {
          return tab.linkedBrowser;
        },
        configurable: true,
        enumerable: true,
});
```

So that in [SelectParent.jsm receiveMessage function](https://searchfox.org/mozilla-central/source/toolkit/actors/SelectParent.jsm#669) we can do something like this:
```
let topBrowsingContext = this.manager.browsingContext.top;
let browser = topBrowsingContext.embedderElement; 
if (browser.outerBrowser) {
  // We are in RDM mode
  browser = browser.outerBrowser;
}
```

All we will need to do after that is to remove "Forms" related messages in tunnel.js.
With Fission, we have a direct communication channel between window Actors that are lazily created for each frame. So tunneling messages may not be a good idea since that will add an overhead of messages and instances of Actor. But, we may need to get the outer browser from the actors which can only access to the inner browser directly. To fix that, maybe we can expose the outer browser via the inner one in [swap.js@start function](https://searchfox.org/mozilla-central/source/devtools/client/responsive.html/browser/swap.js#107) with 

```
Object.defineProperty(innerBrowser, "outerBrowser", {
        get() {
          return tab.linkedBrowser;
        },
        configurable: true,
        enumerable: true,
});
```

So that in [SelectParent.jsm receiveMessage function](https://searchfox.org/mozilla-central/source/toolkit/actors/SelectParent.jsm#669) we can do something like this:
```
let topBrowsingContext = this.manager.browsingContext.top;
let browser = topBrowsingContext.embedderElement; 
if (browser.outerBrowser) {
  // We are in RDM mode
  browser = browser.outerBrowser;
}
```

All we will need to do after that is to remove "Forms" related messages in tunnel.js.

Back to Bug 1569570 Comment 7