Index: runtime/vm/isolate.h |
=================================================================== |
--- runtime/vm/isolate.h (revision 37860) |
+++ runtime/vm/isolate.h (working copy) |
@@ -25,6 +25,7 @@ |
class AbstractType; |
class ApiState; |
class Array; |
+class Capability; |
class Class; |
class Code; |
class CodeIndexTable; |
@@ -165,6 +166,12 @@ |
ASSERT(main_port_ == 0); // Only set main port once. |
main_port_ = port; |
} |
+ void set_pause_capability(uint64_t value) { pause_capability_ = value; } |
+ uint64_t pause_capability() const { return pause_capability_; } |
+ void set_terminate_capability(uint64_t value) { |
+ terminate_capability_ = value; |
+ } |
+ uint64_t terminate_capability() const { return terminate_capability_; } |
Heap* heap() const { return heap_; } |
void set_heap(Heap* value) { heap_ = value; } |
@@ -354,6 +361,13 @@ |
return resume_request; |
} |
+ // Verify that the sender had the capability to pause this isolate. |
siva
2014/07/01 21:42:56
sender has
Ivan Posva
2014/07/03 12:51:17
Done.
|
+ bool VerifyPauseCapability(const Capability& capability); |
siva
2014/07/01 21:42:56
) const;
Ivan Posva
2014/07/03 12:51:16
Done.
|
+ // Returns true if the capability was added or removed from this isolate's |
+ // list of pause events. |
+ bool AddPauseCapability(const Capability& capability); |
Ivan Posva
2014/07/03 12:51:17
Renamed to resume capabilities and refactored the
|
+ bool RemovePauseCapability(const Capability& capability); |
+ |
Random* random() { return &random_; } |
Simulator* simulator() const { return simulator_; } |
@@ -593,6 +607,8 @@ |
char* name_; |
int64_t start_time_; |
Dart_Port main_port_; |
+ uint64_t pause_capability_; |
+ uint64_t terminate_capability_; |
Heap* heap_; |
ObjectStore* object_store_; |
RawContext* top_context_; |