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

Unified Diff: runtime/vm/message_handler.cc

Issue 11642048: Revert "Optimize the message queue for many active ports with few messages." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.cc
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index a3e2170486ac6915b5494ed3b7cf8714abd9a662..2727eac008468bc0392a31702063088a4bf8bd84 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
#include "vm/message_handler.h"
-#include "vm/port.h"
#include "vm/dart.h"
namespace dart {
@@ -151,7 +150,9 @@ bool MessageHandler::HandleMessages(bool allow_normal_messages,
monitor_.Exit();
Message::Priority saved_priority = message->priority();
result = HandleMessage(message);
+ // ASSERT(Isolate::Current() == NULL);
monitor_.Enter();
+
if (!result) {
// If we hit an error, we're done processing messages.
break;
@@ -237,6 +238,8 @@ void MessageHandler::ClosePort(Dart_Port port) {
"\tport: %"Pd64"\n",
name(), port);
}
+ queue_->Flush(port);
+ oob_queue_->Flush(port);
}
@@ -247,8 +250,8 @@ void MessageHandler::CloseAllPorts() {
"\thandler: %s\n",
name());
}
- queue_->Clear();
- oob_queue_->Clear();
+ queue_->FlushAll();
+ oob_queue_->FlushAll();
}
« no previous file with comments | « runtime/vm/message.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698