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

Unified Diff: runtime/vm/message_handler.h

Issue 1122503003: Display isolate message queue in Observatory debugger (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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
Index: runtime/vm/message_handler.h
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index a2a07bf007c84f5dc1fe39e968a49cb465711076..990a4f1ed2a620e70f9d3b2a620ac7ca3f9dc92b 100644
--- a/runtime/vm/message_handler.h
+++ b/runtime/vm/message_handler.h
@@ -96,6 +96,38 @@ class MessageHandler {
return paused_on_exit_;
}
+ class AcquiredQueues : public ValueObject {
+ public:
+ AcquiredQueues();
+
+ ~AcquiredQueues();
+
+ MessageQueue* queue() {
+ if (handler_ == NULL) {
+ return NULL;
+ }
+ return handler_->queue_;
+ }
+
+ MessageQueue* oob_queue() {
+ if (handler_ == NULL) {
+ return NULL;
+ }
+ return handler_->oob_queue_;
+ }
+
+ private:
+ void Reset(MessageHandler* handler);
+
+ MessageHandler* handler_;
+
+ friend class MessageHandler;
+ };
+
+ // Gives temporary ownership of |queue| and |oob_queue|. Calling this
+ // has the side effect that no OOB messages will be handled if a stack
+ // overflow interrupt is delivered.
+ void AcquireQueues(AcquiredQueues* acquired_queue);
#if defined(DEBUG)
// Check that it is safe to access this message handler.
@@ -166,6 +198,7 @@ class MessageHandler {
Monitor monitor_; // Protects all fields in MessageHandler.
MessageQueue* queue_;
MessageQueue* oob_queue_;
+ bool oob_message_handling_allowed_;
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_;

Powered by Google App Engine
This is Rietveld 408576698