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 8796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8807 | 8807 |
8808 void DebugInterface::ChangeBreakOnException(Isolate* isolate, | 8808 void DebugInterface::ChangeBreakOnException(Isolate* isolate, |
8809 ExceptionBreakState type) { | 8809 ExceptionBreakState type) { |
8810 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 8810 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
8811 internal_isolate->debug()->ChangeBreakOnException( | 8811 internal_isolate->debug()->ChangeBreakOnException( |
8812 i::BreakException, type == BreakOnAnyException); | 8812 i::BreakException, type == BreakOnAnyException); |
8813 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, | 8813 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, |
8814 type != NoBreakOnException); | 8814 type != NoBreakOnException); |
8815 } | 8815 } |
8816 | 8816 |
| 8817 void DebugInterface::PrepareStep(Isolate* v8_isolate, StepAction action) { |
| 8818 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 8819 ENTER_V8(isolate); |
| 8820 CHECK(isolate->debug()->CheckExecutionState()); |
| 8821 // Clear all current stepping setup. |
| 8822 isolate->debug()->ClearStepping(); |
| 8823 // Prepare step. |
| 8824 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); |
| 8825 } |
| 8826 |
| 8827 void DebugInterface::ClearStepping(Isolate* v8_isolate) { |
| 8828 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 8829 ENTER_V8(isolate); |
| 8830 // Clear all current stepping setup. |
| 8831 isolate->debug()->ClearStepping(); |
| 8832 } |
| 8833 |
8817 Local<String> CpuProfileNode::GetFunctionName() const { | 8834 Local<String> CpuProfileNode::GetFunctionName() const { |
8818 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); | 8835 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
8819 i::Isolate* isolate = node->isolate(); | 8836 i::Isolate* isolate = node->isolate(); |
8820 const i::CodeEntry* entry = node->entry(); | 8837 const i::CodeEntry* entry = node->entry(); |
8821 i::Handle<i::String> name = | 8838 i::Handle<i::String> name = |
8822 isolate->factory()->InternalizeUtf8String(entry->name()); | 8839 isolate->factory()->InternalizeUtf8String(entry->name()); |
8823 if (!entry->has_name_prefix()) { | 8840 if (!entry->has_name_prefix()) { |
8824 return ToApiHandle<String>(name); | 8841 return ToApiHandle<String>(name); |
8825 } else { | 8842 } else { |
8826 // We do not expect this to fail. Change this if it does. | 8843 // We do not expect this to fail. Change this if it does. |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9495 Address callback_address = | 9512 Address callback_address = |
9496 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9513 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9497 VMState<EXTERNAL> state(isolate); | 9514 VMState<EXTERNAL> state(isolate); |
9498 ExternalCallbackScope call_scope(isolate, callback_address); | 9515 ExternalCallbackScope call_scope(isolate, callback_address); |
9499 callback(info); | 9516 callback(info); |
9500 } | 9517 } |
9501 | 9518 |
9502 | 9519 |
9503 } // namespace internal | 9520 } // namespace internal |
9504 } // namespace v8 | 9521 } // namespace v8 |
OLD | NEW |