Index: runtime/vm/isolate.cc |
=================================================================== |
--- runtime/vm/isolate.cc (revision 1762) |
+++ runtime/vm/isolate.cc (working copy) |
@@ -37,6 +37,7 @@ |
post_message_callback_(NULL), |
close_port_callback_(NULL), |
active_ports_(0), |
+ main_port_(0), |
heap_(NULL), |
object_store_(NULL), |
top_resource_(NULL), |
@@ -125,6 +126,7 @@ |
// TODO(5411455): Need to figure out how to set the stack limit for the |
// main thread. |
result->SetStackLimitFromCurrentTOS(reinterpret_cast<uword>(&result)); |
+ result->set_main_port(PortMap::CreatePort()); |
return result; |
} |
@@ -241,7 +243,7 @@ |
ASSERT(post_message_callback() == &StandardPostMessageCallback); |
ASSERT(close_port_callback() == &StandardClosePortCallback); |
- while (active_ports() > 0) { |
+ while (Dart_IsolateHasActivePorts()) { |
ASSERT(this == Isolate::Current()); |
Zone zone(this); |
HandleScope handle_scope(this); |