| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/json.h" | 9 #include "platform/json.h" |
| 10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } else { | 443 } else { |
| 444 ASSERT(result.IsNull()); | 444 ASSERT(result.IsNull()); |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 delete message; | 447 delete message; |
| 448 return success; | 448 return success; |
| 449 } | 449 } |
| 450 | 450 |
| 451 | 451 |
| 452 void IsolateMessageHandler::NotifyPauseOnStart() { | 452 void IsolateMessageHandler::NotifyPauseOnStart() { |
| 453 if (Service::NeedsDebugEvents()) { | 453 StartIsolateScope start_isolate(isolate()); |
| 454 StartIsolateScope start_isolate(isolate()); | 454 StackZone zone(I); |
| 455 StackZone zone(I); | 455 HandleScope handle_scope(I); |
| 456 HandleScope handle_scope(I); | 456 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseStart); |
| 457 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseStart); | 457 Service::HandleEvent(&pause_event); |
| 458 Service::HandleEvent(&pause_event); | |
| 459 } | |
| 460 } | 458 } |
| 461 | 459 |
| 462 | 460 |
| 463 void IsolateMessageHandler::NotifyPauseOnExit() { | 461 void IsolateMessageHandler::NotifyPauseOnExit() { |
| 464 if (Service::NeedsDebugEvents()) { | 462 StartIsolateScope start_isolate(isolate()); |
| 465 StartIsolateScope start_isolate(isolate()); | 463 StackZone zone(I); |
| 466 StackZone zone(I); | 464 HandleScope handle_scope(I); |
| 467 HandleScope handle_scope(I); | 465 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseExit); |
| 468 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseExit); | 466 Service::HandleEvent(&pause_event); |
| 469 Service::HandleEvent(&pause_event); | |
| 470 } | |
| 471 } | 467 } |
| 472 | 468 |
| 473 | 469 |
| 474 #if defined(DEBUG) | 470 #if defined(DEBUG) |
| 475 void IsolateMessageHandler::CheckAccess() { | 471 void IsolateMessageHandler::CheckAccess() { |
| 476 ASSERT(IsCurrentIsolate()); | 472 ASSERT(IsCurrentIsolate()); |
| 477 } | 473 } |
| 478 #endif | 474 #endif |
| 479 | 475 |
| 480 | 476 |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 serialized_message_, serialized_message_len_); | 1957 serialized_message_, serialized_message_len_); |
| 1962 } | 1958 } |
| 1963 | 1959 |
| 1964 | 1960 |
| 1965 void IsolateSpawnState::Cleanup() { | 1961 void IsolateSpawnState::Cleanup() { |
| 1966 SwitchIsolateScope switch_scope(I); | 1962 SwitchIsolateScope switch_scope(I); |
| 1967 Dart::ShutdownIsolate(); | 1963 Dart::ShutdownIsolate(); |
| 1968 } | 1964 } |
| 1969 | 1965 |
| 1970 } // namespace dart | 1966 } // namespace dart |
| OLD | NEW |