Index: runtime/vm/port.cc |
=================================================================== |
--- runtime/vm/port.cc (revision 1762) |
+++ runtime/vm/port.cc (working copy) |
@@ -90,7 +90,6 @@ |
Dart_Port PortMap::CreatePort() { |
Isolate* isolate = Isolate::Current(); |
- |
MutexLocker ml(mutex_); |
Entry entry; |
@@ -162,6 +161,9 @@ |
void PortMap::ClosePorts() { |
Isolate* isolate = Isolate::Current(); |
+ if (isolate->active_ports() == 0) { |
+ return; |
+ } |
{ |
MutexLocker ml(mutex_); |
for (intptr_t i = 0; i < capacity_; i++) { |