Merge pull request #15429 from minggo/sync-v3

fix: compile in Windows
This commit is contained in:
minggo 2016-04-15 10:06:47 +08:00
commit 14c57c524f
2 changed files with 5 additions and 5 deletions

View File

@ -216,7 +216,7 @@ void removeJSObject(JSContext* cx, cocos2d::Ref* nativeObj)
auto proxy = jsb_get_native_proxy(nativeObj);
if (proxy)
{
#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS
JS::RemoveObjectRoot(cx, &proxy->obj);
#endif
// remove the proxy here, since this was a "stack" object, not heap
@ -2192,7 +2192,7 @@ JSObject* jsb_create_weak_jsobject(JSContext *cx, void *native, js_type_class_t
JS::RootedObject jsObj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
auto proxy = jsb_new_proxy(native, jsObj);
#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS
JS::AddNamedObjectRoot(cx, &proxy->obj, debug);
#else
#if COCOS2D_DEBUG > 1
@ -2262,7 +2262,7 @@ JSObject* jsb_get_or_create_weak_jsobject(JSContext *cx, void *native, js_type_c
JS::RootedObject jsObj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
proxy = jsb_new_proxy(native, jsObj);
#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS
JS::AddNamedObjectRoot(cx, &proxy->obj, debug);
#else
#if COCOS2D_DEBUG > 1

View File

@ -2215,7 +2215,7 @@ bool js_forceGC(JSContext *cx, uint32_t argc, jsval *vp) {
bool js_cocos2dx_retain(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Ref* cobj = (cocos2d::Ref *)(proxy ? proxy->ptr : NULL);
@ -2230,7 +2230,7 @@ bool js_cocos2dx_retain(JSContext *cx, uint32_t argc, jsval *vp)
bool js_cocos2dx_release(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
#if not CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#if ! CC_ENABLE_GC_FOR_NATIVE_OBJECTS
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Ref* cobj = (cocos2d::Ref *)(proxy ? proxy->ptr : NULL);