mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename getPropertyDescriptor to get_property_descriptor.
This commit is contained in:
parent
27e0f16407
commit
4b0c4e5ba2
3 changed files with 10 additions and 8 deletions
|
@ -2098,7 +2098,7 @@ class CGDefineProxyHandler(CGAbstractMethod):
|
|||
|
||||
body = """\
|
||||
let traps = ProxyTraps {
|
||||
getPropertyDescriptor: Some(getPropertyDescriptor as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, bool, *mut JSPropertyDescriptor) -> bool),
|
||||
getPropertyDescriptor: Some(get_property_descriptor as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, bool, *mut JSPropertyDescriptor) -> bool),
|
||||
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, bool, *mut JSPropertyDescriptor) -> bool),
|
||||
defineProperty: Some(%s as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, *mut JSPropertyDescriptor) -> bool),
|
||||
getOwnPropertyNames: Some(getOwnPropertyNames_ as unsafe extern "C" fn(*mut JSContext, *mut JSObject, *mut AutoIdVector) -> bool),
|
||||
|
@ -4582,7 +4582,7 @@ class CGBindingRoot(CGThing):
|
|||
'dom::bindings::proxyhandler',
|
||||
'dom::bindings::proxyhandler::{_obj_toString, defineProperty_}',
|
||||
'dom::bindings::proxyhandler::{FillPropertyDescriptor, GetExpandoObject}',
|
||||
'dom::bindings::proxyhandler::{delete_, getPropertyDescriptor}',
|
||||
'dom::bindings::proxyhandler::{delete_, get_property_descriptor}',
|
||||
'dom::bindings::proxyhandler::{getOwnPropertyNames_, enumerate_}',
|
||||
'dom::bindings::str::ByteString',
|
||||
'page::JSPageInfo',
|
||||
|
|
|
@ -31,10 +31,11 @@ static JSPROXYSLOT_EXPANDO: u32 = 0;
|
|||
/// with argument `id` and return the result, if it is not `undefined`.
|
||||
/// Otherwise, walk along the prototype chain to find a property with that
|
||||
/// name.
|
||||
pub unsafe extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObject,
|
||||
id: jsid, set: bool,
|
||||
desc: *mut JSPropertyDescriptor)
|
||||
-> bool {
|
||||
pub unsafe extern fn get_property_descriptor(cx: *mut JSContext,
|
||||
proxy: *mut JSObject,
|
||||
id: jsid, set: bool,
|
||||
desc: *mut JSPropertyDescriptor)
|
||||
-> bool {
|
||||
let handler = GetProxyHandler(proxy);
|
||||
if !InvokeGetOwnPropertyDescriptor(handler, cx, proxy, id, set, desc) {
|
||||
return false;
|
||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::conversions::{ToJSValConvertible};
|
|||
use dom::bindings::js::{JS, JSRef, Temporary, Root};
|
||||
use dom::bindings::js::{OptionalRootable, OptionalRootedRootable, ResultRootable};
|
||||
use dom::bindings::js::{OptionalRootedReference, OptionalOptionalRootedRootable};
|
||||
use dom::bindings::proxyhandler::{getPropertyDescriptor, FillPropertyDescriptor};
|
||||
use dom::bindings::proxyhandler::{get_property_descriptor, FillPropertyDescriptor};
|
||||
use dom::bindings::utils::{Reflectable, WindowProxyHandler};
|
||||
use dom::bindings::utils::{GetArrayIndexFromId};
|
||||
use dom::document::{Document, DocumentHelpers};
|
||||
|
@ -194,7 +194,8 @@ unsafe extern fn set(cx: *mut JSContext, proxy: *mut JSObject, _receiver: *mut J
|
|||
}
|
||||
|
||||
static PROXY_HANDLER: ProxyTraps = ProxyTraps {
|
||||
getPropertyDescriptor: Some(getPropertyDescriptor as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, bool, *mut JSPropertyDescriptor) -> bool),
|
||||
getPropertyDescriptor: Some(get_property_descriptor
|
||||
as unsafe extern "C" fn(*mut JSContext, *mut JSObject, jsid, bool, *mut JSPropertyDescriptor) -> bool),
|
||||
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor
|
||||
as unsafe extern "C" fn(*mut JSContext, *mut JSObject,
|
||||
jsid, bool, *mut JSPropertyDescriptor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue