Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: runtime/vm/port.cc

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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++) {
« runtime/vm/isolate.cc ('K') | « runtime/vm/isolate.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698