| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 isolate->eternal_handles()->Create(isolate, object, index); | 577 isolate->eternal_handles()->Create(isolate, object, index); |
| 578 } | 578 } |
| 579 | 579 |
| 580 | 580 |
| 581 Local<Value> V8::GetEternal(Isolate* v8_isolate, int index) { | 581 Local<Value> V8::GetEternal(Isolate* v8_isolate, int index) { |
| 582 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 582 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
| 583 return Utils::ToLocal(isolate->eternal_handles()->Get(index)); | 583 return Utils::ToLocal(isolate->eternal_handles()->Get(index)); |
| 584 } | 584 } |
| 585 | 585 |
| 586 | 586 |
| 587 void V8::CheckIsJust(bool is_just) { | 587 void V8::FromJustIsNothing() { |
| 588 Utils::ApiCheck(is_just, "v8::FromJust", "Maybe value is Nothing."); | 588 Utils::ApiCheck(false, "v8::FromJust", "Maybe value is Nothing."); |
| 589 } | 589 } |
| 590 | 590 |
| 591 | 591 |
| 592 void V8::ToLocalEmpty() { | 592 void V8::ToLocalEmpty() { |
| 593 Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal."); | 593 Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal."); |
| 594 } | 594 } |
| 595 | 595 |
| 596 | 596 |
| 597 void V8::InternalFieldOutOfBounds(int index) { | 597 void V8::InternalFieldOutOfBounds(int index) { |
| 598 Utils::ApiCheck(0 <= index && index < kInternalFieldsInWeakCallback, | 598 Utils::ApiCheck(0 <= index && index < kInternalFieldsInWeakCallback, |
| (...skipping 7510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8109 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8109 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8110 Address callback_address = | 8110 Address callback_address = |
| 8111 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8111 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8112 VMState<EXTERNAL> state(isolate); | 8112 VMState<EXTERNAL> state(isolate); |
| 8113 ExternalCallbackScope call_scope(isolate, callback_address); | 8113 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8114 callback(info); | 8114 callback(info); |
| 8115 } | 8115 } |
| 8116 | 8116 |
| 8117 | 8117 |
| 8118 } } // namespace v8::internal | 8118 } } // namespace v8::internal |
| OLD | NEW |