From 02efe83180186bf00ed23f01e9fca7e278653cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BClker?= Date: Sat, 24 May 2025 16:41:10 +0200 Subject: [PATCH] Make unscopable objects writable and enumerable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Wülker --- components/script_bindings/interface.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/script_bindings/interface.rs b/components/script_bindings/interface.rs index 08ee0a4f420..2491924d0c0 100644 --- a/components/script_bindings/interface.rs +++ b/components/script_bindings/interface.rs @@ -18,9 +18,9 @@ use js::jsapi::{ JS_AtomizeAndPinString, JS_GetFunctionObject, JS_GetProperty, JS_IterateCompartments, JS_NewFunction, JS_NewGlobalObject, JS_NewObject, JS_NewPlainObject, JS_NewStringCopyN, JS_SetReservedSlot, JS_WrapObject, JSAutoRealm, JSClass, JSClassOps, JSContext, - JSFUN_CONSTRUCTOR, JSFunctionSpec, JSObject, JSPROP_PERMANENT, JSPROP_READONLY, - JSPROP_RESOLVING, JSPropertySpec, JSString, JSTracer, ObjectOps, OnNewGlobalHookOption, - SymbolCode, TrueHandleValue, Value, jsid, + JSFUN_CONSTRUCTOR, JSFunctionSpec, JSObject, JSPROP_ENUMERATE, JSPROP_PERMANENT, + JSPROP_READONLY, JSPROP_RESOLVING, JSPropertySpec, JSString, JSTracer, ObjectOps, + OnNewGlobalHookOption, SymbolCode, TrueHandleValue, Value, jsid, }; use js::jsval::{JSVal, NullValue, PrivateValue}; use js::rust::wrappers::{ @@ -481,7 +481,7 @@ fn create_unscopable_object(cx: SafeJSContext, names: &[&CStr], mut rval: Mutabl rval.handle(), name.as_ptr(), HandleValue::from_raw(TrueHandleValue), - JSPROP_READONLY as u32, + JSPROP_ENUMERATE as u32, )); } }