Home
last modified time | relevance | path

Searched refs:NAPI_CALL (Results 1 – 25 of 56) sorted by relevance

123

/third_party/node/test/js-native-api/test_object/
Dtest_object.c11 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in Get()
16 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in Get()
22 NAPI_CALL(env, napi_typeof(env, args[1], &valuetype1)); in Get()
29 NAPI_CALL(env, napi_get_property(env, object, args[1], &output)); in Get()
39 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in GetNamed()
44 NAPI_CALL(env, napi_typeof(env, args[0], &value_type0)); in GetNamed()
50 NAPI_CALL(env, napi_typeof(env, args[1], &value_type1)); in GetNamed()
56 NAPI_CALL(env, in GetNamed()
62 NAPI_CALL(env, napi_get_named_property(env, object, key, &output)); in GetNamed()
70 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in GetPropertyNames()
[all …]
Dtest_null.c9 NAPI_CALL(env, napi_create_object(env, &return_value)); in SetProperty()
10 NAPI_CALL(env, napi_create_object(env, &object)); in SetProperty()
11 NAPI_CALL(env, in SetProperty()
36 NAPI_CALL(env, napi_create_object(env, &return_value)); in GetProperty()
37 NAPI_CALL(env, napi_create_object(env, &object)); in GetProperty()
38 NAPI_CALL(env, in GetProperty()
65 NAPI_CALL(env, napi_create_object(env, &return_value)); in TestBoolValuedPropApi()
66 NAPI_CALL(env, napi_create_object(env, &object)); in TestBoolValuedPropApi()
67 NAPI_CALL(env, in TestBoolValuedPropApi()
104 NAPI_CALL(env, napi_create_object(env, &return_value)); in SetNamedProperty()
[all …]
/third_party/node/test/js-native-api/test_error/
Dtest_error.c7 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in checkError()
10 NAPI_CALL(env, napi_is_error(env, args[0], &r)); in checkError()
13 NAPI_CALL(env, napi_get_boolean(env, r, &result)); in checkError()
21 NAPI_CALL(env, napi_create_string_utf8( in throwExistingError()
23 NAPI_CALL(env, napi_create_error(env, NULL, message, &error)); in throwExistingError()
24 NAPI_CALL(env, napi_throw(env, error)); in throwExistingError()
29 NAPI_CALL(env, napi_throw_error(env, NULL, "error")); in throwError()
34 NAPI_CALL(env, napi_throw_range_error(env, NULL, "range error")); in throwRangeError()
39 NAPI_CALL(env, napi_throw_type_error(env, NULL, "type error")); in throwTypeError()
44 NAPI_CALL(env, napi_throw_error(env, "ERR_TEST_CODE", "Error [error]")); in throwErrorCode()
[all …]
/third_party/node/test/js-native-api/test_string/
Dtest_string.c9 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestLatin1()
14 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype)); in TestLatin1()
23 NAPI_CALL(env, in TestLatin1()
27 NAPI_CALL(env, napi_create_string_latin1(env, buffer, copied, &output)); in TestLatin1()
35 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestUtf8()
40 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype)); in TestUtf8()
49 NAPI_CALL(env, in TestUtf8()
53 NAPI_CALL(env, napi_create_string_utf8(env, buffer, copied, &output)); in TestUtf8()
61 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestUtf16()
66 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype)); in TestUtf16()
[all …]
/third_party/node/test/js-native-api/test_array/
Dtest_array.c8 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestGetElement()
13 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestGetElement()
19 NAPI_CALL(env, napi_typeof(env, args[1], &valuetype1)); in TestGetElement()
26 NAPI_CALL(env, napi_get_value_int32(env, args[1], &index)); in TestGetElement()
31 NAPI_CALL(env, napi_is_array(env, array, &isarray)); in TestGetElement()
38 NAPI_CALL(env, napi_get_array_length(env, array, &length)); in TestGetElement()
43 NAPI_CALL(env, napi_get_element(env, array, index, &ret)); in TestGetElement()
51 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestHasElement()
56 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestHasElement()
62 NAPI_CALL(env, napi_typeof(env, args[1], &valuetype1)); in TestHasElement()
[all …]
/third_party/node/test/js-native-api/test_general/
Dtest_general.c10 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in testStrictEquals()
14 NAPI_CALL(env, napi_strict_equals(env, args[0], args[1], &bool_result)); in testStrictEquals()
15 NAPI_CALL(env, napi_get_boolean(env, bool_result, &result)); in testStrictEquals()
23 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in testGetPrototype()
26 NAPI_CALL(env, napi_get_prototype(env, args[0], &result)); in testGetPrototype()
34 NAPI_CALL(env, napi_get_version(env, &version)); in testGetVersion()
35 NAPI_CALL(env, napi_create_uint32(env, version, &result)); in testGetVersion()
42 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in doInstanceOf()
45 NAPI_CALL(env, napi_instanceof(env, args[0], args[1], &instanceof)); in doInstanceOf()
48 NAPI_CALL(env, napi_get_boolean(env, instanceof, &result)); in doInstanceOf()
[all …]
/third_party/node/test/js-native-api/test_conversions/
Dtest_conversions.c8 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in AsBool()
11 NAPI_CALL(env, napi_get_value_bool(env, args[0], &value)); in AsBool()
14 NAPI_CALL(env, napi_get_boolean(env, value, &output)); in AsBool()
22 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in AsInt32()
25 NAPI_CALL(env, napi_get_value_int32(env, args[0], &value)); in AsInt32()
28 NAPI_CALL(env, napi_create_int32(env, value, &output)); in AsInt32()
36 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in AsUInt32()
39 NAPI_CALL(env, napi_get_value_uint32(env, args[0], &value)); in AsUInt32()
42 NAPI_CALL(env, napi_create_uint32(env, value, &output)); in AsUInt32()
50 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in AsInt64()
[all …]
/third_party/node/benchmark/napi/type-tag/
Dbinding.c5 #define NAPI_CALL(call) \ macro
14 NAPI_CALL(napi_create_function((env), \
20 NAPI_CALL(napi_set_named_property((env), \
37 NAPI_CALL(napi_get_cb_info(env, info, &argc, argv, NULL, NULL)); in TagObject()
38 NAPI_CALL(napi_get_value_uint32(env, argv[0], &n)); in TagObject()
39 NAPI_CALL(napi_open_handle_scope(env, &scope)); in TagObject()
42 NAPI_CALL(napi_create_object(env, &objects[index])); in TagObject()
46 NAPI_CALL(napi_call_function(env, argv[1], argv[2], 0, NULL, NULL)); in TagObject()
48 NAPI_CALL(napi_type_tag_object(env, objects[index], &tag)); in TagObject()
50 NAPI_CALL(napi_call_function(env, argv[1], argv[3], 1, &argv[0], NULL)); in TagObject()
[all …]
/third_party/node/test/js-native-api/test_typedarray/
Dtest_typedarray.c9 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in Multiply()
14 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in Multiply()
21 NAPI_CALL(env, napi_is_typedarray(env, input_array, &is_typedarray)); in Multiply()
27 NAPI_CALL(env, napi_typeof(env, args[1], &valuetype1)); in Multiply()
33 NAPI_CALL(env, napi_get_value_double(env, args[1], &multiplier)); in Multiply()
39 NAPI_CALL(env, napi_get_typedarray_info( in Multiply()
44 NAPI_CALL(env, napi_get_arraybuffer_info( in Multiply()
49 NAPI_CALL(env, napi_create_arraybuffer( in Multiply()
53 NAPI_CALL(env, napi_create_typedarray( in Multiply()
92 NAPI_CALL(env, napi_create_external_arraybuffer( in External()
[all …]
/third_party/node/test/node-api/test_async_context/
Dbinding.c13 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in MakeCallback()
27 NAPI_CALL(env, napi_typeof(env, func, &func_type)); in MakeCallback()
30 NAPI_CALL(env, napi_unwrap(env, async_context_wrap, (void**)&context)); in MakeCallback()
34 NAPI_CALL(env, napi_make_callback( in MakeCallback()
54 NAPI_CALL(env, napi_create_object(env, &async_context_wrap)); in CreateAsyncResource()
59 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in CreateAsyncResource()
64 NAPI_CALL(env, napi_typeof(env, resource, &resource_type)); in CreateAsyncResource()
70 NAPI_CALL(env, napi_create_string_utf8( in CreateAsyncResource()
74 NAPI_CALL(env, napi_async_init(env, resource, resource_name, &context)); in CreateAsyncResource()
78 NAPI_CALL(env, napi_get_value_bool(env, js_destroy_on_finalizer, &destroy_on_finalizer)); in CreateAsyncResource()
[all …]
/third_party/node/test/js-native-api/test_function/
Dtest_function.c9 NAPI_CALL(env, napi_create_object(env, &return_value)); in TestCreateFunctionParameters()
58 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestCallFunction()
63 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestCallFunction()
72 NAPI_CALL(env, napi_get_global(env, &global)); in TestCallFunction()
75 NAPI_CALL(env, napi_call_function(env, global, args[0], argc, argv, &result)); in TestCallFunction()
117 NAPI_CALL(env, napi_get_cb_info(env, in MakeTrackedFunction()
124 NAPI_CALL(env, napi_typeof(env, js_finalize_cb, &arg_type)); in MakeTrackedFunction()
129 NAPI_CALL(env, napi_create_function(env, in MakeTrackedFunction()
139 NAPI_CALL(env, napi_create_reference(env, in MakeTrackedFunction()
146 NAPI_CALL(env, napi_wrap(env, in MakeTrackedFunction()
[all …]
/third_party/node/test/js-native-api/test_bigint/
Dtest_bigint.c10 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in IsLossless()
13 NAPI_CALL(env, napi_get_value_bool(env, args[1], &is_signed)); in IsLossless()
19 NAPI_CALL(env, napi_get_value_bigint_int64(env, args[0], &input, &lossless)); in IsLossless()
22 NAPI_CALL(env, napi_get_value_bigint_uint64(env, args[0], &input, &lossless)); in IsLossless()
26 NAPI_CALL(env, napi_get_boolean(env, lossless, &output)); in IsLossless()
34 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestInt64()
39 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestInt64()
46 NAPI_CALL(env, napi_get_value_bigint_int64(env, args[0], &input, &lossless)); in TestInt64()
49 NAPI_CALL(env, napi_create_bigint_int64(env, input, &output)); in TestInt64()
57 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestUint64()
[all …]
/third_party/node/test/js-native-api/test_handle_scope/
Dtest_handle_scope.c14 NAPI_CALL(env, napi_open_handle_scope(env, &scope)); in NewScope()
15 NAPI_CALL(env, napi_create_object(env, &output)); in NewScope()
16 NAPI_CALL(env, napi_close_handle_scope(env, scope)); in NewScope()
25 NAPI_CALL(env, napi_open_escapable_handle_scope(env, &scope)); in NewScopeEscape()
26 NAPI_CALL(env, napi_create_object(env, &output)); in NewScopeEscape()
27 NAPI_CALL(env, napi_escape_handle(env, scope, output, &escapee)); in NewScopeEscape()
28 NAPI_CALL(env, napi_close_escapable_handle_scope(env, scope)); in NewScopeEscape()
38 NAPI_CALL(env, napi_open_escapable_handle_scope(env, &scope)); in NewScopeEscapeTwice()
39 NAPI_CALL(env, napi_create_object(env, &output)); in NewScopeEscapeTwice()
40 NAPI_CALL(env, napi_escape_handle(env, scope, output, &escapee)); in NewScopeEscapeTwice()
[all …]
/third_party/node/test/js-native-api/6_object_wrap/
D6_object_wrap.cc40 NAPI_CALL(env, napi_get_new_target(env, info, &new_target)); in New()
46 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, &_this, nullptr)); in New()
53 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype)); in New()
56 NAPI_CALL(env, napi_get_value_double(env, args[0], &value)); in New()
62 NAPI_CALL(env, napi_wrap(env, in New()
77 NAPI_CALL(env, napi_get_reference_value(env, constructor, &cons)); in New()
80 NAPI_CALL(env, napi_new_instance(env, cons, argc, argv, &instance)); in New()
87 NAPI_CALL(env, in GetValue()
91 NAPI_CALL(env, napi_unwrap(env, _this, reinterpret_cast<void**>(&obj))); in GetValue()
94 NAPI_CALL(env, napi_create_double(env, obj->value_, &num)); in GetValue()
[all …]
/third_party/node/test/js-native-api/test_number/
Dtest_number.c7 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in Test()
12 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in Test()
18 NAPI_CALL(env, napi_get_value_double(env, args[0], &input)); in Test()
21 NAPI_CALL(env, napi_create_double(env, input, &output)); in Test()
29 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestUint32Truncation()
34 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestUint32Truncation()
40 NAPI_CALL(env, napi_get_value_uint32(env, args[0], &input)); in TestUint32Truncation()
43 NAPI_CALL(env, napi_create_uint32(env, input, &output)); in TestUint32Truncation()
51 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in TestInt32Truncation()
56 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in TestInt32Truncation()
[all …]
/third_party/node/test/js-native-api/test_exception/
Dtest_exception.c9 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in returnException()
12 NAPI_CALL(env, napi_get_global(env, &global)); in returnException()
18 NAPI_CALL(env, napi_get_and_clear_last_exception(env, &ex)); in returnException()
28 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in constructReturnException()
34 NAPI_CALL(env, napi_get_and_clear_last_exception(env, &ex)); in constructReturnException()
44 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in allowException()
47 NAPI_CALL(env, napi_get_global(env, &global)); in allowException()
53 NAPI_CALL(env, napi_is_exception_pending(env, &exceptionWasPending)); in allowException()
60 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in constructAllowException()
66 NAPI_CALL(env, napi_is_exception_pending(env, &exceptionWasPending)); in constructAllowException()
[all …]
/third_party/node/test/node-api/test_general/
Dtest_general.c9 NAPI_CALL(env, napi_get_node_version(env, &node_version)); in testGetNodeVersion()
10 NAPI_CALL(env, napi_create_uint32(env, node_version->major, &major)); in testGetNodeVersion()
11 NAPI_CALL(env, napi_create_uint32(env, node_version->minor, &minor)); in testGetNodeVersion()
12 NAPI_CALL(env, napi_create_uint32(env, node_version->patch, &patch)); in testGetNodeVersion()
13 NAPI_CALL(env, napi_create_string_utf8(env, in testGetNodeVersion()
17 NAPI_CALL(env, napi_create_array_with_length(env, 4, &result)); in testGetNodeVersion()
18 NAPI_CALL(env, napi_set_element(env, result, 0, major)); in testGetNodeVersion()
19 NAPI_CALL(env, napi_set_element(env, result, 1, minor)); in testGetNodeVersion()
20 NAPI_CALL(env, napi_set_element(env, result, 2, patch)); in testGetNodeVersion()
21 NAPI_CALL(env, napi_set_element(env, result, 3, release)); in testGetNodeVersion()
[all …]
/third_party/node/test/js-native-api/test_reference/
Dtest_reference.c12 NAPI_CALL(env, napi_create_int32(env, finalize_count, &result)); in GetFinalizeCount()
27 NAPI_CALL(env, in CreateExternal()
43 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL,NULL)); in CreateSymbol()
48 NAPI_CALL(env, napi_create_symbol(env, args[0], &result_symbol)); in CreateSymbol()
55 NAPI_CALL(env, in CreateExternalWithFinalize()
69 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &arg, NULL, NULL)); in CheckExternal()
74 NAPI_CALL(env, napi_typeof(env, arg, &argtype)); in CheckExternal()
79 NAPI_CALL(env, napi_get_value_external(env, arg, &data)); in CheckExternal()
93 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in CreateReference()
97 NAPI_CALL(env, napi_get_value_uint32(env, args[1], &initial_refcount)); in CreateReference()
[all …]
/third_party/node/test/js-native-api/test_dataview/
Dtest_dataview.c8 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in CreateDataView()
15 NAPI_CALL(env, napi_typeof(env, arraybuffer, &valuetype0)); in CreateDataView()
21 NAPI_CALL(env, napi_is_arraybuffer(env, arraybuffer, &is_arraybuffer)); in CreateDataView()
27 NAPI_CALL(env, napi_typeof(env, args[1], &valuetype1)); in CreateDataView()
33 NAPI_CALL(env, napi_get_value_uint32(env, args[1], (uint32_t*)(&byte_offset))); in CreateDataView()
36 NAPI_CALL(env, napi_typeof(env, args[2], &valuetype2)); in CreateDataView()
42 NAPI_CALL(env, napi_get_value_uint32(env, args[2], (uint32_t*)(&length))); in CreateDataView()
45 NAPI_CALL(env, in CreateDataView()
55 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in CreateDataViewFromJSDataView()
62 NAPI_CALL(env, napi_typeof(env, input_dataview, &valuetype)); in CreateDataViewFromJSDataView()
[all …]
/third_party/node/test/js-native-api/test_new_target/
Dtest_new_target.c6 NAPI_CALL(env, napi_get_new_target(env, info, &newTargetArg)); in BaseClass()
8 NAPI_CALL(env, napi_get_cb_info(env, info, NULL, NULL, &thisArg, NULL)); in BaseClass()
10 NAPI_CALL(env, napi_get_undefined(env, &undefined)); in BaseClass()
14 NAPI_CALL(env, napi_strict_equals(env, newTargetArg, thisArg, &result)); in BaseClass()
19 NAPI_CALL(env, napi_strict_equals(env, newTargetArg, undefined, &result)); in BaseClass()
28 NAPI_CALL(env, napi_get_new_target(env, info, &newTargetArg)); in Constructor()
32 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &argv, &thisArg, NULL)); in Constructor()
34 NAPI_CALL(env, napi_get_undefined(env, &undefined)); in Constructor()
38 NAPI_CALL(env, napi_strict_equals(env, newTargetArg, undefined, &result)); in Constructor()
42 NAPI_CALL(env, napi_strict_equals(env, newTargetArg, argv, &result)); in Constructor()
[all …]
/third_party/node/test/js-native-api/test_properties/
Dtest_properties.c8 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, NULL, NULL, NULL)); in GetValue()
13 NAPI_CALL(env, napi_create_double(env, value_, &number)); in GetValue()
21 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in SetValue()
25 NAPI_CALL(env, napi_get_value_double(env, args[0], &value_)); in SetValue()
33 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in Echo()
43 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in HasNamedProperty()
50 NAPI_CALL(env, in HasNamedProperty()
56 NAPI_CALL(env, napi_has_named_property(env, args[0], buffer, &value)); in HasNamedProperty()
57 NAPI_CALL(env, napi_get_boolean(env, value, &result)); in HasNamedProperty()
65 NAPI_CALL(env, napi_create_double(env, value_, &number)); in Init()
[all …]
/third_party/node/test/node-api/test_async/
Dtest_async.c75 NAPI_CALL(env, in Test()
80 NAPI_CALL(env, napi_typeof(env, argv[0], &t)); in Test()
83 NAPI_CALL(env, napi_typeof(env, argv[1], &t)); in Test()
86 NAPI_CALL(env, napi_typeof(env, argv[2], &t)); in Test()
92 NAPI_CALL(env, in Test()
94 NAPI_CALL(env, in Test()
97 NAPI_CALL(env, napi_create_string_utf8( in Test()
99 NAPI_CALL(env, napi_create_async_work(env, argv[1], resource_name, in Test()
101 NAPI_CALL(env, in Test()
147 NAPI_CALL(env, napi_create_string_utf8( in TestCancel()
[all …]
/third_party/node/test/js-native-api/test_date/
Dtest_date.c7 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in createDate()
12 NAPI_CALL(env, napi_typeof(env, args[0], &valuetype0)); in createDate()
18 NAPI_CALL(env, napi_get_value_double(env, args[0], &time)); in createDate()
21 NAPI_CALL(env, napi_create_date(env, time, &date)); in createDate()
31 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &date, NULL, NULL)); in isDate()
32 NAPI_CALL(env, napi_is_date(env, date, &is_date)); in isDate()
33 NAPI_CALL(env, napi_get_boolean(env, is_date, &result)); in isDate()
43 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &date, NULL, NULL)); in getDateValue()
44 NAPI_CALL(env, napi_get_date_value(env, date, &value)); in getDateValue()
45 NAPI_CALL(env, napi_create_double(env, value, &result)); in getDateValue()
[all …]
/third_party/node/test/node-api/test_buffer/
Dtest_buffer.c28 NAPI_CALL(env, in newBuffer()
44 NAPI_CALL(env, in newExternalBuffer()
58 NAPI_CALL(env, napi_create_int32(env, deleterCallCount, &callCount)); in getDeleterCallCount()
64 NAPI_CALL(env, napi_create_buffer_copy( in copyBuffer()
72 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in bufferHasInstance()
77 NAPI_CALL(env, napi_typeof(env, theBuffer, &theType)); in bufferHasInstance()
81 NAPI_CALL(env, napi_is_buffer(env, theBuffer, &hasInstance)); in bufferHasInstance()
84 NAPI_CALL(env, napi_get_boolean(env, hasInstance, &returnValue)); in bufferHasInstance()
91 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); in bufferInfo()
97 NAPI_CALL(env, in bufferInfo()
[all …]
/third_party/node/test/js-native-api/test_promise/
Dtest_promise.c14 NAPI_CALL(env, napi_create_promise(env, &deferred, &promise)); in createPromise()
25 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, argv, NULL, NULL)); in concludeCurrentPromise()
26 NAPI_CALL(env, napi_get_value_bool(env, argv[1], &resolution)); in concludeCurrentPromise()
28 NAPI_CALL(env, napi_resolve_deferred(env, deferred, argv[0])); in concludeCurrentPromise()
30 NAPI_CALL(env, napi_reject_deferred(env, deferred, argv[0])); in concludeCurrentPromise()
43 NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &promise, NULL, NULL)); in isPromise()
44 NAPI_CALL(env, napi_is_promise(env, promise, &is_promise)); in isPromise()
45 NAPI_CALL(env, napi_get_boolean(env, is_promise, &result)); in isPromise()
58 NAPI_CALL(env, napi_define_properties( in Init()

123