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 6889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6900 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->RequestDebugBreak(); | 6900 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->RequestDebugBreak(); |
6901 } | 6901 } |
6902 | 6902 |
6903 | 6903 |
6904 void Debug::CancelDebugBreak(Isolate* isolate) { | 6904 void Debug::CancelDebugBreak(Isolate* isolate) { |
6905 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6905 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6906 internal_isolate->stack_guard()->ClearDebugBreak(); | 6906 internal_isolate->stack_guard()->ClearDebugBreak(); |
6907 } | 6907 } |
6908 | 6908 |
6909 | 6909 |
| 6910 bool Debug::CheckDebugBreak(Isolate* isolate) { |
| 6911 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 6912 return internal_isolate->stack_guard()->CheckDebugBreak(); |
| 6913 } |
| 6914 |
| 6915 |
6910 void Debug::DebugBreakForCommand(Isolate* isolate, ClientData* data) { | 6916 void Debug::DebugBreakForCommand(Isolate* isolate, ClientData* data) { |
6911 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6917 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6912 internal_isolate->debug()->EnqueueDebugCommand(data); | 6918 internal_isolate->debug()->EnqueueDebugCommand(data); |
6913 } | 6919 } |
6914 | 6920 |
6915 | 6921 |
6916 void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) { | 6922 void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) { |
6917 i::Isolate* isolate = i::Isolate::Current(); | 6923 i::Isolate* isolate = i::Isolate::Current(); |
6918 EnsureInitializedForIsolate(isolate, "v8::Debug::SetMessageHandler"); | 6924 EnsureInitializedForIsolate(isolate, "v8::Debug::SetMessageHandler"); |
6919 ENTER_V8(isolate); | 6925 ENTER_V8(isolate); |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7644 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7650 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7645 Address callback_address = | 7651 Address callback_address = |
7646 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7652 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7647 VMState<EXTERNAL> state(isolate); | 7653 VMState<EXTERNAL> state(isolate); |
7648 ExternalCallbackScope call_scope(isolate, callback_address); | 7654 ExternalCallbackScope call_scope(isolate, callback_address); |
7649 callback(info); | 7655 callback(info); |
7650 } | 7656 } |
7651 | 7657 |
7652 | 7658 |
7653 } } // namespace v8::internal | 7659 } } // namespace v8::internal |
OLD | NEW |