| 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 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 return Utils::OpenHandle(this)->IsJSDataView(); | 2761 return Utils::OpenHandle(this)->IsJSDataView(); |
| 2762 } | 2762 } |
| 2763 | 2763 |
| 2764 | 2764 |
| 2765 bool Value::IsSharedArrayBuffer() const { | 2765 bool Value::IsSharedArrayBuffer() const { |
| 2766 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 2766 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
| 2767 return obj->IsJSArrayBuffer() && i::JSArrayBuffer::cast(*obj)->is_shared(); | 2767 return obj->IsJSArrayBuffer() && i::JSArrayBuffer::cast(*obj)->is_shared(); |
| 2768 } | 2768 } |
| 2769 | 2769 |
| 2770 | 2770 |
| 2771 bool Value::IsObject() const { | 2771 bool Value::IsObject() const { return Utils::OpenHandle(this)->IsJSReceiver(); } |
| 2772 return Utils::OpenHandle(this)->IsJSObject(); | |
| 2773 } | |
| 2774 | 2772 |
| 2775 | 2773 |
| 2776 bool Value::IsNumber() const { | 2774 bool Value::IsNumber() const { |
| 2777 return Utils::OpenHandle(this)->IsNumber(); | 2775 return Utils::OpenHandle(this)->IsNumber(); |
| 2778 } | 2776 } |
| 2779 | 2777 |
| 2780 | 2778 |
| 2781 bool Value::IsProxy() const { return Utils::OpenHandle(this)->IsJSProxy(); } | 2779 bool Value::IsProxy() const { return Utils::OpenHandle(this)->IsJSProxy(); } |
| 2782 | 2780 |
| 2783 | 2781 |
| (...skipping 5754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8538 Address callback_address = | 8536 Address callback_address = |
| 8539 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8537 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8540 VMState<EXTERNAL> state(isolate); | 8538 VMState<EXTERNAL> state(isolate); |
| 8541 ExternalCallbackScope call_scope(isolate, callback_address); | 8539 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8542 callback(info); | 8540 callback(info); |
| 8543 } | 8541 } |
| 8544 | 8542 |
| 8545 | 8543 |
| 8546 } // namespace internal | 8544 } // namespace internal |
| 8547 } // namespace v8 | 8545 } // namespace v8 |
| OLD | NEW |