From 07f19496bd7703b502812a6b4228f08dec59ec0b Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 14 May 2014 12:15:33 +0200 Subject: [PATCH 1/2] Fix the JSPreWrapCallback definition. --- jsapi.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; From ff296137c652248138eb7f5a377d8daac52ed233 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 15 May 2014 20:57:50 +0200 Subject: [PATCH 2/2] Declare JS_ObjectToOuterObject. --- jsfriendapi.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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]