window: avoid NonNull<JSObject> in NamedGetter (#35508)

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-02-17 13:48:21 +01:00 committed by GitHub
parent f5ed44c3aa
commit 56199fd153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 22 deletions

View file

@ -132,7 +132,7 @@ unsafe extern "C" fn get_own_property_descriptor(
let window = Root::downcast::<Window>(GlobalScope::from_object(proxy.get()))
.expect("global is not a window");
if let Some(obj) = window.NamedGetter(cx, s.into()) {
if let Some(obj) = window.NamedGetter(s.into()) {
rooted!(in(*cx) let mut rval = UndefinedValue());
obj.to_jsval(*cx, rval.handle_mut());
set_property_descriptor(