summaryrefslogtreecommitdiffstats
path: root/dom/html/nsHTMLDocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/nsHTMLDocument.cpp')
-rw-r--r--dom/html/nsHTMLDocument.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index fc5268acc..b0747fb04 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1511,6 +1511,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