From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- js/src/vm/GlobalObject.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js/src/vm/GlobalObject.cpp') diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index 6782433fd3..8bdfd3ee75 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -185,6 +185,9 @@ bool GlobalObject::skipDeselectedConstructor(JSContext* cx, JSProtoKey key) { case JSProto_WasmTag: #ifdef ENABLE_WASM_TYPE_REFLECTIONS case JSProto_WasmFunction: +#endif +#ifdef ENABLE_WASM_JSPI + case JSProto_WasmSuspending: #endif case JSProto_WasmException: return false; @@ -241,6 +244,11 @@ bool GlobalObject::skipDeselectedConstructor(JSContext* cx, JSProtoKey key) { case JSProto_ShadowRealm: return !JS::Prefs::experimental_shadow_realms(); +#ifdef NIGHTLY_BUILD + case JSProto_Float16Array: + return !JS::Prefs::experimental_float16array(); +#endif + default: MOZ_CRASH("unexpected JSProtoKey"); } @@ -920,6 +928,10 @@ bool GlobalObject::getSelfHostedFunction(JSContext* cx, return true; } + // Don't collect metadata for self-hosted functions or intrinsics. + // This is similar to the suppression in GlobalObject::resolveConstructor. + AutoSuppressAllocationMetadataBuilder suppressMetadata(cx); + JSRuntime* runtime = cx->runtime(); frontend::ScriptIndex index = runtime->getSelfHostedScriptIndexRange(selfHostedName)->start; @@ -940,6 +952,10 @@ bool GlobalObject::getIntrinsicValueSlow(JSContext* cx, Handle global, Handle name, MutableHandleValue value) { + // Don't collect metadata for self-hosted functions or intrinsics. + // This is similar to the suppression in GlobalObject::resolveConstructor. + AutoSuppressAllocationMetadataBuilder suppressMetadata(cx); + // If this is a C++ intrinsic, simply define the function on the intrinsics // holder. if (const JSFunctionSpec* spec = js::FindIntrinsicSpec(name)) { -- cgit v1.2.3