Issue #2234 - Part 2: Ensure that the created async function wrapper is valid

This excludes the GC-related changes (cell pointer asserts) since we don't have them. This bug should be revisited if we'd ever plan on porting those asserts over.

Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1402649
This commit is contained in:
FranklinDM 2023-05-07 00:57:41 +08:00 committed by roytam1
commit e52da4707d

View file

@ -973,6 +973,9 @@ ModuleObject::instantiateFunctionDeclarations(JSContext* cx, HandleModuleObject
}
}
if (!obj)
return false;
value = ObjectValue(*obj);
if (!SetProperty(cx, env, funDecl.name->asPropertyName(), value))
return false;