| 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 void V8::CheckIsJust(bool is_just) { | 593 void V8::CheckIsJust(bool is_just) { |
| 594 Utils::ApiCheck(is_just, "v8::FromJust", "Maybe value is Nothing."); | 594 Utils::ApiCheck(is_just, "v8::FromJust", "Maybe value is Nothing."); |
| 595 } | 595 } |
| 596 | 596 |
| 597 | 597 |
| 598 void V8::ToLocalEmpty() { | 598 void V8::ToLocalEmpty() { |
| 599 Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal."); | 599 Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal."); |
| 600 } | 600 } |
| 601 | 601 |
| 602 | 602 |
| 603 void V8::InternalFieldOutOfBounds(int index) { |
| 604 Utils::ApiCheck(0 <= index && index < kInternalFieldsInWeakCallback, |
| 605 "WeakCallbackInfo::GetInternalField", |
| 606 "Internal field out of bounds."); |
| 607 } |
| 608 |
| 609 |
| 603 // --- H a n d l e s --- | 610 // --- H a n d l e s --- |
| 604 | 611 |
| 605 | 612 |
| 606 HandleScope::HandleScope(Isolate* isolate) { | 613 HandleScope::HandleScope(Isolate* isolate) { |
| 607 Initialize(isolate); | 614 Initialize(isolate); |
| 608 } | 615 } |
| 609 | 616 |
| 610 | 617 |
| 611 void HandleScope::Initialize(Isolate* isolate) { | 618 void HandleScope::Initialize(Isolate* isolate) { |
| 612 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 619 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| (...skipping 7403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8016 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8023 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8017 Address callback_address = | 8024 Address callback_address = |
| 8018 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8025 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8019 VMState<EXTERNAL> state(isolate); | 8026 VMState<EXTERNAL> state(isolate); |
| 8020 ExternalCallbackScope call_scope(isolate, callback_address); | 8027 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8021 callback(info); | 8028 callback(info); |
| 8022 } | 8029 } |
| 8023 | 8030 |
| 8024 | 8031 |
| 8025 } } // namespace v8::internal | 8032 } } // namespace v8::internal |
| OLD | NEW |