diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/node_messaging.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_messaging.cc b/src/node_messaging.cc index aac1245f269..6403950e9c8 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -980,7 +980,7 @@ void MessagePort::PostMessage(const FunctionCallbackInfo<Value>& args) { // Even if the backing MessagePort object has already been deleted, we still // want to serialize the message to ensure spec-compliant behavior w.r.t. // transfers. - if (port == nullptr) { + if (port == nullptr || port->IsHandleClosing()) { Message msg; USE(msg.Serialize(env, context, args[0], transfer_list, obj)); return; |