| 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 8665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8676 bool Debug::IsTailCallEliminationEnabled(Isolate* isolate) { | 8676 bool Debug::IsTailCallEliminationEnabled(Isolate* isolate) { |
| 8677 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 8677 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 8678 return internal_isolate->is_tail_call_elimination_enabled(); | 8678 return internal_isolate->is_tail_call_elimination_enabled(); |
| 8679 } | 8679 } |
| 8680 | 8680 |
| 8681 void Debug::SetTailCallEliminationEnabled(Isolate* isolate, bool enabled) { | 8681 void Debug::SetTailCallEliminationEnabled(Isolate* isolate, bool enabled) { |
| 8682 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 8682 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 8683 internal_isolate->SetTailCallEliminationEnabled(enabled); | 8683 internal_isolate->SetTailCallEliminationEnabled(enabled); |
| 8684 } | 8684 } |
| 8685 | 8685 |
| 8686 void Debug::ChangeBreakOnException(Isolate* isolate, ExceptionBreakState type) { |
| 8687 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 8688 internal_isolate->debug()->ChangeBreakOnException( |
| 8689 i::BreakException, type == BreakOnAnyException); |
| 8690 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, |
| 8691 type != NoBreakOnException); |
| 8692 } |
| 8693 |
| 8686 MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate, | 8694 MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate, |
| 8687 Local<Value> value) { | 8695 Local<Value> value) { |
| 8688 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 8696 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 8689 ENTER_V8(isolate); | 8697 ENTER_V8(isolate); |
| 8690 i::Handle<i::Object> val = Utils::OpenHandle(*value); | 8698 i::Handle<i::Object> val = Utils::OpenHandle(*value); |
| 8691 i::Handle<i::JSArray> result; | 8699 i::Handle<i::JSArray> result; |
| 8692 if (!i::Runtime::GetInternalProperties(isolate, val).ToHandle(&result)) | 8700 if (!i::Runtime::GetInternalProperties(isolate, val).ToHandle(&result)) |
| 8693 return MaybeLocal<Array>(); | 8701 return MaybeLocal<Array>(); |
| 8694 return Utils::ToLocal(result); | 8702 return Utils::ToLocal(result); |
| 8695 } | 8703 } |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9376 Address callback_address = | 9384 Address callback_address = |
| 9377 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9385 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 9378 VMState<EXTERNAL> state(isolate); | 9386 VMState<EXTERNAL> state(isolate); |
| 9379 ExternalCallbackScope call_scope(isolate, callback_address); | 9387 ExternalCallbackScope call_scope(isolate, callback_address); |
| 9380 callback(info); | 9388 callback(info); |
| 9381 } | 9389 } |
| 9382 | 9390 |
| 9383 | 9391 |
| 9384 } // namespace internal | 9392 } // namespace internal |
| 9385 } // namespace v8 | 9393 } // namespace v8 |
| OLD | NEW |