diff --git a/src/node_messaging.cc b/src/node_messaging.cc index f015f86ec2a121..503a58bd4f6391 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -785,7 +785,7 @@ void MessagePort::OnMessage(MessageProcessingMode mode) { size_t processing_limit; if (mode == MessageProcessingMode::kNormalOperation) { - Mutex::ScopedLock(data_->mutex_); + Mutex::ScopedLock lock(data_->mutex_); processing_limit = std::max(data_->incoming_messages_.size(), static_cast(1000)); } else {