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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3511 i::Handle<i::String> name, | 3511 i::Handle<i::String> name, |
3512 i::LookupResult* lookup) { | 3512 i::LookupResult* lookup) { |
3513 if (!lookup->IsProperty()) { | 3513 if (!lookup->IsProperty()) { |
3514 // No real property was found. | 3514 // No real property was found. |
3515 return Local<Value>(); | 3515 return Local<Value>(); |
3516 } | 3516 } |
3517 | 3517 |
3518 // If the property being looked up is a callback, it can throw | 3518 // If the property being looked up is a callback, it can throw |
3519 // an exception. | 3519 // an exception. |
3520 EXCEPTION_PREAMBLE(isolate); | 3520 EXCEPTION_PREAMBLE(isolate); |
3521 PropertyAttributes ignored; | 3521 i::LookupIterator it(receiver, name); |
3522 i::Handle<i::Object> result; | 3522 i::Handle<i::Object> result; |
3523 has_pending_exception = !i::Object::GetProperty( | 3523 has_pending_exception = !i::Object::GetProperty(&it).ToHandle(&result); |
3524 receiver, receiver, lookup, name, &ignored).ToHandle(&result); | |
3525 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); | 3524 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); |
3526 | 3525 |
3527 return Utils::ToLocal(result); | 3526 return Utils::ToLocal(result); |
3528 } | 3527 } |
3529 | 3528 |
3530 | 3529 |
3531 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( | 3530 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( |
3532 Handle<String> key) { | 3531 Handle<String> key) { |
3533 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3532 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3534 ON_BAILOUT(isolate, | 3533 ON_BAILOUT(isolate, |
(...skipping 4043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7578 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7577 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7579 Address callback_address = | 7578 Address callback_address = |
7580 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7579 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7581 VMState<EXTERNAL> state(isolate); | 7580 VMState<EXTERNAL> state(isolate); |
7582 ExternalCallbackScope call_scope(isolate, callback_address); | 7581 ExternalCallbackScope call_scope(isolate, callback_address); |
7583 callback(info); | 7582 callback(info); |
7584 } | 7583 } |
7585 | 7584 |
7586 | 7585 |
7587 } } // namespace v8::internal | 7586 } } // namespace v8::internal |
OLD | NEW |