Closed Bug 1457673 Opened 2 years ago Closed 2 years ago
_ID _CURRENT in browser .windows .remove
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 Build ID: 20180426220144 Steps to reproduce: 1. Open a new window 2. Debug an extension in about:debugging 3. Run: browser.windows.remove(browser.windows.WINDOW_ID_CURRENT) Actual results: Error: Type error for parameter windowId (Integer -2 is too small (must be at least 0)) for windows.remove. Expected results: The window is removed. --- This is a regression in Firefox Nightly. The schema of this api set the minimum value of windowId to 0, but it was not enforced before the fix of Bug 1448120. Now it is enforced and WINDOW_ID_CURRENT(-2) is rejected. Suggested fix: change the minimum windowId to -2 like other windows apis.
Comment on attachment 8972445 [details] Bug 1457673 - Support WINDOW_ID_CURRENT in browser.windows.remove https://reviewboard.mozilla.org/r/241046/#review247046
Attachment #8972445 - Flags: review?(mixedpuppy) → review+
I'm landing on autoland.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/5ea81be0d028 Support WINDOW_ID_CURRENT in browser.windows.remove r=mixedpuppy
Verified as fixed in Firefox 61 and Firefox 62. The windows is removed without issues now. I will attach a postfix video.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.