OLD | NEW |
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 "include/dart_tools_api.h" | 5 #include "include/dart_tools_api.h" |
6 | 6 |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 if (exc_thrown_handler != NULL) { | 151 if (exc_thrown_handler != NULL) { |
152 Dart_Handle exception = Api::NewHandle(thread, event->exception()->raw()); | 152 Dart_Handle exception = Api::NewHandle(thread, event->exception()->raw()); |
153 Dart_StackTrace trace = | 153 Dart_StackTrace trace = |
154 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); | 154 reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); |
155 (*exc_thrown_handler)(isolate_id, exception, trace); | 155 (*exc_thrown_handler)(isolate_id, exception, trace); |
156 } | 156 } |
157 } else if (event->kind() == ServiceEvent::kIsolateStart) { | 157 } else if (event->kind() == ServiceEvent::kIsolateStart) { |
158 if (isolate_event_handler != NULL) { | 158 if (isolate_event_handler != NULL) { |
159 (*isolate_event_handler)(event->isolate_id(), kCreated); | 159 (*isolate_event_handler)(event->isolate_id(), kCreated); |
160 } | 160 } |
161 } else if (event->kind() == ServiceEvent::kPauseInterrupted) { | 161 } else if (event->kind() == ServiceEvent::kPauseInterrupted || |
| 162 event->kind() == ServiceEvent::kPausePostRequest) { |
162 if (isolate_event_handler != NULL) { | 163 if (isolate_event_handler != NULL) { |
163 (*isolate_event_handler)(event->isolate_id(), kInterrupted); | 164 (*isolate_event_handler)(event->isolate_id(), kInterrupted); |
164 } | 165 } |
165 } else if (event->kind() == ServiceEvent::kIsolateExit) { | 166 } else if (event->kind() == ServiceEvent::kIsolateExit) { |
166 if (isolate_event_handler != NULL) { | 167 if (isolate_event_handler != NULL) { |
167 (*isolate_event_handler)(event->isolate_id(), kShutdown); | 168 (*isolate_event_handler)(event->isolate_id(), kShutdown); |
168 } | 169 } |
169 } else if (event->kind() == ServiceEvent::kPausePostRequest) { | |
170 // Ignore. | |
171 } else { | 170 } else { |
172 UNIMPLEMENTED(); | 171 UNIMPLEMENTED(); |
173 } | 172 } |
174 Dart_ExitScope(); | 173 Dart_ExitScope(); |
175 } | 174 } |
176 | 175 |
177 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { | 176 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { |
178 paused_event_handler = handler; | 177 paused_event_handler = handler; |
179 Debugger::SetEventHandler(DebuggerEventHandler); | 178 Debugger::SetEventHandler(DebuggerEventHandler); |
180 } | 179 } |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 | 933 |
935 #else | 934 #else |
936 | 935 |
937 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { | 936 DART_EXPORT void Dart_SetPausedEventHandler(Dart_PausedEventHandler handler) { |
938 // NOOP. | 937 // NOOP. |
939 } | 938 } |
940 | 939 |
941 #endif // !PRODUCT | 940 #endif // !PRODUCT |
942 | 941 |
943 } // namespace dart | 942 } // namespace dart |
OLD | NEW |