diff --git a/src/node_contextify.cc b/src/node_contextify.cc index d5c380febc46e0..ab6659d8cdccc6 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -141,7 +141,7 @@ ContextifyContext* ContextifyContext::New(Environment* env, if (!(CreateV8Context(env->isolate(), object_template, snapshot_data, queue) .ToLocal(&v8_context))) { // Allocation failure, maximum call stack size reached, termination, etc. - return nullptr; + return {}; } return New(v8_context, env, sandbox_obj, options); } @@ -254,7 +254,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, // things down significantly and they are only needed in rare occasions // in the vm contexts. if (InitializeContextRuntime(v8_context).IsNothing()) { - return nullptr; + return {}; } Local main_context = env->context(); @@ -306,7 +306,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, ctor_name, static_cast(v8::DontEnum)) .IsNothing()) { - return nullptr; + return {}; } } @@ -319,7 +319,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, env->host_defined_option_symbol(), options->host_defined_options_id) .IsNothing()) { - return nullptr; + return {}; } env->AssignToContext(v8_context, nullptr, info); @@ -327,7 +327,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, if (!env->contextify_wrapper_template() ->NewInstance(v8_context) .ToLocal(&wrapper)) { - return nullptr; + return {}; } result = cppgc::MakeGarbageCollected( @@ -345,7 +345,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, ->SetPrivate( v8_context, env->contextify_context_private_symbol(), wrapper) .IsNothing()) { - return nullptr; + return {}; } // Assign host_defined_options_id to the sandbox object or the global object @@ -357,7 +357,7 @@ ContextifyContext* ContextifyContext::New(Local v8_context, env->host_defined_option_symbol(), options->host_defined_options_id) .IsNothing()) { - return nullptr; + return {}; } return result; } diff --git a/src/node_contextify.h b/src/node_contextify.h index 9bce5df1c7c508..9ca611319ce1c5 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -4,7 +4,6 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "base_object-inl.h" -#include "cppgc/prefinalizer.h" #include "cppgc_helpers.h" #include "node_context_data.h" #include "node_errors.h"