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

Side by Side Diff: runtime/vm/isolate.cc

Issue 9570046: Make the message queue private in the message handler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/message.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/code_index_table.h" 9 #include "vm/code_index_table.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 RawError* Isolate::StandardRunLoop() { 388 RawError* Isolate::StandardRunLoop() {
389 ASSERT(message_notify_callback() == NULL); 389 ASSERT(message_notify_callback() == NULL);
390 ASSERT(message_handler() != NULL); 390 ASSERT(message_handler() != NULL);
391 391
392 while (message_handler()->HasLivePorts()) { 392 while (message_handler()->HasLivePorts()) {
393 ASSERT(this == Isolate::Current()); 393 ASSERT(this == Isolate::Current());
394 Zone zone(this); 394 Zone zone(this);
395 HandleScope handle_scope(this); 395 HandleScope handle_scope(this);
396 396
397 Message* message = message_handler()->queue()->Dequeue(0); 397 Message* message = message_handler()->Dequeue(0);
398 if (message != NULL) { 398 if (message != NULL) {
399 if (message->priority() >= Message::kOOBPriority) { 399 if (message->priority() >= Message::kOOBPriority) {
400 // TODO(turnidge): Out of band messages will not go through the 400 // TODO(turnidge): Out of band messages will not go through the
401 // regular message handler. Instead they will be dispatched to 401 // regular message handler. Instead they will be dispatched to
402 // special vm code. Implement. 402 // special vm code. Implement.
403 UNIMPLEMENTED(); 403 UNIMPLEMENTED();
404 } 404 }
405 const Instance& msg = 405 const Instance& msg =
406 Instance::Handle(DeserializeMessage(message->data())); 406 Instance::Handle(DeserializeMessage(message->data()));
407 const Object& result = Object::Handle( 407 const Object& result = Object::Handle(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 461 }
462 462
463 463
464 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) { 464 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) {
465 if (api_state() != NULL) { 465 if (api_state() != NULL) {
466 api_state()->VisitWeakHandles(visitor); 466 api_state()->VisitWeakHandles(visitor);
467 } 467 }
468 } 468 }
469 469
470 } // namespace dart 470 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698