Fix android compilation issue

This commit is contained in:
pandamicro 2015-11-30 15:20:57 +08:00
parent 43c68aa16b
commit 17bdfb4050
1 changed files with 4 additions and 2 deletions

View File

@ -302,7 +302,9 @@ JS_BINDED_CONSTRUCTOR_IMPL(JavascriptJavaBridge)
js_proxy_t *p;
jsval out;
JSObject *obj = JS_NewObject(cx, &JavascriptJavaBridge::js_class, JS::RootedObject(cx, JavascriptJavaBridge::js_proto), JS::RootedObject(cx, JavascriptJavaBridge::js_parent));
JS::RootedObject proto(cx, JavascriptJavaBridge::js_proto);
JS::RootedObject parentProto(cx, JavascriptJavaBridge::js_parent);
JS::RootedObject obj(cx, JS_NewObject(cx, &JavascriptJavaBridge::js_class, proto, parentProto));
if (obj) {
JS_SetPrivate(obj, jsj);
@ -310,7 +312,7 @@ JS_BINDED_CONSTRUCTOR_IMPL(JavascriptJavaBridge)
}
args.rval().set(out);
p =jsb_new_proxy(jsj, obj);
p = jsb_new_proxy(jsj, obj);
JS::AddNamedObjectRoot(cx, &p->obj, "JavascriptJavaBridge");
return true;