diff --git a/shell/common/gin_helper/callback.cc b/shell/common/gin_helper/callback.cc index cd5a0a0952e6..b5342ebcb723 100644 --- a/shell/common/gin_helper/callback.cc +++ b/shell/common/gin_helper/callback.cc @@ -54,8 +54,7 @@ void CallTranslator(v8::Local external, args->ThrowTypeError("One-time callback was called more than once"); return; } else { - state->Set(context, called_symbol, v8::Boolean::New(isolate, true)) - .ToChecked(); + state->Set(context, called_symbol, v8::True(isolate)).ToChecked(); } } diff --git a/shell/common/gin_helper/event_emitter_caller.cc b/shell/common/gin_helper/event_emitter_caller.cc index 360c84bebffc..cc10c742a653 100644 --- a/shell/common/gin_helper/event_emitter_caller.cc +++ b/shell/common/gin_helper/event_emitter_caller.cc @@ -18,7 +18,7 @@ v8::Local CallMethodWithArgs( // CallbackScope and MakeCallback both require an active node::Environment if (!node::Environment::GetCurrent(isolate)) - return handle_scope.Escape(v8::Boolean::New(isolate, false)); + return handle_scope.Escape(v8::False(isolate)); node::CallbackScope callback_scope{isolate, v8::Object::New(isolate), node::async_context{0, 0}}; @@ -39,7 +39,7 @@ v8::Local CallMethodWithArgs( if (v8::Local localRet; ret.ToLocal(&localRet)) return handle_scope.Escape(localRet); - return handle_scope.Escape(v8::Boolean::New(isolate, false)); + return handle_scope.Escape(v8::False(isolate)); } } // namespace gin_helper::internal