@@ -141,7 +141,7 @@ ContextifyContext* ContextifyContext::New(Environment* env,
141
141
if (!(CreateV8Context (env->isolate (), object_template, snapshot_data, queue)
142
142
.ToLocal (&v8_context))) {
143
143
// Allocation failure, maximum call stack size reached, termination, etc.
144
- return nullptr ;
144
+ return {} ;
145
145
}
146
146
return New (v8_context, env, sandbox_obj, options);
147
147
}
@@ -254,7 +254,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
254
254
// things down significantly and they are only needed in rare occasions
255
255
// in the vm contexts.
256
256
if (InitializeContextRuntime (v8_context).IsNothing ()) {
257
- return nullptr ;
257
+ return {} ;
258
258
}
259
259
260
260
Local<Context> main_context = env->context ();
@@ -306,7 +306,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
306
306
ctor_name,
307
307
static_cast <v8::PropertyAttribute>(v8::DontEnum))
308
308
.IsNothing ()) {
309
- return nullptr ;
309
+ return {} ;
310
310
}
311
311
}
312
312
@@ -319,15 +319,15 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
319
319
env->host_defined_option_symbol (),
320
320
options->host_defined_options_id )
321
321
.IsNothing ()) {
322
- return nullptr ;
322
+ return {} ;
323
323
}
324
324
325
325
env->AssignToContext (v8_context, nullptr , info);
326
326
327
327
if (!env->contextify_wrapper_template ()
328
328
->NewInstance (v8_context)
329
329
.ToLocal (&wrapper)) {
330
- return nullptr ;
330
+ return {} ;
331
331
}
332
332
333
333
result = cppgc::MakeGarbageCollected<ContextifyContext>(
@@ -345,7 +345,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
345
345
->SetPrivate (
346
346
v8_context, env->contextify_context_private_symbol (), wrapper)
347
347
.IsNothing ()) {
348
- return nullptr ;
348
+ return {} ;
349
349
}
350
350
351
351
// Assign host_defined_options_id to the sandbox object or the global object
@@ -357,7 +357,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
357
357
env->host_defined_option_symbol (),
358
358
options->host_defined_options_id )
359
359
.IsNothing ()) {
360
- return nullptr ;
360
+ return {} ;
361
361
}
362
362
return result;
363
363
}
0 commit comments