From 9a3d6969c96bdae299f051e4411d9972858b66d0 Mon Sep 17 00:00:00 2001 From: Delan Azabani Date: Fri, 3 Mar 2023 21:00:44 +0800 Subject: [PATCH] migrate use of deprecated RUST_JS_{IS,TO}_STRING --- components/script/window_named_properties.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/script/window_named_properties.rs b/components/script/window_named_properties.rs index aeb8e3b20eb..289e4f7372d 100644 --- a/components/script/window_named_properties.rs +++ b/components/script/window_named_properties.rs @@ -11,8 +11,7 @@ use crate::dom::window::Window; use crate::js::conversions::ToJSValConvertible; use crate::script_runtime::JSContext as SafeJSContext; use js::conversions::jsstr_to_string; -use js::glue::RUST_JSID_TO_STRING; -use js::glue::{CreateProxyHandler, NewProxyObject, ProxyTraps, RUST_JSID_IS_STRING}; +use js::glue::{CreateProxyHandler, NewProxyObject, ProxyTraps}; use js::jsapi::JS_SetImmutablePrototype; use js::jsapi::{ Handle, HandleObject, JSClass, JSContext, JSErrNum, MutableHandleObject, UndefinedHandleValue, @@ -85,7 +84,7 @@ unsafe extern "C" fn get_own_property_descriptor( is_none: *mut bool, ) -> bool { let cx = SafeJSContext::from_ptr(cx); - if !RUST_JSID_IS_STRING(id) { + if !id.is_string() { // Nothing to do if we're resolving a non-string property. return true; } @@ -103,7 +102,7 @@ unsafe extern "C" fn get_own_property_descriptor( return true; } - let s = jsstr_to_string(*cx, RUST_JSID_TO_STRING(id)); + let s = jsstr_to_string(*cx, id.to_string()); if s.is_empty() { return true; }