@@ -790,7 +790,7 @@ void MessagePort::OnMessage(MessageProcessingMode mode) {
790790
791791 HandleScope handle_scope (env ()->isolate ());
792792 Local<Context> context =
793- object (env ()->isolate ())->GetCreationContext (). ToLocalChecked ();
793+ object (env ()->isolate ())->GetCreationContextChecked ();
794794
795795 size_t processing_limit;
796796 if (mode == MessageProcessingMode::kNormalOperation ) {
@@ -1048,7 +1048,7 @@ bool GetTransferList(Environment* env,
10481048void MessagePort::PostMessage (const FunctionCallbackInfo<Value>& args) {
10491049 Environment* env = Environment::GetCurrent (args);
10501050 Local<Object> obj = args.This ();
1051- Local<Context> context = obj->GetCreationContext (). ToLocalChecked ();
1051+ Local<Context> context = obj->GetCreationContextChecked ();
10521052
10531053 if (args.Length () == 0 ) {
10541054 return THROW_ERR_MISSING_ARGS (env, " Not enough arguments to "
@@ -1134,9 +1134,9 @@ void MessagePort::ReceiveMessage(const FunctionCallbackInfo<Value>& args) {
11341134 return ;
11351135 }
11361136
1137- MaybeLocal<Value> payload = port-> ReceiveMessage (
1138- port->object ()-> GetCreationContext (). ToLocalChecked (),
1139- MessageProcessingMode::kForceReadMessages );
1137+ MaybeLocal<Value> payload =
1138+ port->ReceiveMessage (port-> object ()-> GetCreationContextChecked (),
1139+ MessageProcessingMode::kForceReadMessages );
11401140 if (!payload.IsEmpty ())
11411141 args.GetReturnValue ().Set (payload.ToLocalChecked ());
11421142}
@@ -1547,7 +1547,7 @@ static void MessageChannel(const FunctionCallbackInfo<Value>& args) {
15471547 return ;
15481548 }
15491549
1550- Local<Context> context = args.This ()->GetCreationContext (). ToLocalChecked ();
1550+ Local<Context> context = args.This ()->GetCreationContextChecked ();
15511551 Context::Scope context_scope (context);
15521552
15531553 MessagePort* port1 = MessagePort::New (env, context);
0 commit comments