Rename GetPropertyOnPrototype to get_property_on_prototype.

This commit is contained in:
Ms2ger 2015-01-29 19:03:36 +01:00
parent 1af1302010
commit 747b6c4262
2 changed files with 6 additions and 5 deletions

View file

@ -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.