diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-03 15:46:40 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-03 15:46:40 -0700 |
commit | 2c69278067a23703b251a69c875bee49449c6bfc (patch) | |
tree | 0b902bfe4f6d789aaa58aeaad0baf49734013b30 /components/script/dom/bindings/proxyhandler.rs | |
parent | fa4a8cb9db7896e59a5a2f4955c52665b4e959ef (diff) | |
parent | eb94f1a9182c369165ddbf040fcb97c408482689 (diff) | |
download | servo-2c69278067a23703b251a69c875bee49449c6bfc.tar.gz servo-2c69278067a23703b251a69c875bee49449c6bfc.zip |
Auto merge of #10756 - servo:smup, r=Ms2ger
Update SpiderMonkey
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10756)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/proxyhandler.rs')
-rw-r--r-- | components/script/dom/bindings/proxyhandler.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs index 31b5f3db2d0..f7505b77fc7 100644 --- a/components/script/dom/bindings/proxyhandler.rs +++ b/components/script/dom/bindings/proxyhandler.rs @@ -8,16 +8,15 @@ use dom::bindings::conversions::is_dom_proxy; use dom::bindings::utils::delete_property_by_id; -use js::JSPROP_GETTER; use js::glue::GetProxyExtra; use js::glue::InvokeGetOwnPropertyDescriptor; use js::glue::{GetProxyHandler, SetProxyExtra}; use js::jsapi::GetObjectProto; use js::jsapi::JS_GetPropertyDescriptorById; use js::jsapi::{Handle, HandleId, HandleObject, MutableHandle, ObjectOpResult, RootedObject}; -use js::jsapi::{JSContext, JSObject, JSPropertyDescriptor}; +use js::jsapi::{JSContext, JSObject, JSPROP_GETTER, PropertyDescriptor}; use js::jsapi::{JSErrNum, JS_StrictPropertyStub}; -use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto}; +use js::jsapi::{JS_DefinePropertyById, JS_NewObjectWithGivenProto}; use js::jsval::ObjectValue; use libc; use std::{mem, ptr}; @@ -31,7 +30,7 @@ static JSPROXYSLOT_EXPANDO: u32 = 0; pub unsafe extern "C" fn get_property_descriptor(cx: *mut JSContext, proxy: HandleObject, id: HandleId, - desc: MutableHandle<JSPropertyDescriptor>) + desc: MutableHandle<PropertyDescriptor>) -> bool { let handler = GetProxyHandler(proxy.get()); if !InvokeGetOwnPropertyDescriptor(handler, cx, proxy, id, desc) { @@ -54,7 +53,7 @@ pub unsafe extern "C" fn get_property_descriptor(cx: *mut JSContext, pub unsafe extern "C" fn define_property(cx: *mut JSContext, proxy: HandleObject, id: HandleId, - desc: Handle<JSPropertyDescriptor>, + desc: Handle<PropertyDescriptor>, result: *mut ObjectOpResult) -> bool { // FIXME: Workaround for https://github.com/rust-lang/rfcs/issues/718 @@ -67,7 +66,7 @@ pub unsafe extern "C" fn define_property(cx: *mut JSContext, } let expando = RootedObject::new(cx, ensure_expando_object(cx, proxy)); - JS_DefinePropertyById6(cx, expando.handle(), id, desc, result) + JS_DefinePropertyById(cx, expando.handle(), id, desc, result) } /// Deletes an expando off the given `proxy`. @@ -126,7 +125,7 @@ pub fn ensure_expando_object(cx: *mut JSContext, obj: HandleObject) -> *mut JSOb expando = JS_NewObjectWithGivenProto(cx, ptr::null_mut(), HandleObject::null()); assert!(!expando.is_null()); - SetProxyExtra(obj.get(), JSPROXYSLOT_EXPANDO, ObjectValue(&*expando)); + SetProxyExtra(obj.get(), JSPROXYSLOT_EXPANDO, &ObjectValue(&*expando)); } expando } @@ -134,7 +133,7 @@ pub fn ensure_expando_object(cx: *mut JSContext, obj: HandleObject) -> *mut JSOb /// Set the property descriptor's object to `obj` and set it to enumerable, /// and writable if `readonly` is true. -pub fn fill_property_descriptor(desc: &mut JSPropertyDescriptor, +pub fn fill_property_descriptor(desc: &mut PropertyDescriptor, obj: *mut JSObject, attrs: u32) { desc.obj = obj; |