Skip to content

Commit 1bfbf35

Browse files
CocosRobotminggo
authored andcommitted
[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#17830)
1 parent 52b35ac commit 1bfbf35

File tree

8 files changed

+461
-34
lines changed

8 files changed

+461
-34
lines changed

cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6704,25 +6704,19 @@ char
67046704

67056705
/**
67066706
* @method getString
6707-
* @param {char} arg0
6708-
* @param {char} arg1
67096707
* @return {char}
67106708
*/
67116709
getString : function (
6712-
char,
6713-
char
67146710
)
67156711
{
67166712
return 0;
67176713
},
67186714

67196715
/**
67206716
* @method getLong
6721-
* @param {char} arg0
67226717
* @return {long}
67236718
*/
67246719
getLong : function (
6725-
char
67266720
)
67276721
{
67286722
return 0;
@@ -6830,13 +6824,9 @@ char
68306824

68316825
/**
68326826
* @method getBool
6833-
* @param {char} arg0
6834-
* @param {bool} arg1
68356827
* @return {bool}
68366828
*/
68376829
getBool : function (
6838-
char,
6839-
bool
68406830
)
68416831
{
68426832
return false;
@@ -6858,11 +6848,9 @@ vec3
68586848

68596849
/**
68606850
* @method getType
6861-
* @param {char} arg0
68626851
* @return {cc.Properties::Type}
68636852
*/
68646853
getType : function (
6865-
char
68666854
)
68676855
{
68686856
return 0;
@@ -6880,11 +6868,9 @@ getNextNamespace : function (
68806868

68816869
/**
68826870
* @method getInt
6883-
* @param {char} arg0
68846871
* @return {int}
68856872
*/
68866873
getInt : function (
6887-
char
68886874
)
68896875
{
68906876
return 0;
@@ -6944,11 +6930,9 @@ getNextProperty : function (
69446930

69456931
/**
69466932
* @method getFloat
6947-
* @param {char} arg0
69486933
* @return {float}
69496934
*/
69506935
getFloat : function (
6951-
char
69526936
)
69536937
{
69546938
return 0;

cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17833,6 +17833,16 @@ bool js_cocos2dx_Properties_getVariable(JSContext *cx, uint32_t argc, jsval *vp)
1783317833
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1783417834
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1783517835
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getVariable : Invalid Native Object");
17836+
if (argc == 1) {
17837+
const char* arg0 = nullptr;
17838+
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
17839+
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_getVariable : Error processing arguments");
17840+
const char* ret = cobj->getVariable(arg0);
17841+
JS::RootedValue jsret(cx);
17842+
jsret = c_string_to_jsval(cx, ret);
17843+
args.rval().set(jsret);
17844+
return true;
17845+
}
1783617846
if (argc == 2) {
1783717847
const char* arg0 = nullptr;
1783817848
const char* arg1 = nullptr;
@@ -17846,7 +17856,7 @@ bool js_cocos2dx_Properties_getVariable(JSContext *cx, uint32_t argc, jsval *vp)
1784617856
return true;
1784717857
}
1784817858

17849-
JS_ReportError(cx, "js_cocos2dx_Properties_getVariable : wrong number of arguments: %d, was expecting %d", argc, 2);
17859+
JS_ReportError(cx, "js_cocos2dx_Properties_getVariable : wrong number of arguments: %d, was expecting %d", argc, 1);
1785017860
return false;
1785117861
}
1785217862
bool js_cocos2dx_Properties_getString(JSContext *cx, uint32_t argc, jsval *vp)
@@ -17857,6 +17867,23 @@ bool js_cocos2dx_Properties_getString(JSContext *cx, uint32_t argc, jsval *vp)
1785717867
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1785817868
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1785917869
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getString : Invalid Native Object");
17870+
if (argc == 0) {
17871+
const char* ret = cobj->getString();
17872+
JS::RootedValue jsret(cx);
17873+
jsret = c_string_to_jsval(cx, ret);
17874+
args.rval().set(jsret);
17875+
return true;
17876+
}
17877+
if (argc == 1) {
17878+
const char* arg0 = nullptr;
17879+
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
17880+
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_getString : Error processing arguments");
17881+
const char* ret = cobj->getString(arg0);
17882+
JS::RootedValue jsret(cx);
17883+
jsret = c_string_to_jsval(cx, ret);
17884+
args.rval().set(jsret);
17885+
return true;
17886+
}
1786017887
if (argc == 2) {
1786117888
const char* arg0 = nullptr;
1786217889
const char* arg1 = nullptr;
@@ -17870,7 +17897,7 @@ bool js_cocos2dx_Properties_getString(JSContext *cx, uint32_t argc, jsval *vp)
1787017897
return true;
1787117898
}
1787217899

17873-
JS_ReportError(cx, "js_cocos2dx_Properties_getString : wrong number of arguments: %d, was expecting %d", argc, 2);
17900+
JS_ReportError(cx, "js_cocos2dx_Properties_getString : wrong number of arguments: %d, was expecting %d", argc, 0);
1787417901
return false;
1787517902
}
1787617903
bool js_cocos2dx_Properties_getLong(JSContext *cx, uint32_t argc, jsval *vp)
@@ -17881,6 +17908,13 @@ bool js_cocos2dx_Properties_getLong(JSContext *cx, uint32_t argc, jsval *vp)
1788117908
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1788217909
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1788317910
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getLong : Invalid Native Object");
17911+
if (argc == 0) {
17912+
long ret = cobj->getLong();
17913+
JS::RootedValue jsret(cx);
17914+
jsret = long_to_jsval(cx, ret);
17915+
args.rval().set(jsret);
17916+
return true;
17917+
}
1788417918
if (argc == 1) {
1788517919
const char* arg0 = nullptr;
1788617920
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
@@ -17892,7 +17926,7 @@ bool js_cocos2dx_Properties_getLong(JSContext *cx, uint32_t argc, jsval *vp)
1789217926
return true;
1789317927
}
1789417928

17895-
JS_ReportError(cx, "js_cocos2dx_Properties_getLong : wrong number of arguments: %d, was expecting %d", argc, 1);
17929+
JS_ReportError(cx, "js_cocos2dx_Properties_getLong : wrong number of arguments: %d, was expecting %d", argc, 0);
1789617930
return false;
1789717931
}
1789817932
bool js_cocos2dx_Properties_getNamespace(JSContext *cx, uint32_t argc, jsval *vp)
@@ -18143,6 +18177,13 @@ bool js_cocos2dx_Properties_getBool(JSContext *cx, uint32_t argc, jsval *vp)
1814318177
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1814418178
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1814518179
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getBool : Invalid Native Object");
18180+
if (argc == 0) {
18181+
bool ret = cobj->getBool();
18182+
JS::RootedValue jsret(cx);
18183+
jsret = BOOLEAN_TO_JSVAL(ret);
18184+
args.rval().set(jsret);
18185+
return true;
18186+
}
1814618187
if (argc == 1) {
1814718188
const char* arg0 = nullptr;
1814818189
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
@@ -18166,7 +18207,7 @@ bool js_cocos2dx_Properties_getBool(JSContext *cx, uint32_t argc, jsval *vp)
1816618207
return true;
1816718208
}
1816818209

18169-
JS_ReportError(cx, "js_cocos2dx_Properties_getBool : wrong number of arguments: %d, was expecting %d", argc, 1);
18210+
JS_ReportError(cx, "js_cocos2dx_Properties_getBool : wrong number of arguments: %d, was expecting %d", argc, 0);
1817018211
return false;
1817118212
}
1817218213
bool js_cocos2dx_Properties_getColor(JSContext *cx, uint32_t argc, jsval *vp)
@@ -18239,6 +18280,13 @@ bool js_cocos2dx_Properties_getType(JSContext *cx, uint32_t argc, jsval *vp)
1823918280
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1824018281
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1824118282
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getType : Invalid Native Object");
18283+
if (argc == 0) {
18284+
int ret = (int)cobj->getType();
18285+
JS::RootedValue jsret(cx);
18286+
jsret = int32_to_jsval(cx, ret);
18287+
args.rval().set(jsret);
18288+
return true;
18289+
}
1824218290
if (argc == 1) {
1824318291
const char* arg0 = nullptr;
1824418292
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
@@ -18250,7 +18298,7 @@ bool js_cocos2dx_Properties_getType(JSContext *cx, uint32_t argc, jsval *vp)
1825018298
return true;
1825118299
}
1825218300

18253-
JS_ReportError(cx, "js_cocos2dx_Properties_getType : wrong number of arguments: %d, was expecting %d", argc, 1);
18301+
JS_ReportError(cx, "js_cocos2dx_Properties_getType : wrong number of arguments: %d, was expecting %d", argc, 0);
1825418302
return false;
1825518303
}
1825618304
bool js_cocos2dx_Properties_getNextNamespace(JSContext *cx, uint32_t argc, jsval *vp)
@@ -18283,6 +18331,13 @@ bool js_cocos2dx_Properties_getInt(JSContext *cx, uint32_t argc, jsval *vp)
1828318331
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1828418332
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1828518333
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getInt : Invalid Native Object");
18334+
if (argc == 0) {
18335+
int ret = cobj->getInt();
18336+
JS::RootedValue jsret(cx);
18337+
jsret = int32_to_jsval(cx, ret);
18338+
args.rval().set(jsret);
18339+
return true;
18340+
}
1828618341
if (argc == 1) {
1828718342
const char* arg0 = nullptr;
1828818343
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
@@ -18294,7 +18349,7 @@ bool js_cocos2dx_Properties_getInt(JSContext *cx, uint32_t argc, jsval *vp)
1829418349
return true;
1829518350
}
1829618351

18297-
JS_ReportError(cx, "js_cocos2dx_Properties_getInt : wrong number of arguments: %d, was expecting %d", argc, 1);
18352+
JS_ReportError(cx, "js_cocos2dx_Properties_getInt : wrong number of arguments: %d, was expecting %d", argc, 0);
1829818353
return false;
1829918354
}
1830018355
bool js_cocos2dx_Properties_getVec3(JSContext *cx, uint32_t argc, jsval *vp)
@@ -18411,6 +18466,13 @@ bool js_cocos2dx_Properties_getFloat(JSContext *cx, uint32_t argc, jsval *vp)
1841118466
js_proxy_t *proxy = jsb_get_js_proxy(obj);
1841218467
cocos2d::Properties* cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL);
1841318468
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getFloat : Invalid Native Object");
18469+
if (argc == 0) {
18470+
double ret = cobj->getFloat();
18471+
JS::RootedValue jsret(cx);
18472+
jsret = DOUBLE_TO_JSVAL(ret);
18473+
args.rval().set(jsret);
18474+
return true;
18475+
}
1841418476
if (argc == 1) {
1841518477
const char* arg0 = nullptr;
1841618478
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
@@ -18422,7 +18484,7 @@ bool js_cocos2dx_Properties_getFloat(JSContext *cx, uint32_t argc, jsval *vp)
1842218484
return true;
1842318485
}
1842418486

18425-
JS_ReportError(cx, "js_cocos2dx_Properties_getFloat : wrong number of arguments: %d, was expecting %d", argc, 1);
18487+
JS_ReportError(cx, "js_cocos2dx_Properties_getFloat : wrong number of arguments: %d, was expecting %d", argc, 0);
1842618488
return false;
1842718489
}
1842818490
bool js_cocos2dx_Properties_getQuaternionFromAxisAngle(JSContext *cx, uint32_t argc, jsval *vp)
@@ -18661,9 +18723,9 @@ void js_register_cocos2dx_Properties(JSContext *cx, JS::HandleObject global) {
1866118723
};
1866218724

