| OLD | NEW |
| 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/message_handler.h" | 5 #include "vm/message_handler.h" |
| 6 | 6 |
| 7 #include "vm/dart.h" | 7 #include "vm/dart.h" |
| 8 #include "vm/lockers.h" | 8 #include "vm/lockers.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 return !oob_queue_->IsEmpty(); | 326 return !oob_queue_->IsEmpty(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 | 329 |
| 330 void MessageHandler::TaskCallback() { | 330 void MessageHandler::TaskCallback() { |
| 331 ASSERT(Isolate::Current() == NULL); | 331 ASSERT(Isolate::Current() == NULL); |
| 332 MessageStatus status = kOK; | 332 MessageStatus status = kOK; |
| 333 bool run_end_callback = false; | 333 bool run_end_callback = false; |
| 334 bool delete_me = false; | 334 bool delete_me = false; |
| 335 EndCallback end_callback = NULL; | 335 EndCallback end_callback = NULL; |
| 336 CallbackData callback_data = NULL; | 336 CallbackData callback_data = 0; |
| 337 { | 337 { |
| 338 // We will occasionally release and reacquire this monitor in this | 338 // We will occasionally release and reacquire this monitor in this |
| 339 // function. Whenever we reacquire the monitor we *must* process | 339 // function. Whenever we reacquire the monitor we *must* process |
| 340 // all pending OOB messages, or we may miss a request for vm | 340 // all pending OOB messages, or we may miss a request for vm |
| 341 // shutdown. | 341 // shutdown. |
| 342 MonitorLocker ml(&monitor_); | 342 MonitorLocker ml(&monitor_); |
| 343 if (ShouldPauseOnStart(kOK)) { | 343 if (ShouldPauseOnStart(kOK)) { |
| 344 if (!is_paused_on_start()) { | 344 if (!is_paused_on_start()) { |
| 345 PausedOnStartLocked(&ml, true); | 345 PausedOnStartLocked(&ml, true); |
| 346 } | 346 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 handler_->oob_message_handling_allowed_ = false; | 586 handler_->oob_message_handling_allowed_ = false; |
| 587 } | 587 } |
| 588 | 588 |
| 589 | 589 |
| 590 MessageHandler::AcquiredQueues::~AcquiredQueues() { | 590 MessageHandler::AcquiredQueues::~AcquiredQueues() { |
| 591 ASSERT(handler_ != NULL); | 591 ASSERT(handler_ != NULL); |
| 592 handler_->oob_message_handling_allowed_ = true; | 592 handler_->oob_message_handling_allowed_ = true; |
| 593 } | 593 } |
| 594 | 594 |
| 595 } // namespace dart | 595 } // namespace dart |
| OLD | NEW |