Backed out 2 changesets (bug 1482153, bug 1469004) for assertion failures at ModuleScript.cpp:59. CLOSED TREE
Backed out changeset 8289b70dc0db (bug 1469004) Backed out changeset 4129380f8318 (bug 1482153)
This commit is contained in:
@@ -760,13 +760,8 @@ HostResolveImportedModule(JSContext* aCx, JS::Handle<JSScript*> aScript,
|
||||
JS::Handle<JSString*> aSpecifier)
|
||||
{
|
||||
// Let referencing module script be referencingModule.[[HostDefined]].
|
||||
void* value = JS::GetTopLevelScriptPrivate(aScript);
|
||||
if (!value) {
|
||||
JS_ReportErrorASCII(aCx, "Module script not found");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto script = static_cast<ModuleScript*>(value);
|
||||
JS::Value value = JS::GetModuleHostDefinedField(aScript);
|
||||
auto script = static_cast<ModuleScript*>(value.toPrivate());
|
||||
MOZ_ASSERT(script->Script() == aScript);
|
||||
|
||||
// Let url be the result of resolving a module specifier given referencing
|
||||
@@ -799,13 +794,13 @@ HostPopulateImportMeta(JSContext* aCx, JS::Handle<JSScript*> aScript,
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(aScript);
|
||||
|
||||
void* value = JS::GetTopLevelScriptPrivate(aScript);
|
||||
if (!value) {
|
||||
JS::Value value = JS::GetModuleHostDefinedField(aScript);
|
||||
if (value.isUndefined()) {
|
||||
JS_ReportErrorASCII(aCx, "Module script not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto script = static_cast<ModuleScript*>(value);
|
||||
auto script = static_cast<ModuleScript*>(value.toPrivate());
|
||||
MOZ_DIAGNOSTIC_ASSERT(script->Script() == aScript);
|
||||
|
||||
nsAutoCString url;
|
||||
|
||||
Reference in New Issue
Block a user