fixed #2247: Using functions instead of macros to speeding up building for JSB project.

This commit is contained in:
James Chen 2013-06-03 22:31:24 +08:00
parent b8a4c08312
commit bba2d2bbdc
3 changed files with 35 additions and 3 deletions

View File

@ -1844,7 +1844,33 @@ JSBool jsb_get_reserved_slot(JSObject *obj, uint32_t idx, jsval& ret)
return JS_TRUE;
}
#pragma mark - Debugger
js_proxy_t* jsb_new_proxy(void* nativeObj, JSObject* jsObj)
{
js_proxy_t* p;
JS_NEW_PROXY(p, nativeObj, jsObj);
return p;
}
js_proxy_t* jsb_get_native_proxy(void* nativeObj)
{
js_proxy_t* p;
JS_GET_PROXY(p, nativeObj);
return p;
}
js_proxy_t* jsb_get_js_proxy(JSObject* jsObj)
{
js_proxy_t* p;
JS_GET_NATIVE_PROXY(p, jsObj);
return p;
}
void jsb_remove_proxy(js_proxy_t* nativeProxy, js_proxy_t* jsProxy)
{
JS_REMOVE_PROXY(nativeProxy, jsProxy);
}
//#pragma mark - Debugger
JSBool JSBDebug_StartDebugger(JSContext* cx, unsigned argc, jsval* vp)
{

View File

@ -313,4 +313,10 @@ private:
JSBool jsb_set_reserved_slot(JSObject *obj, uint32_t idx, jsval value);
JSBool jsb_get_reserved_slot(JSObject *obj, uint32_t idx, jsval& ret);
#endif
js_proxy_t* jsb_new_proxy(void* nativeObj, JSObject* jsObj);
js_proxy_t* jsb_get_native_proxy(void* nativeObj);
js_proxy_t* jsb_get_js_proxy(JSObject* jsObj);
void jsb_remove_proxy(js_proxy_t* nativeProxy, js_proxy_t* jsProxy);
#endif /* __SCRIPTING_CORE_H__ */

@ -1 +1 @@
Subproject commit 55541ddbc4be0d4a6594a59772d36526eedbf373
Subproject commit 2385ac363e94068c4b888f0c9d7730c88f52dfc9