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 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3527 i::Handle<i::String> name, | 3527 i::Handle<i::String> name, |
3528 i::LookupResult* lookup) { | 3528 i::LookupResult* lookup) { |
3529 if (!lookup->IsProperty()) { | 3529 if (!lookup->IsProperty()) { |
3530 // No real property was found. | 3530 // No real property was found. |
3531 return Local<Value>(); | 3531 return Local<Value>(); |
3532 } | 3532 } |
3533 | 3533 |
3534 // If the property being looked up is a callback, it can throw | 3534 // If the property being looked up is a callback, it can throw |
3535 // an exception. | 3535 // an exception. |
3536 EXCEPTION_PREAMBLE(isolate); | 3536 EXCEPTION_PREAMBLE(isolate); |
3537 PropertyAttributes ignored; | 3537 i::LookupIterator it(receiver, name); |
3538 i::Handle<i::Object> result; | 3538 i::Handle<i::Object> result; |
3539 has_pending_exception = !i::Object::GetProperty( | 3539 has_pending_exception = !i::Object::GetProperty(&it).ToHandle(&result); |
3540 receiver, receiver, lookup, name, &ignored).ToHandle(&result); | |
3541 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); | 3540 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); |
3542 | 3541 |
3543 return Utils::ToLocal(result); | 3542 return Utils::ToLocal(result); |
3544 } | 3543 } |
3545 | 3544 |
3546 | 3545 |
3547 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( | 3546 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( |
3548 Handle<String> key) { | 3547 Handle<String> key) { |
3549 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3548 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3550 ON_BAILOUT(isolate, | 3549 ON_BAILOUT(isolate, |
(...skipping 4043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7594 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7593 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7595 Address callback_address = | 7594 Address callback_address = |
7596 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7595 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7597 VMState<EXTERNAL> state(isolate); | 7596 VMState<EXTERNAL> state(isolate); |
7598 ExternalCallbackScope call_scope(isolate, callback_address); | 7597 ExternalCallbackScope call_scope(isolate, callback_address); |
7599 callback(info); | 7598 callback(info); |
7600 } | 7599 } |
7601 | 7600 |
7602 | 7601 |
7603 } } // namespace v8::internal | 7602 } } // namespace v8::internal |
OLD | NEW |