Open
Bug 1394010
Opened 8 years ago
Updated 3 years ago
TypeError: content is null in ext-browser-content.js when extension popup changes DOM upon unload (triggers MutationObserver)
Categories
(WebExtensions :: General, defect, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: robwu, Unassigned)
References
Details
Attachments
(1 file)
881 bytes,
application/zip
|
Details |
STR
1. Load attached extension (extract unload.zip to a directory and load the extension at about:debugging).
2. Click on the extension button (it has tooltip "DOM change upon popup unload").
3. Close the extension popup.
4. Look at the global JS console (Ctrl-Shift-J).
Expected:
- No errors
Actual:
- TypeError: content is null
at _handleDOMChange https://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/toolkit/components/extensions/ext-browser-content.js#229
If I look at the backtrace, the caller of _handleDOMChange looks like a MutationObserver callback. This is here:
https://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/toolkit/components/extensions/ext-browser-content.js#190
Although this error can easily be fixed by checking whether content is not null at the start of handleDOMChange, I wonder whether there is some other bug that would be hidden by such a fix.
The mutation observer seems to be called after the content is nulled. I would expect any pending tasks to be aborted when the extension popup closes (and content is nulled). Why does this not happen?
Updated•8 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Product: Toolkit → WebExtensions
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•