ported from UXP: Issue #1691 - Part 9: Make import() work when the active script is in another document. M1342012 Associate event handler with active script when they are compiled. (be916ef7)

This commit is contained in:
2023-05-01 00:16:49 +08:00
parent 4e03b175f8
commit d227ff5835
3 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ void HostFinalizeTopLevelScript(JSFreeOp* aFop, const JS::Value& aPrivate) {
#ifdef DEBUG
if (script->IsModuleScript()) {
JSObject* module = script->AsModuleScript()->mModuleRecord.unbarrieredGet();
MOZ_ASSERT(JS::GetModulePrivate(module) == aPrivate);
MOZ_ASSERT_IF(module, JS::GetModulePrivate(module) == aPrivate);
}
#endif