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 9023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9034 // Prepare step. | 9034 // Prepare step. |
9035 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); | 9035 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action)); |
9036 } | 9036 } |
9037 | 9037 |
9038 bool debug::HasNonBlackboxedFrameOnStack(Isolate* v8_isolate) { | 9038 bool debug::HasNonBlackboxedFrameOnStack(Isolate* v8_isolate) { |
9039 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9039 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9040 ENTER_V8(isolate); | 9040 ENTER_V8(isolate); |
9041 i::HandleScope scope(isolate); | 9041 i::HandleScope scope(isolate); |
9042 for (i::StackTraceFrameIterator it(isolate); !it.done(); it.Advance()) { | 9042 for (i::StackTraceFrameIterator it(isolate); !it.done(); it.Advance()) { |
9043 if (!it.is_javascript()) continue; | 9043 if (!it.is_javascript()) continue; |
9044 i::Handle<i::SharedFunctionInfo> shared( | 9044 if (!isolate->debug()->IsFrameBlackboxed(it.javascript_frame())) { |
9045 it.javascript_frame()->function()->shared()); | 9045 return true; |
9046 if (!isolate->debug()->IsBlackboxed(shared)) return true; | 9046 } |
9047 } | 9047 } |
9048 return false; | 9048 return false; |
9049 } | 9049 } |
9050 | 9050 |
9051 v8::Isolate* debug::Script::GetIsolate() const { | 9051 v8::Isolate* debug::Script::GetIsolate() const { |
9052 return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate()); | 9052 return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate()); |
9053 } | 9053 } |
9054 | 9054 |
9055 ScriptOriginOptions debug::Script::OriginOptions() const { | 9055 ScriptOriginOptions debug::Script::OriginOptions() const { |
9056 return Utils::OpenHandle(this)->origin_options(); | 9056 return Utils::OpenHandle(this)->origin_options(); |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10023 Address callback_address = | 10023 Address callback_address = |
10024 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10024 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10025 VMState<EXTERNAL> state(isolate); | 10025 VMState<EXTERNAL> state(isolate); |
10026 ExternalCallbackScope call_scope(isolate, callback_address); | 10026 ExternalCallbackScope call_scope(isolate, callback_address); |
10027 callback(info); | 10027 callback(info); |
10028 } | 10028 } |
10029 | 10029 |
10030 | 10030 |
10031 } // namespace internal | 10031 } // namespace internal |
10032 } // namespace v8 | 10032 } // namespace v8 |
OLD | NEW |