@@ -698,7 +698,8 @@ struct napi_async_cleanup_hook_handle__ {
698
698
}
699
699
700
700
static void Hook (void * data, void (*done_cb)(void *), void* done_data) {
701
- auto handle = static_cast <napi_async_cleanup_hook_handle__*>(data);
701
+ napi_async_cleanup_hook_handle__* handle =
702
+ static_cast <napi_async_cleanup_hook_handle__*>(data);
702
703
handle->done_cb_ = done_cb;
703
704
handle->done_data_ = done_data;
704
705
handle->user_hook_ (handle, handle->user_data_ );
@@ -832,7 +833,7 @@ napi_status napi_async_init(napi_env env,
832
833
v8::Local<v8::String> v8_resource_name;
833
834
CHECK_TO_STRING (env, context, v8_resource_name, async_resource_name);
834
835
835
- auto async_context =
836
+ v8impl::AsyncContext* async_context =
836
837
new v8impl::AsyncContext (reinterpret_cast <node_napi_env>(env),
837
838
v8_resource,
838
839
v8_resource_name,
@@ -888,7 +889,7 @@ napi_status napi_make_callback(napi_env env,
888
889
reinterpret_cast <v8::Local<v8::Value>*>(const_cast <napi_value*>(argv)),
889
890
{0 , 0 });
890
891
} else {
891
- auto node_async_context =
892
+ v8impl::AsyncContext* node_async_context =
892
893
reinterpret_cast <v8impl::AsyncContext*>(async_context);
893
894
callback_result = node_async_context->MakeCallback (
894
895
v8recv,
@@ -917,7 +918,7 @@ napi_status napi_create_buffer(napi_env env,
917
918
NAPI_PREAMBLE (env);
918
919
CHECK_ARG (env, result);
919
920
920
- auto maybe = node::Buffer::New (env->isolate , length);
921
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::New (env->isolate , length);
921
922
922
923
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
923
924
@@ -948,11 +949,12 @@ napi_status napi_create_external_buffer(napi_env env,
948
949
env, finalize_cb, nullptr , finalize_hint,
949
950
v8impl::Finalizer::kKeepEnvReference );
950
951
951
- auto maybe = node::Buffer::New (isolate,
952
- static_cast <char *>(data),
953
- length,
954
- v8impl::BufferFinalizer::FinalizeBufferCallback,
955
- finalizer);
952
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::New (
953
+ isolate,
954
+ static_cast <char *>(data),
955
+ length,
956
+ v8impl::BufferFinalizer::FinalizeBufferCallback,
957
+ finalizer);
956
958
957
959
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
958
960
@@ -972,8 +974,9 @@ napi_status napi_create_buffer_copy(napi_env env,
972
974
NAPI_PREAMBLE (env);
973
975
CHECK_ARG (env, result);
974
976
975
- auto maybe = node::Buffer::Copy (env->isolate ,
976
- static_cast <const char *>(data), length);
977
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::Copy (
978
+ env->isolate ,
979
+ static_cast <const char *>(data), length);
977
980
978
981
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
979
982
0 commit comments