Closed Bug 1319567 Opened 8 years ago Closed 8 years ago

Fix fill-browser-data regression

Categories

(WebExtensions :: General, defect)

49 Branch
defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

Attachments

(1 file)

Bug 1317101 changed fill-browser-data in a way that breaks running a test *when run solo* that uses browser.windows.getCurrent before any other browser.windows use, by assuming windowId > 0.  Best to avoid future issues and initialize the first id to 1.
or use outer id
Comment on attachment 8813430 [details]
Bug 1319567 fix window id so it is never zero,

https://reviewboard.mozilla.org/r/94826/#review95054

::: browser/components/extensions/ext-utils.js:967
(Diff revision 1)
>      if (this._windows.has(window)) {
>        return this._windows.get(window);
>      }

No need for the WeakMap anymore. Just return the outer window ID directly.

::: browser/components/extensions/ext-utils.js:970
(Diff revision 1)
>  
>    getId(window) {
>      if (this._windows.has(window)) {
>        return this._windows.get(window);
>      }
> -    let id = this._nextId++;
> +    let id = window.QueryInterface(Ci.nsIInterfaceRequestor).

Move dot to the start of next line, please.
Attachment #8813430 - Flags: review?(kmaglione+bmo) → review+
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/15ab89563679
fix window id so it is never zero, r=kmag
Ok, fixed that issue, re-landing.
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4010d412d8c5
fix window id so it is never zero, r=kmag
https://hg.mozilla.org/mozilla-central/rev/4010d412d8c5
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Flags: needinfo?(mixedpuppy)
Assignee: nobody → mixedpuppy
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: