Closed Bug 1394019 Opened 4 years ago Closed 1 year ago
Error: this .browser is null in Extension Popups .jsm when extension popup is closed on load
STR 1. Load attached extension (extract synchronously.zip to a directory and load the extension at about:debugging). 2. Click on the extension button (it has tooltip "Close synchronously during script execution"). 3. Look at the global JS console (Ctrl-Shift-J). Expected: - No errors Actual: - TypeError: this.browser is null at the Promise callback in unblockParser in https://searchfox.org/mozilla-central/rev/5696c3e525fc8222674eed6a562f5fcbe804c4c7/browser/components/extensions/ExtensionPopups.jsm#320 Easy fix: - Test whether this.browser is null before using this.browser.
Same extension, except it calls window.close() at the DOMContentLoaded event instead of while the script is initializing. Same expectation, same actual result. This concludes the test cases for closing the extension popup during load, there is also error spam when an extension popup mutates the DOM during unload - see bug 1394010.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/c7d802a739c6 Handle DOMWindowClose of extension popup in parent r=zombie
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/comm-central/rev/251268cf2381 Port bug 1394019 - Handle DOMWindowClose of extension popup in parent. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.