diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-24 15:34:35 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-25 15:48:07 +0200 |
commit | 6c1167b1e2ec6939f88878aa21eebaab7dbe547e (patch) | |
tree | 7061edacf8f011f580893ae4ef69d434e34a029a /components/script/dom/bindings/utils.rs | |
parent | f70fa989547a256255ae74264ac6e906709b72f4 (diff) | |
download | servo-6c1167b1e2ec6939f88878aa21eebaab7dbe547e.tar.gz servo-6c1167b1e2ec6939f88878aa21eebaab7dbe547e.zip |
Pass the receiver to get_property_on_prototype (fixes #11600)
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r-- | components/script/dom/bindings/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 666dba519a4..030584c2755 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -29,7 +29,7 @@ use js::jsapi::{JS_GetProperty, JS_GetPrototype, JS_GetReservedSlot, JS_HasPrope use js::jsapi::{JS_HasPropertyById, JS_IsExceptionPending, JS_IsGlobalObject}; use js::jsapi::{JS_ResolveStandardClass, JS_SetProperty, ToWindowProxyIfWindow}; use js::jsapi::{JS_StringHasLatin1Chars, MutableHandleValue, ObjectOpResult}; -use js::jsval::{JSVal, ObjectValue, UndefinedValue}; +use js::jsval::{JSVal, UndefinedValue}; use js::rust::{GCMethods, ToString}; use libc; use std::ffi::CString; @@ -129,6 +129,7 @@ pub type ProtoOrIfaceArray = [*mut JSObject; PROTO_OR_IFACE_LENGTH]; /// Returns false on JSAPI failure. pub unsafe fn get_property_on_prototype(cx: *mut JSContext, proxy: HandleObject, + receiver: HandleValue, id: HandleId, found: *mut bool, vp: MutableHandleValue) @@ -148,8 +149,7 @@ pub unsafe fn get_property_on_prototype(cx: *mut JSContext, return true; } - rooted!(in(cx) let receiver = ObjectValue(&*proxy.get())); - JS_ForwardGetPropertyTo(cx, proto.handle(), id, receiver.handle(), vp) + JS_ForwardGetPropertyTo(cx, proto.handle(), id, receiver, vp) } /// Get an array index from the given `jsid`. Returns `None` if the given |