| 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 6731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6742 PREPARE_FOR_EXECUTION(context, Proxy, New, Proxy); | 6742 PREPARE_FOR_EXECUTION(context, Proxy, New, Proxy); |
| 6743 i::Handle<i::JSReceiver> target = Utils::OpenHandle(*local_target); | 6743 i::Handle<i::JSReceiver> target = Utils::OpenHandle(*local_target); |
| 6744 i::Handle<i::JSReceiver> handler = Utils::OpenHandle(*local_handler); | 6744 i::Handle<i::JSReceiver> handler = Utils::OpenHandle(*local_handler); |
| 6745 Local<Proxy> result; | 6745 Local<Proxy> result; |
| 6746 has_pending_exception = | 6746 has_pending_exception = |
| 6747 !ToLocal<Proxy>(i::JSProxy::New(isolate, target, handler), &result); | 6747 !ToLocal<Proxy>(i::JSProxy::New(isolate, target, handler), &result); |
| 6748 RETURN_ON_FAILED_EXECUTION(Proxy); | 6748 RETURN_ON_FAILED_EXECUTION(Proxy); |
| 6749 RETURN_ESCAPED(result); | 6749 RETURN_ESCAPED(result); |
| 6750 } | 6750 } |
| 6751 | 6751 |
| 6752 // static |
| 6753 v8::ArrayBuffer::Allocator* v8::ArrayBuffer::Allocator::NewDefaultAllocator() { |
| 6754 return new ArrayBufferAllocator(); |
| 6755 } |
| 6756 |
| 6752 bool v8::ArrayBuffer::IsExternal() const { | 6757 bool v8::ArrayBuffer::IsExternal() const { |
| 6753 return Utils::OpenHandle(this)->is_external(); | 6758 return Utils::OpenHandle(this)->is_external(); |
| 6754 } | 6759 } |
| 6755 | 6760 |
| 6756 | 6761 |
| 6757 bool v8::ArrayBuffer::IsNeuterable() const { | 6762 bool v8::ArrayBuffer::IsNeuterable() const { |
| 6758 return Utils::OpenHandle(this)->is_neuterable(); | 6763 return Utils::OpenHandle(this)->is_neuterable(); |
| 6759 } | 6764 } |
| 6760 | 6765 |
| 6761 | 6766 |
| (...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8924 Address callback_address = | 8929 Address callback_address = |
| 8925 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8930 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8926 VMState<EXTERNAL> state(isolate); | 8931 VMState<EXTERNAL> state(isolate); |
| 8927 ExternalCallbackScope call_scope(isolate, callback_address); | 8932 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8928 callback(info); | 8933 callback(info); |
| 8929 } | 8934 } |
| 8930 | 8935 |
| 8931 | 8936 |
| 8932 } // namespace internal | 8937 } // namespace internal |
| 8933 } // namespace v8 | 8938 } // namespace v8 |
| OLD | NEW |