@@ -673,7 +673,8 @@ struct napi_async_cleanup_hook_handle__ {
673
673
}
674
674
675
675
static void Hook (void * data, void (*done_cb)(void *), void* done_data) {
676
- auto handle = static_cast <napi_async_cleanup_hook_handle__*>(data);
676
+ napi_async_cleanup_hook_handle__* handle =
677
+ static_cast <napi_async_cleanup_hook_handle__*>(data);
677
678
handle->done_cb_ = done_cb;
678
679
handle->done_data_ = done_data;
679
680
handle->user_hook_ (handle, handle->user_data_ );
@@ -807,7 +808,7 @@ napi_status napi_async_init(napi_env env,
807
808
v8::Local<v8::String> v8_resource_name;
808
809
CHECK_TO_STRING (env, context, v8_resource_name, async_resource_name);
809
810
810
- auto async_context =
811
+ v8impl::AsyncContext* async_context =
811
812
new v8impl::AsyncContext (reinterpret_cast <node_napi_env>(env),
812
813
v8_resource,
813
814
v8_resource_name,
@@ -863,7 +864,7 @@ napi_status napi_make_callback(napi_env env,
863
864
reinterpret_cast <v8::Local<v8::Value>*>(const_cast <napi_value*>(argv)),
864
865
{0 , 0 });
865
866
} else {
866
- auto node_async_context =
867
+ v8impl::AsyncContext* node_async_context =
867
868
reinterpret_cast <v8impl::AsyncContext*>(async_context);
868
869
callback_result = node_async_context->MakeCallback (
869
870
v8recv,
@@ -892,7 +893,7 @@ napi_status napi_create_buffer(napi_env env,
892
893
NAPI_PREAMBLE (env);
893
894
CHECK_ARG (env, result);
894
895
895
- auto maybe = node::Buffer::New (env->isolate , length);
896
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::New (env->isolate , length);
896
897
897
898
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
898
899
@@ -923,11 +924,12 @@ napi_status napi_create_external_buffer(napi_env env,
923
924
env, finalize_cb, nullptr , finalize_hint,
924
925
v8impl::Finalizer::kKeepEnvReference );
925
926
926
- auto maybe = node::Buffer::New (isolate,
927
- static_cast <char *>(data),
928
- length,
929
- v8impl::BufferFinalizer::FinalizeBufferCallback,
930
- finalizer);
927
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::New (
928
+ isolate,
929
+ static_cast <char *>(data),
930
+ length,
931
+ v8impl::BufferFinalizer::FinalizeBufferCallback,
932
+ finalizer);
931
933
932
934
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
933
935
@@ -947,8 +949,9 @@ napi_status napi_create_buffer_copy(napi_env env,
947
949
NAPI_PREAMBLE (env);
948
950
CHECK_ARG (env, result);
949
951
950
- auto maybe = node::Buffer::Copy (env->isolate ,
951
- static_cast <const char *>(data), length);
952
+ v8::MaybeLocal<v8::Object> maybe = node::Buffer::Copy (
953
+ env->isolate ,
954
+ static_cast <const char *>(data), length);
952
955
953
956
CHECK_MAYBE_EMPTY (env, maybe, napi_generic_failure);
954
957
0 commit comments