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

Unified Diff: runtime/vm/message.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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.h ('k') | runtime/vm/message_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message.cc
diff --git a/runtime/vm/message.cc b/runtime/vm/message.cc
index 0cb618a9932125c19f1d62ff249485e9378f8b3c..4d5fc31216e243663520927bfbab1578fe91f42a 100644
--- a/runtime/vm/message.cc
+++ b/runtime/vm/message.cc
@@ -30,10 +30,10 @@ const char* Message::PriorityAsString(Priority priority) {
switch (priority) {
case kNormalPriority:
return "Normal";
- break;
+ break;
case kOOBPriority:
return "OOB";
- break;
+ break;
default:
UNIMPLEMENTED();
return NULL;
@@ -65,9 +65,9 @@ void MessageQueue::Enqueue(Message* msg, bool before_events) {
} else {
ASSERT(tail_ != NULL);
if (!before_events) {
- // Append at the tail.
- tail_->next_ = msg;
- tail_ = msg;
+ // Append at the tail.
+ tail_->next_ = msg;
+ tail_ = msg;
} else {
ASSERT(msg->dest_port() == Message::kIllegalPort);
if (head_->dest_port() != Message::kIllegalPort) {
@@ -106,7 +106,7 @@ Message* MessageQueue::Dequeue() {
}
#if defined(DEBUG)
result->next_ = result; // Make sure to trigger ASSERT in Enqueue.
-#endif // DEBUG
+#endif // DEBUG
return result;
}
return NULL;
@@ -129,14 +129,12 @@ void MessageQueue::Clear() {
}
-MessageQueue::Iterator::Iterator(const MessageQueue* queue)
- : next_(NULL) {
+MessageQueue::Iterator::Iterator(const MessageQueue* queue) : next_(NULL) {
Reset(queue);
}
-MessageQueue::Iterator::~Iterator() {
-}
+MessageQueue::Iterator::~Iterator() {}
void MessageQueue::Iterator::Reset(const MessageQueue* queue) {
ASSERT(queue != NULL);
@@ -171,7 +169,7 @@ Message* MessageQueue::FindMessageById(intptr_t id) {
MessageQueue::Iterator it(this);
while (it.HasNext()) {
Message* current = it.Next();
- ASSERT(current != NULL);
+ ASSERT(current != NULL);
if (current->Id() == id) {
return current;
}
@@ -196,14 +194,13 @@ void MessageQueue::PrintJSON(JSONStream* stream) {
JSONObject message(&messages);
message.AddProperty("type", "Message");
message.AddPropertyF("name", "Isolate Message (%" Px ")", current->Id());
- message.AddPropertyF("messageObjectId", "messages/%" Px "",
- current->Id());
+ message.AddPropertyF("messageObjectId", "messages/%" Px "", current->Id());
message.AddProperty("size", current->len());
message.AddProperty("index", depth++);
message.AddPropertyF("_destinationPort", "%" Pd64 "",
- static_cast<int64_t>(current->dest_port()));
+ static_cast<int64_t>(current->dest_port()));
message.AddProperty("_priority",
- Message::PriorityAsString(current->priority()));
+ Message::PriorityAsString(current->priority()));
// TODO(johnmccutchan): Move port -> handler map out of Dart and into the
// VM, that way we can lookup the handler without invoking Dart code.
msg_handler = DartLibraryCalls::LookupHandler(current->dest_port());
« no previous file with comments | « runtime/vm/message.h ('k') | runtime/vm/message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698