Chromium Code Reviews| Index: runtime/vm/message_handler.h |
| =================================================================== |
| --- runtime/vm/message_handler.h (revision 37860) |
| +++ runtime/vm/message_handler.h (working copy) |
| @@ -71,6 +71,11 @@ |
| return control_ports_; |
| } |
| + bool paused() const { return paused_ > 0; } |
| + |
| + void increment_paused() { paused_++; } |
|
siva
2014/07/01 21:42:56
How do we ensure paused does not overflow?
Lasse Reichstein Nielsen
2014/07/02 08:11:55
If paused_ is an intptr_t, and we store one resume
siva
2014/07/02 14:52:10
True but instead of relying on that one needs to s
Ivan Posva
2014/07/03 12:51:17
Isolate::AddResumeCapability now prevents overflow
|
| + void decrement_paused() { paused_--; } |
|
siva
2014/07/01 21:42:56
ASSERT(paused_ > 0);
Ivan Posva
2014/07/03 12:51:17
Done.
|
| + |
| bool pause_on_start() const { |
| return pause_on_start_; |
| } |
| @@ -164,6 +169,7 @@ |
| MessageQueue* oob_queue_; |
| intptr_t control_ports_; // The number of open control ports usually 0 or 1. |
| intptr_t live_ports_; // The number of open ports, including control ports. |
| + intptr_t paused_; // The number of pause messages received. |
| bool pause_on_start_; |
| bool pause_on_exit_; |
| bool paused_on_exit_; |