@@ -360,7 +360,7 @@ RtnValue ObjectTemplateNewInstance(TemplatePtr ptr, ContextPtr ctx) {
360
360
Local<Context> local_ctx = ctx->ptr .Get (iso);
361
361
Context::Scope context_scope (local_ctx);
362
362
363
- RtnValue rtn = {nullptr , nullptr };
363
+ RtnValue rtn = {};
364
364
365
365
Local<ObjectTemplate> obj_tmpl = tmpl.As <ObjectTemplate>();
366
366
Local<Object> obj;
@@ -378,7 +378,7 @@ RtnValue ObjectTemplateNewInstance(TemplatePtr ptr, ContextPtr ctx) {
378
378
}
379
379
380
380
void ObjectTemplateSetInternalFieldCount (TemplatePtr ptr,
381
- uint32_t field_count) {
381
+ int field_count) {
382
382
LOCAL_TEMPLATE (ptr);
383
383
384
384
Local<ObjectTemplate> obj_tmpl = tmpl.As <ObjectTemplate>();
@@ -460,7 +460,7 @@ RtnValue FunctionTemplateGetFunction(TemplatePtr ptr, ContextPtr ctx) {
460
460
Context::Scope context_scope (local_ctx);
461
461
462
462
Local<FunctionTemplate> fn_tmpl = tmpl.As <FunctionTemplate>();
463
- RtnValue rtn = {nullptr , nullptr };
463
+ RtnValue rtn = {};
464
464
Local<Function> fn;
465
465
if (!fn_tmpl->GetFunction (local_ctx).ToLocal (&fn)) {
466
466
rtn.error = ExceptionError (try_catch, iso, local_ctx);
@@ -531,7 +531,7 @@ void ContextFree(ContextPtr ctx) {
531
531
RtnValue RunScript (ContextPtr ctx, const char * source, const char * origin) {
532
532
LOCAL_CONTEXT (ctx);
533
533
534
- RtnValue rtn = {nullptr , nullptr };
534
+ RtnValue rtn = {};
535
535
536
536
MaybeLocal<String> maybeSrc =
537
537
String::NewFromUtf8 (iso, source, NewStringType::kNormal );
@@ -565,7 +565,7 @@ RtnValue RunScript(ContextPtr ctx, const char* source, const char* origin) {
565
565
566
566
RtnValue JSONParse (ContextPtr ctx, const char * str) {
567
567
LOCAL_CONTEXT (ctx);
568
- RtnValue rtn = {nullptr , nullptr };
568
+ RtnValue rtn = {};
569
569
570
570
Local<String> v8Str;
571
571
if (!String::NewFromUtf8 (iso, str, NewStringType::kNormal ).ToLocal (&v8Str)) {
@@ -679,7 +679,7 @@ ValuePtr NewValueIntegerFromUnsigned(IsolatePtr iso, uint32_t v) {
679
679
RtnValue NewValueString (IsolatePtr iso, const char * v) {
680
680
ISOLATE_SCOPE_INTERNAL_CONTEXT (iso);
681
681
TryCatch try_catch (iso);
682
- RtnValue rtn = {nullptr , nullptr };
682
+ RtnValue rtn = {};
683
683
Local<String> str;
684
684
if (!String::NewFromUtf8 (iso, v).ToLocal (&str)) {
685
685
rtn.error = ExceptionError (try_catch, iso, ctx->ptr .Get (iso));
@@ -760,7 +760,7 @@ RtnValue NewValueBigIntFromWords(IsolatePtr iso,
760
760
TryCatch try_catch (iso);
761
761
Local<Context> local_ctx = ctx->ptr .Get (iso);
762
762
763
- RtnValue rtn = {nullptr , nullptr };
763
+ RtnValue rtn = {};
764
764
Local<BigInt> bigint;
765
765
if (!BigInt::NewFromWords (local_ctx, sign_bit, word_count, words)
766
766
.ToLocal (&bigint)) {
@@ -809,7 +809,7 @@ double ValueToNumber(ValuePtr ptr) {
809
809
810
810
RtnString ValueToDetailString (ValuePtr ptr) {
811
811
LOCAL_VALUE (ptr);
812
- RtnString rtn = {nullptr , nullptr };
812
+ RtnString rtn = {0 };
813
813
Local<String> str;
814
814
if (!value->ToDetailString (local_ctx).ToLocal (&str)) {
815
815
rtn.error = ExceptionError (try_catch, iso, local_ctx);
@@ -852,7 +852,7 @@ ValueBigInt ValueToBigInt(ValuePtr ptr) {
852
852
853
853
RtnValue ValueToObject (ValuePtr ptr) {
854
854
LOCAL_VALUE (ptr);
855
- RtnValue rtn = {nullptr , nullptr };
855
+ RtnValue rtn = {};
856
856
Local<Object> obj;
857
857
if (!value->ToObject (local_ctx).ToLocal (&obj)) {
858
858
rtn.error = ExceptionError (try_catch, iso, local_ctx);
@@ -1163,7 +1163,7 @@ void ObjectSetIdx(ValuePtr ptr, uint32_t idx, ValuePtr prop_val) {
1163
1163
obj->Set (local_ctx, idx, prop_val->ptr .Get (iso)).Check ();
1164
1164
}
1165
1165
1166
- int ObjectSetInternalField (ValuePtr ptr, uint32_t idx, ValuePtr val_ptr) {
1166
+ int ObjectSetInternalField (ValuePtr ptr, int idx, ValuePtr val_ptr) {
1167
1167
LOCAL_OBJECT (ptr);
1168
1168
m_value* prop_val = static_cast <m_value*>(val_ptr);
1169
1169
@@ -1183,7 +1183,7 @@ int ObjectInternalFieldCount(ValuePtr ptr) {
1183
1183
1184
1184
RtnValue ObjectGet (ValuePtr ptr, const char * key) {
1185
1185
LOCAL_OBJECT (ptr);
1186
- RtnValue rtn = {nullptr , nullptr };
1186
+ RtnValue rtn = {};
1187
1187
1188
1188
Local<String> key_val;
1189
1189
if (!String::NewFromUtf8 (iso, key, NewStringType::kNormal )
@@ -1206,7 +1206,7 @@ RtnValue ObjectGet(ValuePtr ptr, const char* key) {
1206
1206
return rtn;
1207
1207
}
1208
1208
1209
- ValuePtr ObjectGetInternalField (ValuePtr ptr, uint32_t idx) {
1209
+ ValuePtr ObjectGetInternalField (ValuePtr ptr, int idx) {
1210
1210
LOCAL_OBJECT (ptr);
1211
1211
1212
1212
if (idx >= obj->InternalFieldCount ()) {
@@ -1226,7 +1226,7 @@ ValuePtr ObjectGetInternalField(ValuePtr ptr, uint32_t idx) {
1226
1226
1227
1227
RtnValue ObjectGetIdx (ValuePtr ptr, uint32_t idx) {
1228
1228
LOCAL_OBJECT (ptr);
1229
- RtnValue rtn = {nullptr , nullptr };
1229
+ RtnValue rtn = {};
1230
1230
1231
1231
Local<Value> result;
1232
1232
if (!obj->Get (local_ctx, idx).ToLocal (&result)) {
@@ -1271,7 +1271,7 @@ int ObjectDeleteIdx(ValuePtr ptr, uint32_t idx) {
1271
1271
1272
1272
RtnValue NewPromiseResolver (ContextPtr ctx) {
1273
1273
LOCAL_CONTEXT (ctx);
1274
- RtnValue rtn = {nullptr , nullptr };
1274
+ RtnValue rtn = {};
1275
1275
Local<Promise::Resolver> resolver;
1276
1276
if (!Promise::Resolver::New (local_ctx).ToLocal (&resolver)) {
1277
1277
rtn.error = ExceptionError (try_catch, iso, local_ctx);
@@ -1317,7 +1317,7 @@ int PromiseState(ValuePtr ptr) {
1317
1317
1318
1318
RtnValue PromiseThen (ValuePtr ptr, int callback_ref) {
1319
1319
LOCAL_VALUE (ptr)
1320
- RtnValue rtn = {nullptr , nullptr };
1320
+ RtnValue rtn = {};
1321
1321
Local<Promise> promise = value.As <Promise>();
1322
1322
Local<Integer> cbData = Integer::New (iso, callback_ref);
1323
1323
Local<Function> func;
@@ -1342,7 +1342,7 @@ RtnValue PromiseThen(ValuePtr ptr, int callback_ref) {
1342
1342
1343
1343
RtnValue PromiseThen2 (ValuePtr ptr, int on_fulfilled_ref, int on_rejected_ref) {
1344
1344
LOCAL_VALUE (ptr)
1345
- RtnValue rtn = {nullptr , nullptr };
1345
+ RtnValue rtn = {};
1346
1346
Local<Promise> promise = value.As <Promise>();
1347
1347
Local<Integer> onFulfilledData = Integer::New (iso, on_fulfilled_ref);
1348
1348
Local<Function> onFulfilledFunc;
@@ -1375,7 +1375,7 @@ RtnValue PromiseThen2(ValuePtr ptr, int on_fulfilled_ref, int on_rejected_ref) {
1375
1375
1376
1376
RtnValue PromiseCatch (ValuePtr ptr, int callback_ref) {
1377
1377
LOCAL_VALUE (ptr)
1378
- RtnValue rtn = {nullptr , nullptr };
1378
+ RtnValue rtn = {};
1379
1379
Local<Promise> promise = value.As <Promise>();
1380
1380
Local<Integer> cbData = Integer::New (iso, callback_ref);
1381
1381
Local<Function> func;
@@ -1424,7 +1424,7 @@ static void buildCallArguments(Isolate* iso,
1424
1424
RtnValue FunctionCall (ValuePtr ptr, ValuePtr recv, int argc, ValuePtr args[]) {
1425
1425
LOCAL_VALUE (ptr)
1426
1426
1427
- RtnValue rtn = {nullptr , nullptr };
1427
+ RtnValue rtn = {};
1428
1428
Local<Function> fn = Local<Function>::Cast (value);
1429
1429
Local<Value> argv[argc];
1430
1430
buildCallArguments (iso, argv, argc, args);
@@ -1446,7 +1446,7 @@ RtnValue FunctionCall(ValuePtr ptr, ValuePtr recv, int argc, ValuePtr args[]) {
1446
1446
1447
1447
RtnValue FunctionNewInstance (ValuePtr ptr, int argc, ValuePtr args[]) {
1448
1448
LOCAL_VALUE (ptr)
1449
- RtnValue rtn = {nullptr , nullptr };
1449
+ RtnValue rtn = {};
1450
1450
Local<Function> fn = Local<Function>::Cast (value);
1451
1451
Local<Value> argv[argc];
1452
1452
buildCallArguments (iso, argv, argc, args);
@@ -1465,7 +1465,6 @@ RtnValue FunctionNewInstance(ValuePtr ptr, int argc, ValuePtr args[]) {
1465
1465
1466
1466
ValuePtr FunctionSourceMapUrl (ValuePtr ptr) {
1467
1467
LOCAL_VALUE (ptr)
1468
- RtnValue rtn = {nullptr , nullptr };
1469
1468
Local<Function> fn = Local<Function>::Cast (value);
1470
1469
Local<Value> result = fn->GetScriptOrigin ().SourceMapUrl ();
1471
1470
m_value* rtnval = new m_value;
0 commit comments