@@ -800,7 +800,7 @@ void MessagePort::OnMessage(MessageProcessingMode mode) {
800800
801801 HandleScope handle_scope (env ()->isolate ());
802802 Local<Context> context =
803- object (env ()->isolate ())->GetCreationContext (). ToLocalChecked ();
803+ object (env ()->isolate ())->GetCreationContextChecked ();
804804
805805 size_t processing_limit;
806806 if (mode == MessageProcessingMode::kNormalOperation ) {
@@ -1057,7 +1057,7 @@ bool GetTransferList(Environment* env,
10571057void MessagePort::PostMessage (const FunctionCallbackInfo<Value>& args) {
10581058 Environment* env = Environment::GetCurrent (args);
10591059 Local<Object> obj = args.This ();
1060- Local<Context> context = obj->GetCreationContext (). ToLocalChecked ();
1060+ Local<Context> context = obj->GetCreationContextChecked ();
10611061
10621062 if (args.Length () == 0 ) {
10631063 return THROW_ERR_MISSING_ARGS (env, " Not enough arguments to "
@@ -1143,9 +1143,9 @@ void MessagePort::ReceiveMessage(const FunctionCallbackInfo<Value>& args) {
11431143 return ;
11441144 }
11451145
1146- MaybeLocal<Value> payload = port-> ReceiveMessage (
1147- port->object ()-> GetCreationContext (). ToLocalChecked (),
1148- MessageProcessingMode::kForceReadMessages );
1146+ MaybeLocal<Value> payload =
1147+ port->ReceiveMessage (port-> object ()-> GetCreationContextChecked (),
1148+ MessageProcessingMode::kForceReadMessages );
11491149 if (!payload.IsEmpty ())
11501150 args.GetReturnValue ().Set (payload.ToLocalChecked ());
11511151}
@@ -1610,7 +1610,7 @@ static void MessageChannel(const FunctionCallbackInfo<Value>& args) {
16101610 return ;
16111611 }
16121612
1613- Local<Context> context = args.This ()->GetCreationContext (). ToLocalChecked ();
1613+ Local<Context> context = args.This ()->GetCreationContextChecked ();
16141614 Context::Scope context_scope (context);
16151615
16161616 MessagePort* port1 = MessagePort::New (env, context);
0 commit comments