diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/vm/GlobalObject.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -186,6 +186,9 @@ bool GlobalObject::skipDeselectedConstructor(JSContext* cx, JSProtoKey key) { #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<GlobalObject*> global, Handle<PropertyName*> 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)) { |