summaryrefslogtreecommitdiff
path: root/js/src/builtin/ModuleObject.cpp
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-04-18 11:00:34 -0500
committerBrian Smith <brian@dbsoft.org>2023-04-27 13:34:05 -0500
commitc961285752dd16bc0e2ef53dc4b06ce609b439e0 (patch)
treec4ec7cedadca49e177a8c98fe22f2b525ddad294 /js/src/builtin/ModuleObject.cpp
parenta28f3edf2a081c26a60236cc151a29d2ca99998f (diff)
downloaduxp-c961285752dd16bc0e2ef53dc4b06ce609b439e0.tar.gz
Issue #1691 - Part 6e: Fix problems due to divergent codebases. This gets basic dynamic import working.
Fix a problem in Part 5b where Mozilla used toGCThing() and we don't. Fix a problem in Part 4 where runtime() returns nullptr in our codebase since it runs on JS Helper thread. We need to get the runtime via runtimeFromAnyThread() instead. (cherry picked from commit dddb46225bbd1adff11f635e32934aee36923e47)
Diffstat (limited to 'js/src/builtin/ModuleObject.cpp')
-rw-r--r--js/src/builtin/ModuleObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp
index 5efd594b62..8e01ea2ac8 100644
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -842,7 +842,7 @@ ModuleObject::maybeScript() const
if (value.isUndefined())
return nullptr;
- return value.toGCThing()->as<JSScript>();
+ return static_cast<JSScript*>(value.toPrivate());
}
JSScript*