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

Unified Diff: runtime/vm/isolate.h

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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 1904)
+++ runtime/vm/isolate.h (working copy)
@@ -63,18 +63,35 @@
MessageQueue* message_queue() const { return message_queue_; }
void set_message_queue(MessageQueue* value) { message_queue_ = value; }
- // The count of active ports is only correct when read from the current
- // isolate. This value is not protected from being updated concurrently.
- intptr_t active_ports() const { return active_ports_; }
- void increment_active_ports() {
+ // The number of ports is only correct when read from the current
+ // isolate. This value is not protected from being updated
+ // concurrently.
+ intptr_t num_ports() const { return num_ports_; }
+ void increment_num_ports() {
ASSERT(this == Isolate::Current());
- active_ports_++;
+ num_ports_++;
}
- void decrement_active_ports() {
+ void decrement_num_ports() {
ASSERT(this == Isolate::Current());
- active_ports_--;
+ num_ports_--;
}
+ intptr_t live_ports() const { return live_ports_; }
+ void increment_live_ports() {
+ ASSERT(this == Isolate::Current());
+ live_ports_++;
+ }
+ void decrement_live_ports() {
+ ASSERT(this == Isolate::Current());
+ live_ports_--;
+ }
+
+ Dart_Port main_port() { return main_port_; }
+ void set_main_port(Dart_Port port) {
+ ASSERT(main_port_ == 0); // Only set main port once.
+ main_port_ = port;
+ }
+
Heap* heap() const { return heap_; }
void set_heap(Heap* value) { heap_ = value; }
static intptr_t heap_offset() { return OFFSET_OF(Isolate, heap_); }
@@ -240,7 +257,9 @@
MessageQueue* message_queue_;
Dart_PostMessageCallback post_message_callback_;
Dart_ClosePortCallback close_port_callback_;
- intptr_t active_ports_;
+ intptr_t num_ports_;
+ intptr_t live_ports_;
+ Dart_Port main_port_;
Heap* heap_;
ObjectStore* object_store_;
StackResource* top_resource_;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698