Closed Bug 1339144 Opened 7 years ago Closed 7 years ago

Use windowless remote <browser> element for background pages

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

(Whiteboard: triaged)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1287004 +++
Comment on attachment 8837837 [details]
Bug 1339144 - Use windowless browser for remote background pages.

https://reviewboard.mozilla.org/r/112838/#review114694

::: toolkit/components/extensions/ExtensionParent.jsm:731
(Diff revision 1)
>    createBrowserElement() {
>      if (this.browser) {
>        throw new Error("createBrowserElement called twice");
>      }
>  
> -    let waitForParentDocument;
> +    return this.createWindowlessBrowser().then(async chromeDoc => {

why not just make `createBrowserElement()` async and use await here instead of chaining?  the only visible difference I can see is that it would reject instead of throwing immediately if called twice...
Attachment #8837837 - Flags: review?(aswan) → review+
Comment on attachment 8837837 [details]
Bug 1339144 - Use windowless browser for remote background pages.

https://reviewboard.mozilla.org/r/112838/#review114694

> why not just make `createBrowserElement()` async and use await here instead of chaining?  the only visible difference I can see is that it would reject instead of throwing immediately if called twice...

Yeah, I thought about making it an async function, but decided not to for the sake of the error. But I guess it really doesn't matter whether it throws an error or rejects.
Flags: needinfo?(kmaglione+bmo)
https://hg.mozilla.org/mozilla-central/rev/e5c3d1b928cf
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Blocks: 1320124
Flags: needinfo?(kmaglione+bmo)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.