| 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 3571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3582 | 3582 |
| 3583 MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context, | 3583 MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context, |
| 3584 Local<String> key) { | 3584 Local<String> key) { |
| 3585 PREPARE_FOR_EXECUTION(context, "v8::Object::GetOwnPropertyDescriptor()", | 3585 PREPARE_FOR_EXECUTION(context, "v8::Object::GetOwnPropertyDescriptor()", |
| 3586 Value); | 3586 Value); |
| 3587 auto obj = Utils::OpenHandle(this); | 3587 auto obj = Utils::OpenHandle(this); |
| 3588 auto key_name = Utils::OpenHandle(*key); | 3588 auto key_name = Utils::OpenHandle(*key); |
| 3589 i::Handle<i::Object> args[] = { obj, key_name }; | 3589 i::Handle<i::Object> args[] = { obj, key_name }; |
| 3590 i::Handle<i::Object> result; | 3590 i::Handle<i::Object> result; |
| 3591 has_pending_exception = | 3591 has_pending_exception = |
| 3592 !CallV8HeapFunction(isolate, "ObjectGetOwnPropertyDescriptor", | 3592 !CallV8HeapFunction(isolate, "$objectGetOwnPropertyDescriptor", |
| 3593 isolate->factory()->undefined_value(), | 3593 isolate->factory()->undefined_value(), |
| 3594 arraysize(args), args).ToHandle(&result); | 3594 arraysize(args), args).ToHandle(&result); |
| 3595 RETURN_ON_FAILED_EXECUTION(Value); | 3595 RETURN_ON_FAILED_EXECUTION(Value); |
| 3596 RETURN_ESCAPED(Utils::ToLocal(result)); | 3596 RETURN_ESCAPED(Utils::ToLocal(result)); |
| 3597 } | 3597 } |
| 3598 | 3598 |
| 3599 | 3599 |
| 3600 Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<String> key) { | 3600 Local<Value> v8::Object::GetOwnPropertyDescriptor(Local<String> key) { |
| 3601 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); | 3601 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); |
| 3602 RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyDescriptor(context, key), Value); | 3602 RETURN_TO_LOCAL_UNCHECKED(GetOwnPropertyDescriptor(context, key), Value); |
| (...skipping 4440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8043 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8043 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8044 Address callback_address = | 8044 Address callback_address = |
| 8045 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8045 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8046 VMState<EXTERNAL> state(isolate); | 8046 VMState<EXTERNAL> state(isolate); |
| 8047 ExternalCallbackScope call_scope(isolate, callback_address); | 8047 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8048 callback(info); | 8048 callback(info); |
| 8049 } | 8049 } |
| 8050 | 8050 |
| 8051 | 8051 |
| 8052 } } // namespace v8::internal | 8052 } } // namespace v8::internal |
| OLD | NEW |