mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: make napi_create_reference accept symbol
PR-URL: https://github.com/nodejs/node/pull/39926 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
fc328f1ab0
commit
f74fe2a59c
3 files changed
+25
-3
No files matched your search
@@ -2454,9 +2454,9 @@ napi_status napi_create_reference(napi_env env,
|
||||
CHECK_ARG(env, result);
|
||||
|
||||
v8::Local<v8::Value> v8_value = v8impl::V8LocalValueFromJsValue(value);
|
||||
|
||||
if (!(v8_value->IsObject() || v8_value->IsFunction())) {
|
||||
return napi_set_last_error(env, napi_object_expected);
|
||||
if (!(v8_value->IsObject() || v8_value->IsFunction() ||
|
||||
v8_value->IsSymbol())) {
|
||||
return napi_set_last_error(env, napi_invalid_arg);
|
||||
}
|
||||
|
||||
v8impl::Reference* reference =
|
||||
|
||||
Reference in new issue
Block a user