Fix sidebar remote browser handling

RESOLVED FIXED in Firefox 54

Status

RESOLVED FIXED
2 years ago
4 months ago

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Tracking

49 Branch
mozilla54

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Switching the browser to a remote browser was not correct and spitting out a couple errors.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Updated

2 years ago
Assignee: nobody → mixedpuppy

Comment 3

2 years ago
mozreview-review
Comment on attachment 8838810 [details]
Bug 1340750 fix remote handling of sidebar browser,

https://reviewboard.mozilla.org/r/113626/#review115676

::: browser/base/content/webext-panels.js:36
(Diff revision 2)
> +
> +  let readyPromise;
> +  if (sidebar.remote) {
>      browser.setAttribute("remote", "true");
> -    browser.setAttribute("remoteType", remoteType);
> +    browser.setAttribute("remoteType", E10SUtils.getRemoteTypeForURI(sidebar.uri, true,
> +                                                 E10SUtils.EXTENSION_REMOTE_TYPE));

Nit: Weird indentation.

::: browser/base/content/webext-panels.js:39
(Diff revision 2)
>      browser.setAttribute("remote", "true");
> -    browser.setAttribute("remoteType", remoteType);
> +    browser.setAttribute("remoteType", E10SUtils.getRemoteTypeForURI(sidebar.uri, true,
> +                                                 E10SUtils.EXTENSION_REMOTE_TYPE));
> +    readyPromise = promiseEvent(browser, "XULFrameLoaderCreated");
>    } else {
> -    browser.removeAttribute("remote");
> +    readyPromise = promiseEvent(browser, "load");

This generally shouldn't be necessary.

::: browser/base/content/webext-panels.js:44
(Diff revision 2)
> -}
> +  }
> +  document.documentElement.appendChild(browser);
>  
> -function load() {
> +  return readyPromise.then(() => {
> -  let browser = document.getElementById("webext-panels-browser");
> -  browser.messageManager.loadFrameScript("chrome://browser/content/content.js", true);
> +    browser.messageManager.loadFrameScript("chrome://browser/content/content.js", true);

s/true/false/, please.
Attachment #8838810 - Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request)

Comment 5

2 years ago
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6d18f9e14d5d
fix remote handling of sidebar browser, r=kmag
(Assignee)

Updated

2 years ago
Blocks: 1340739

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6d18f9e14d5d
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54

Updated

4 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.