summaryrefslogtreecommitdiffstats
path: root/js/src/vm/GlobalObject.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /js/src/vm/GlobalObject.cpp
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm/GlobalObject.cpp')
-rw-r--r--js/src/vm/GlobalObject.cpp16
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)) {