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 7345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7356 internal_isolate->stack_guard()->ClearDebugBreak(); | 7356 internal_isolate->stack_guard()->ClearDebugBreak(); |
7357 } | 7357 } |
7358 | 7358 |
7359 | 7359 |
7360 bool Debug::CheckDebugBreak(Isolate* isolate) { | 7360 bool Debug::CheckDebugBreak(Isolate* isolate) { |
7361 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 7361 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
7362 return internal_isolate->stack_guard()->CheckDebugBreak(); | 7362 return internal_isolate->stack_guard()->CheckDebugBreak(); |
7363 } | 7363 } |
7364 | 7364 |
7365 | 7365 |
7366 void Debug::DebugBreakForCommand(Isolate* isolate, ClientData* data) { | |
7367 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | |
7368 internal_isolate->debug()->EnqueueDebugCommand(data); | |
7369 } | |
7370 | |
7371 | |
7372 void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) { | 7366 void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) { |
7373 i::Isolate* isolate = i::Isolate::Current(); | 7367 i::Isolate* isolate = i::Isolate::Current(); |
7374 ENTER_V8(isolate); | 7368 ENTER_V8(isolate); |
7375 isolate->debug()->SetMessageHandler(handler); | 7369 isolate->debug()->SetMessageHandler(handler); |
7376 } | 7370 } |
7377 | 7371 |
7378 | 7372 |
7379 void Debug::SendCommand(Isolate* isolate, | 7373 void Debug::SendCommand(Isolate* isolate, |
7380 const uint16_t* command, | 7374 const uint16_t* command, |
7381 int length, | 7375 int length, |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8087 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8081 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8088 Address callback_address = | 8082 Address callback_address = |
8089 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8083 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8090 VMState<EXTERNAL> state(isolate); | 8084 VMState<EXTERNAL> state(isolate); |
8091 ExternalCallbackScope call_scope(isolate, callback_address); | 8085 ExternalCallbackScope call_scope(isolate, callback_address); |
8092 callback(info); | 8086 callback(info); |
8093 } | 8087 } |
8094 | 8088 |
8095 | 8089 |
8096 } } // namespace v8::internal | 8090 } } // namespace v8::internal |
OLD | NEW |