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), |
siva
2011/11/24 00:52:31
maybe -1 would be better value or we should have a
turnidge
2011/11/29 01:01:31
There is already an assert in PortMap::AllocatePor
|
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_HasLivePorts()) { |
siva
2011/11/24 00:52:31
Seems pretty expensive to call a dart function fro
turnidge
2011/11/29 01:01:31
Now this uses live_ports() > 0.
|
ASSERT(this == Isolate::Current()); |
Zone zone(this); |
HandleScope handle_scope(this); |