diff --git a/jsapi.rs b/jsapi.rs index 0a858a06c..3e12201b2 100644 --- a/jsapi.rs +++ b/jsapi.rs @@ -396,7 +396,9 @@ pub type JSCSPEvalChecker = *u8; pub type JSWrapObjectCallback = *u8; -pub type JSPreWrapCallback = *u8; +pub type JSPreWrapCallback = + Option *mut JSObject>; pub type JSSameCompartmentWrapObjectCallback = extern "C" fn(*JSContext, *JSObject) -> *JSObject; diff --git a/jsfriendapi.rs b/jsfriendapi.rs index 3b0f30caa..74bbdef06 100644 --- a/jsfriendapi.rs +++ b/jsfriendapi.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +use jsapi::{JSContext, JSObject}; + pub type JSJitPropertyOp = *u8; pub struct JSJitInfo { @@ -12,6 +14,11 @@ pub struct JSJitInfo { pub isConstant: bool } +extern { +pub fn JS_ObjectToOuterObject(cx: *mut JSContext, + obj: *mut JSObject) -> *mut JSObject; +} + //pub type JSJitInfo = JSJitInfo_struct; #[nolink]