Issue #618 - Clear the module map when changing a Document's global and add

release build assertions for mismatching compartments.
This commit is contained in:
Moonchild 2020-09-08 11:00:27 +00:00 committed by roytam1
commit ef11a4d7e8
4 changed files with 17 additions and 3 deletions

View file

@ -1471,6 +1471,9 @@ nsHTMLDocument::Open(JSContext* cx,
// document again otherwise the document could have a non-zero onload block
// count without the onload blocker request being in the loadgroup.
EnsureOnloadBlocker();
// Throw away loaded modules created for the previous global.
ScriptLoader()->ClearModuleMap();
}
// Step 8 - Clear all event listeners out of our DOM tree