| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 9031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9042 } | 9042 } |
| 9043 | 9043 |
| 9044 void debug::ChangeBreakOnException(Isolate* isolate, ExceptionBreakState type) { | 9044 void debug::ChangeBreakOnException(Isolate* isolate, ExceptionBreakState type) { |
| 9045 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 9045 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 9046 internal_isolate->debug()->ChangeBreakOnException( | 9046 internal_isolate->debug()->ChangeBreakOnException( |
| 9047 i::BreakException, type == BreakOnAnyException); | 9047 i::BreakException, type == BreakOnAnyException); |
| 9048 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, | 9048 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, |
| 9049 type != NoBreakOnException); | 9049 type != NoBreakOnException); |
| 9050 } | 9050 } |
| 9051 | 9051 |
| 9052 void debug::SetBreakPointsActive(Isolate* v8_isolate, bool is_active) { |
| 9053 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 9054 ENTER_V8(isolate); |
| 9055 isolate->debug()->set_break_points_active(is_active); |
| 9056 } |
| 9057 |
| 9052 void debug::SetOutOfMemoryCallback(Isolate* isolate, | 9058 void debug::SetOutOfMemoryCallback(Isolate* isolate, |
| 9053 OutOfMemoryCallback callback, void* data) { | 9059 OutOfMemoryCallback callback, void* data) { |
| 9054 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 9060 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 9055 ENTER_V8(i_isolate); | 9061 ENTER_V8(i_isolate); |
| 9056 i_isolate->heap()->SetOutOfMemoryCallback(callback, data); | 9062 i_isolate->heap()->SetOutOfMemoryCallback(callback, data); |
| 9057 } | 9063 } |
| 9058 | 9064 |
| 9059 void debug::PrepareStep(Isolate* v8_isolate, StepAction action) { | 9065 void debug::PrepareStep(Isolate* v8_isolate, StepAction action) { |
| 9060 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9066 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 9061 ENTER_V8(isolate); | 9067 ENTER_V8(isolate); |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10163 Address callback_address = | 10169 Address callback_address = |
| 10164 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10170 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10165 VMState<EXTERNAL> state(isolate); | 10171 VMState<EXTERNAL> state(isolate); |
| 10166 ExternalCallbackScope call_scope(isolate, callback_address); | 10172 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10167 callback(info); | 10173 callback(info); |
| 10168 } | 10174 } |
| 10169 | 10175 |
| 10170 | 10176 |
| 10171 } // namespace internal | 10177 } // namespace internal |
| 10172 } // namespace v8 | 10178 } // namespace v8 |
| OLD | NEW |