| 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_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 DART_EXPORT void Dart_SetExceptionThrownHandler( | 145 DART_EXPORT void Dart_SetExceptionThrownHandler( |
| 146 Dart_ExceptionThrownHandler handler) { | 146 Dart_ExceptionThrownHandler handler) { |
| 147 exc_thrown_handler = handler; | 147 exc_thrown_handler = handler; |
| 148 Isolate* isolate = Isolate::Current(); | 148 Isolate* isolate = Isolate::Current(); |
| 149 DARTSCOPE(isolate); | 149 DARTSCOPE(isolate); |
| 150 isolate->debugger()->SetEventHandler(DebuggerEventHandler); | 150 isolate->debugger()->SetEventHandler(DebuggerEventHandler); |
| 151 } | 151 } |
| 152 | 152 |
| 153 | 153 |
| 154 DART_EXPORT Dart_Handle Dart_SetExceptionPauseInfo( |
| 155 Dart_ExceptionPauseInfo pause_info) { |
| 156 Isolate* isolate = Isolate::Current(); |
| 157 DARTSCOPE(isolate); |
| 158 isolate->debugger()->SetExceptionPauseInfo(pause_info); |
| 159 return Api::True(isolate); |
| 160 } |
| 161 |
| 162 |
| 154 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace) { | 163 DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace) { |
| 155 Isolate* isolate = Isolate::Current(); | 164 Isolate* isolate = Isolate::Current(); |
| 156 DARTSCOPE(isolate); | 165 DARTSCOPE(isolate); |
| 157 CHECK_NOT_NULL(trace); | 166 CHECK_NOT_NULL(trace); |
| 158 *trace = reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); | 167 *trace = reinterpret_cast<Dart_StackTrace>(isolate->debugger()->StackTrace()); |
| 159 return Api::True(isolate); | 168 return Api::True(isolate); |
| 160 } | 169 } |
| 161 | 170 |
| 162 | 171 |
| 163 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo( | 172 DART_EXPORT Dart_Handle Dart_ActivationFrameInfo( |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 for (int i = 0; i < num_libs; i++) { | 637 for (int i = 0; i < num_libs; i++) { |
| 629 lib ^= libs.At(i); | 638 lib ^= libs.At(i); |
| 630 ASSERT(!lib.IsNull()); | 639 ASSERT(!lib.IsNull()); |
| 631 lib_url = lib.url(); | 640 lib_url = lib.url(); |
| 632 library_url_list.SetAt(i, lib_url); | 641 library_url_list.SetAt(i, lib_url); |
| 633 } | 642 } |
| 634 return Api::NewHandle(isolate, library_url_list.raw()); | 643 return Api::NewHandle(isolate, library_url_list.raw()); |
| 635 } | 644 } |
| 636 | 645 |
| 637 } // namespace dart | 646 } // namespace dart |
| OLD | NEW |