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 9081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9092 void debug::PrepareStep(Isolate* v8_isolate, StepAction action) { | 9092 void debug::PrepareStep(Isolate* v8_isolate, StepAction action) { |
9093 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9093 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9094 ENTER_V8(isolate); | 9094 ENTER_V8(isolate); |
9095 CHECK(isolate->debug()->CheckExecutionState()); | 9095 CHECK(isolate->debug()->CheckExecutionState()); |
9096 // Clear all current stepping setup. | 9096 // Clear all current stepping setup. |
9097 isolate->debug()->ClearStepping(); | 9097 isolate->debug()->ClearStepping(); |
9098 // Prepare step. | 9098 // Prepare step. |
9099 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); | 9099 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); |
9100 } | 9100 } |
9101 | 9101 |
9102 bool debug::HasNonBlackboxedFrameOnStack(Isolate* v8_isolate) { | 9102 void debug::ClearStepping(Isolate* v8_isolate) { |
9103 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9103 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9104 ENTER_V8(isolate); | 9104 ENTER_V8(isolate); |
9105 i::HandleScope scope(isolate); | 9105 CHECK(isolate->debug()->CheckExecutionState()); |
9106 for (i::StackTraceFrameIterator it(isolate); !it.done(); it.Advance()) { | 9106 // Clear all current stepping setup. |
9107 if (!it.is_javascript()) continue; | 9107 isolate->debug()->ClearStepping(); |
9108 if (!isolate->debug()->IsFrameBlackboxed(it.javascript_frame())) { | 9108 } |
9109 return true; | 9109 |
9110 } | 9110 bool debug::AllFramesOnStackAreBlackboxed(Isolate* v8_isolate) { |
9111 } | 9111 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9112 return false; | 9112 ENTER_V8(isolate); |
| 9113 return isolate->debug()->AllFramesOnStackAreBlackboxed(); |
9113 } | 9114 } |
9114 | 9115 |
9115 v8::Isolate* debug::Script::GetIsolate() const { | 9116 v8::Isolate* debug::Script::GetIsolate() const { |
9116 return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate()); | 9117 return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate()); |
9117 } | 9118 } |
9118 | 9119 |
9119 ScriptOriginOptions debug::Script::OriginOptions() const { | 9120 ScriptOriginOptions debug::Script::OriginOptions() const { |
9120 return Utils::OpenHandle(this)->origin_options(); | 9121 return Utils::OpenHandle(this)->origin_options(); |
9121 } | 9122 } |
9122 | 9123 |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10247 Address callback_address = | 10248 Address callback_address = |
10248 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10249 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10249 VMState<EXTERNAL> state(isolate); | 10250 VMState<EXTERNAL> state(isolate); |
10250 ExternalCallbackScope call_scope(isolate, callback_address); | 10251 ExternalCallbackScope call_scope(isolate, callback_address); |
10251 callback(info); | 10252 callback(info); |
10252 } | 10253 } |
10253 | 10254 |
10254 | 10255 |
10255 } // namespace internal | 10256 } // namespace internal |
10256 } // namespace v8 | 10257 } // namespace v8 |
OLD | NEW |