diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-05-07 00:57:41 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-05-07 01:01:22 +0800 |
commit | e381dd84c21964c74e53adeed45322fe3fddfd85 (patch) | |
tree | 9a0de45cbbe15c072d74f280a59950627e871e38 /js/src/builtin | |
parent | 4b516daf135a58bfc140398ba5ade94fa82583c8 (diff) | |
download | uxp-e381dd84c21964c74e53adeed45322fe3fddfd85.tar.gz |
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
Diffstat (limited to 'js/src/builtin')
-rw-r--r-- | js/src/builtin/ModuleObject.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp index 3fc195499f..dd03017fc0 100644 --- a/js/src/builtin/ModuleObject.cpp +++ b/js/src/builtin/ModuleObject.cpp @@ -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; |