summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-08 11:00:27 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-08 11:00:27 +0000
commitdf55ce90372c71ec9cb186677044aacc96c87187 (patch)
tree7b641235acfdb36b62df58e78f0a03f6c87b4dd7 /dom/script/ScriptLoader.cpp
parent8e5d9da5ebb4c464d582bd4d2f811056474d22be (diff)
downloadUXP-df55ce90372c71ec9cb186677044aacc96c87187.tar
UXP-df55ce90372c71ec9cb186677044aacc96c87187.tar.gz
UXP-df55ce90372c71ec9cb186677044aacc96c87187.tar.lz
UXP-df55ce90372c71ec9cb186677044aacc96c87187.tar.xz
UXP-df55ce90372c71ec9cb186677044aacc96c87187.zip
Issue #618 - Clear the module map when changing a Document's global and add
release build assertions for mismatching compartments.
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r--dom/script/ScriptLoader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 71838580f..362c27f3e 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -477,6 +477,11 @@ ScriptLoader::GetFetchedModule(nsIURI* aURL) const
return ms;
}
+void ScriptLoader::ClearModuleMap() {
+ MOZ_ASSERT(mFetchingModules.IsEmpty());
+ mFetchedModules.Clear();
+}
+
nsresult
ScriptLoader::ProcessFetchedModuleSource(ModuleLoadRequest* aRequest)
{