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

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
« no previous file with comments | « runtime/vm/message.cc ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.h
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index a2a07bf007c84f5dc1fe39e968a49cb465711076..07fa5ab09b7a80c9240434f0b1f30a7cc11617c8 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,9 @@ class MessageHandler {
Monitor monitor_; // Protects all fields in MessageHandler.
MessageQueue* queue_;
MessageQueue* oob_queue_;
+ // This flag is not thread safe and can only reliably be accessed on a single
+ // thread.
+ 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_;
« no previous file with comments | « runtime/vm/message.cc ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698