1866318725
static JSFunctionSpec funcs[] = {
18664-
JS_FN("getVariable", js_cocos2dx_Properties_getVariable, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18665-
JS_FN("getString", js_cocos2dx_Properties_getString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18666-
JS_FN("getLong", js_cocos2dx_Properties_getLong, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18726+
JS_FN("getVariable", js_cocos2dx_Properties_getVariable, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18727+
JS_FN("getString", js_cocos2dx_Properties_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18728+
JS_FN("getLong", js_cocos2dx_Properties_getLong, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1866718729
JS_FN("getNamespace", js_cocos2dx_Properties_getNamespace, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1866818730
JS_FN("getPath", js_cocos2dx_Properties_getPath, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1866918731
JS_FN("getMat4", js_cocos2dx_Properties_getMat4, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@@ -18672,16 +18734,16 @@ void js_register_cocos2dx_Properties(JSContext *cx, JS::HandleObject global) {
1867218734
JS_FN("getId", js_cocos2dx_Properties_getId, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1867318735
JS_FN("rewind", js_cocos2dx_Properties_rewind, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1867418736
JS_FN("setVariable", js_cocos2dx_Properties_setVariable, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18675-
JS_FN("getBool", js_cocos2dx_Properties_getBool, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18737+
JS_FN("getBool", js_cocos2dx_Properties_getBool, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1867618738
JS_FN("getColor", js_cocos2dx_Properties_getColor, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18677-
JS_FN("getType", js_cocos2dx_Properties_getType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18739+
JS_FN("getType", js_cocos2dx_Properties_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1867818740
JS_FN("getNextNamespace", js_cocos2dx_Properties_getNextNamespace, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18679-
JS_FN("getInt", js_cocos2dx_Properties_getInt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18741+
JS_FN("getInt", js_cocos2dx_Properties_getInt, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868018742
JS_FN("getVec3", js_cocos2dx_Properties_getVec3, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868118743
JS_FN("getVec2", js_cocos2dx_Properties_getVec2, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868218744
JS_FN("getVec4", js_cocos2dx_Properties_getVec4, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868318745
JS_FN("getNextProperty", js_cocos2dx_Properties_getNextProperty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18684-
JS_FN("getFloat", js_cocos2dx_Properties_getFloat, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18746+
JS_FN("getFloat", js_cocos2dx_Properties_getFloat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868518747
JS_FN("getQuaternionFromAxisAngle", js_cocos2dx_Properties_getQuaternionFromAxisAngle, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1868618748
JS_FS_END
1868718749
};

cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,111 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv
13991399
}
14001400
} while(0);
14011401

1402+
do {
1403+
if (argc == 1) {
1404+
cocosbuilder::NodeLoaderLibrary* arg0 = nullptr;
1405+
do {
1406+
if (args.get(0).isNull()) { arg0 = nullptr; break; }
1407+
if (!args.get(0).isObject()) { ok = false; break; }
1408+
js_proxy_t *jsProxy;
1409+
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
1410+
jsProxy = jsb_get_js_proxy(tmpObj);
1411+
arg0 = (cocosbuilder::NodeLoaderLibrary*)(jsProxy ? jsProxy->ptr : NULL);
1412+
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
1413+
} while (0);
1414+
if (!ok) { ok = true; break; }
1415+
cobj = new (std::nothrow) cocosbuilder::CCBReader(arg0);
1416+
1417+
js_type_class_t *typeClass = js_get_type_from_native<cocosbuilder::CCBReader>(cobj);
1418+
JS::RootedObject proto(cx, typeClass->proto.ref());
1419+
JS::RootedObject parent(cx, typeClass->parentProto.ref());
1420+
obj = JS_NewObject(cx, typeClass->jsclass, proto, parent);
1421+
js_proxy_t* p = jsb_new_proxy(cobj, obj);
1422+
jsb_ref_init(cx, &p->obj, cobj, "cocosbuilder::CCBReader");
1423+
}
1424+
} while(0);
1425+
1426+
do {
1427+
if (argc == 2) {
1428+
cocosbuilder::NodeLoaderLibrary* arg0 = nullptr;
1429+
do {
1430+
if (args.get(0).isNull()) { arg0 = nullptr; break; }
1431+
if (!args.get(0).isObject()) { ok = false; break; }
1432+
js_proxy_t *jsProxy;
1433+
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
1434+
jsProxy = jsb_get_js_proxy(tmpObj);
1435+
arg0 = (cocosbuilder::NodeLoaderLibrary*)(jsProxy ? jsProxy->ptr : NULL);
1436+
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
1437+
} while (0);
1438+
if (!ok) { ok = true; break; }
1439+
cocosbuilder::CCBMemberVariableAssigner* arg1 = nullptr;
1440+
do {
1441+
if (args.get(1).isNull()) { arg1 = nullptr; break; }
1442+
if (!args.get(1).isObject()) { ok = false; break; }
1443+
js_proxy_t *jsProxy;
1444+
JS::RootedObject tmpObj(cx, args.get(1).toObjectOrNull());
1445+
jsProxy = jsb_get_js_proxy(tmpObj);
1446+
arg1 = (cocosbuilder::CCBMemberVariableAssigner*)(jsProxy ? jsProxy->ptr : NULL);
1447+
JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object");
1448+
} while (0);
1449+
if (!ok) { ok = true; break; }
1450+
cobj = new (std::nothrow) cocosbuilder::CCBReader(arg0, arg1);
1451+
1452+
js_type_class_t *typeClass = js_get_type_from_native<cocosbuilder::CCBReader>(cobj);
1453+
JS::RootedObject proto(cx, typeClass->proto.ref());
1454+
JS::RootedObject parent(cx, typeClass->parentProto.ref());
1455+
obj = JS_NewObject(cx, typeClass->jsclass, proto, parent);
1456+
js_proxy_t* p = jsb_new_proxy(cobj, obj);
1457+
jsb_ref_init(cx, &p->obj, cobj, "cocosbuilder::CCBReader");
1458+
}
1459+
} while(0);
1460+
1461+
do {
1462+
if (argc == 3) {
1463+
cocosbuilder::NodeLoaderLibrary* arg0 = nullptr;
1464+
do {
1465+
if (args.get(0).isNull()) { arg0 = nullptr; break; }
1466+
if (!args.get(0).isObject()) { ok = false; break; }
1467+
js_proxy_t *jsProxy;
1468+
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
1469+
jsProxy = jsb_get_js_proxy(tmpObj);
1470+
arg0 = (cocosbuilder::NodeLoaderLibrary*)(jsProxy ? jsProxy->ptr : NULL);
1471+
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
1472+
} while (0);
1473+
if (!ok) { ok = true; break; }
1474+
cocosbuilder::CCBMemberVariableAssigner* arg1 = nullptr;
1475+
do {
1476+
if (args.get(1).isNull()) { arg1 = nullptr; break; }
1477+
if (!args.get(1).isObject()) { ok = false; break; }
1478+
js_proxy_t *jsProxy;
1479+
JS::RootedObject tmpObj(cx, args.get(1).toObjectOrNull());
1480+
jsProxy = jsb_get_js_proxy(tmpObj);
1481+
arg1 = (cocosbuilder::CCBMemberVariableAssigner*)(jsProxy ? jsProxy->ptr : NULL);
1482+
JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object");
1483+
} while (0);
1484+
if (!ok) { ok = true; break; }
1485+
cocosbuilder::CCBSelectorResolver* arg2 = nullptr;
1486+
do {
1487+
if (args.get(2).isNull()) { arg2 = nullptr; break; }
1488+
if (!args.get(2).isObject()) { ok = false; break; }
1489+
js_proxy_t *jsProxy;
1490+
JS::RootedObject tmpObj(cx, args.get(2).toObjectOrNull());
1491+
jsProxy = jsb_get_js_proxy(tmpObj);
1492+
arg2 = (cocosbuilder::CCBSelectorResolver*)(jsProxy ? jsProxy->ptr : NULL);
1493+
JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object");
1494+
} while (0);
1495+
if (!ok) { ok = true; break; }
1496+
cobj = new (std::nothrow) cocosbuilder::CCBReader(arg0, arg1, arg2);
1497+
1498+
js_type_class_t *typeClass = js_get_type_from_native<cocosbuilder::CCBReader>(cobj);
1499+
JS::RootedObject proto(cx, typeClass->proto.ref());
1500+
JS::RootedObject parent(cx, typeClass->parentProto.ref());
1501+
obj = JS_NewObject(cx, typeClass->jsclass, proto, parent);
1502+
js_proxy_t* p = jsb_new_proxy(cobj, obj);
1503+
jsb_ref_init(cx, &p->obj, cobj, "cocosbuilder::CCBReader");
1504+
}
1505+
} while(0);
1506+
14021507
do {
14031508
if (argc == 4) {
14041509
cocosbuilder::NodeLoaderLibrary* arg0 = nullptr;

0 commit comments

Comments
 (0)