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 StartIsolateScope start_isolate(isolate()); | 453 if (Service::NeedsDebugEvents()) { |
454 StackZone zone(I); | 454 StartIsolateScope start_isolate(isolate()); |
455 HandleScope handle_scope(I); | 455 StackZone zone(I); |
456 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseStart); | 456 HandleScope handle_scope(I); |
457 Service::HandleEvent(&pause_event); | 457 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseStart); |
| 458 Service::HandleEvent(&pause_event); |
| 459 } |
458 } | 460 } |
459 | 461 |
460 | 462 |
461 void IsolateMessageHandler::NotifyPauseOnExit() { | 463 void IsolateMessageHandler::NotifyPauseOnExit() { |
462 StartIsolateScope start_isolate(isolate()); | 464 if (Service::NeedsDebugEvents()) { |
463 StackZone zone(I); | 465 StartIsolateScope start_isolate(isolate()); |
464 HandleScope handle_scope(I); | 466 StackZone zone(I); |
465 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseExit); | 467 HandleScope handle_scope(I); |
466 Service::HandleEvent(&pause_event); | 468 ServiceEvent pause_event(isolate(), ServiceEvent::kPauseExit); |
| 469 Service::HandleEvent(&pause_event); |
| 470 } |
467 } | 471 } |
468 | 472 |
469 | 473 |
470 #if defined(DEBUG) | 474 #if defined(DEBUG) |
471 void IsolateMessageHandler::CheckAccess() { | 475 void IsolateMessageHandler::CheckAccess() { |
472 ASSERT(IsCurrentIsolate()); | 476 ASSERT(IsCurrentIsolate()); |
473 } | 477 } |
474 #endif | 478 #endif |
475 | 479 |
476 | 480 |
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 serialized_message_, serialized_message_len_); | 1965 serialized_message_, serialized_message_len_); |
1962 } | 1966 } |
1963 | 1967 |
1964 | 1968 |
1965 void IsolateSpawnState::Cleanup() { | 1969 void IsolateSpawnState::Cleanup() { |
1966 SwitchIsolateScope switch_scope(I); | 1970 SwitchIsolateScope switch_scope(I); |
1967 Dart::ShutdownIsolate(); | 1971 Dart::ShutdownIsolate(); |
1968 } | 1972 } |
1969 | 1973 |
1970 } // namespace dart | 1974 } // namespace dart |
OLD | NEW |