diff options
-rw-r--r-- | js/src/builtin/ModuleObject.cpp | 2 | ||||
-rw-r--r-- | js/src/frontend/BytecodeEmitter.cpp | 2 | ||||
-rw-r--r-- | js/src/frontend/Parser.cpp | 2 |
3 files changed, 3 insertions, 3 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* diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index c19ea6cff8..a6c7db32a8 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -9088,7 +9088,7 @@ BytecodeEmitter::emitTree(ParseNode* pn, ValueUsage valueUsage /* = ValueUsage:: break; case PNK_CALL_IMPORT: - if (!cx->asJSContext()->runtime()->moduleDynamicImportHook) { + if (!cx->compartment()->runtimeFromAnyThread()->moduleDynamicImportHook) { reportError(nullptr, JSMSG_NO_DYNAMIC_IMPORT); return false; } diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 5ed28e220c..8e52e8f1bb 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -10515,7 +10515,7 @@ Parser<ParseHandler>::importExpr(YieldHandling yieldHandling) MUST_MATCH_TOKEN_MOD(TOK_RP, TokenStream::Operand, JSMSG_PAREN_AFTER_ARGS); - if (!context->asJSContext()->runtime()->moduleDynamicImportHook && !abortIfSyntaxParser()) { + if (!context->compartment()->runtimeFromAnyThread()->moduleDynamicImportHook && !abortIfSyntaxParser()) { return null(); } |