mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 02:52:39 +08:00
Merge pull request #773 from knoxHuang/v1.6
fix BaseJSAction error for fireball/issues/6264
This commit is contained in:
@@ -58,7 +58,8 @@ BaseJSAction *BaseJSAction::clone() const
|
||||
JS::RootedValue owner(cx, JS::ObjectOrNullValue(jsObj));
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(owner, "clone", JS::HandleValueArray::empty(), &retVal);
|
||||
|
||||
auto proxy = jsb_get_js_proxy(cx, jsObj);
|
||||
JS::RootedObject retObj(cx, retVal.toObjectOrNull());
|
||||
auto proxy = jsb_get_js_proxy(cx, retObj);
|
||||
BaseJSAction* action = (BaseJSAction *)(proxy ? proxy->ptr : nullptr);
|
||||
return action;
|
||||
}
|
||||
@@ -75,7 +76,8 @@ BaseJSAction *BaseJSAction::reverse() const
|
||||
JS::RootedValue owner(cx, JS::ObjectOrNullValue(jsObj));
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(owner, "reverse", JS::HandleValueArray::empty(), &retVal);
|
||||
|
||||
auto proxy = jsb_get_js_proxy(cx, jsObj);
|
||||
JS::RootedObject retObj(cx, retVal.toObjectOrNull());
|
||||
auto proxy = jsb_get_js_proxy(cx, retObj);
|
||||
BaseJSAction* action = (BaseJSAction *)(proxy ? proxy->ptr : nullptr);
|
||||
return action;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user