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

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

Issue 8392044: Handle spurious wakeups properly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/message_queue.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 8
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/bigint_store.h" 10 #include "vm/bigint_store.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void Isolate::StandardRunLoop() { 235 void Isolate::StandardRunLoop() {
236 ASSERT(long_jump_base() != NULL); 236 ASSERT(long_jump_base() != NULL);
237 ASSERT(post_message_callback() == &StandardPostMessageCallback); 237 ASSERT(post_message_callback() == &StandardPostMessageCallback);
238 ASSERT(close_port_callback() == &StandardClosePortCallback); 238 ASSERT(close_port_callback() == &StandardClosePortCallback);
239 239
240 while (active_ports() > 0) { 240 while (active_ports() > 0) {
241 Zone zone; 241 Zone zone;
242 HandleScope handle_scope; 242 HandleScope handle_scope;
243 243
244 PortMessage* message = message_queue()->Dequeue(0); 244 PortMessage* message = message_queue()->Dequeue(0);
245 ASSERT(message != NULL); 245 if (message != NULL) {
246 Dart_HandleMessage( 246 Dart_HandleMessage(
247 message->dest_port(), message->reply_port(), message->data()); 247 message->dest_port(), message->reply_port(), message->data());
248 delete message; 248 delete message;
249 }
249 } 250 }
250 } 251 }
251 252
252 253
253 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor, 254 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor,
254 bool validate_frames) { 255 bool validate_frames) {
255 ASSERT(visitor != NULL); 256 ASSERT(visitor != NULL);
256 257
257 // Visit objects in the object store. 258 // Visit objects in the object store.
258 object_store()->VisitObjectPointers(visitor); 259 object_store()->VisitObjectPointers(visitor);
(...skipping 20 matching lines...) Expand all
279 // Visit all objects in the code index table. 280 // Visit all objects in the code index table.
280 if (code_index_table() != NULL) { 281 if (code_index_table() != NULL) {
281 code_index_table()->VisitObjectPointers(visitor); 282 code_index_table()->VisitObjectPointers(visitor);
282 } 283 }
283 284
284 // Visit the top context which is stored in the isolate. 285 // Visit the top context which is stored in the isolate.
285 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); 286 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_));
286 } 287 }
287 288
288 } // namespace dart 289 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/message_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698