diff options
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 4 | ||||
-rw-r--r-- | components/script/dom/bindings/utils.rs | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 820dfde8d63..7d71ff51160 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -3908,7 +3908,7 @@ if !expando.is_null() { %s let mut found = false; -if !GetPropertyOnPrototype(cx, proxy, id, &mut found, vp) { +if !get_property_on_prototype(cx, proxy, id, &mut found, vp) { return false; } @@ -4553,7 +4553,7 @@ class CGBindingRoot(CGThing): 'dom::bindings::utils::{DOMClass}', 'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}', 'dom::bindings::utils::{FindEnumStringIndex, GetArrayIndexFromId}', - 'dom::bindings::utils::{GetPropertyOnPrototype, get_proto_or_iface_array}', + 'dom::bindings::utils::{get_property_on_prototype, get_proto_or_iface_array}', 'dom::bindings::utils::HasPropertyOnPrototype', 'dom::bindings::utils::IsPlatformObject', 'dom::bindings::utils::{Reflectable}', diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 2df02a3ed18..674c38cbc53 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -410,8 +410,9 @@ impl Reflector { /// set to true and `*vp` to the value, otherwise `*found` is set to false. /// /// Returns false on JSAPI failure. -pub fn GetPropertyOnPrototype(cx: *mut JSContext, proxy: *mut JSObject, id: jsid, found: *mut bool, - vp: *mut JSVal) -> bool { +pub fn get_property_on_prototype(cx: *mut JSContext, proxy: *mut JSObject, + id: jsid, found: *mut bool, vp: *mut JSVal) + -> bool { unsafe { //let proto = GetObjectProto(proxy); let proto = JS_GetPrototype(proxy); @@ -553,7 +554,7 @@ pub fn get_dictionary_property(cx: *mut JSContext, pub fn HasPropertyOnPrototype(cx: *mut JSContext, proxy: *mut JSObject, id: jsid) -> bool { // MOZ_ASSERT(js::IsProxy(proxy) && js::GetProxyHandler(proxy) == handler); let mut found = false; - return !GetPropertyOnPrototype(cx, proxy, id, &mut found, ptr::null_mut()) || found; + return !get_property_on_prototype(cx, proxy, id, &mut found, ptr::null_mut()) || found; } /// Returns whether `obj` can be converted to a callback interface per IDL. |