Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: src/api.cc

Issue 329153002: Correctly lookup starting at the holder (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 i::LookupIterator it(receiver, name); 3521 i::LookupIterator it(
3522 receiver, name, i::Handle<i::JSReceiver>(lookup->holder(), isolate),
3523 i::LookupIterator::SKIP_INTERCEPTOR);
3522 i::Handle<i::Object> result; 3524 i::Handle<i::Object> result;
3523 has_pending_exception = !i::Object::GetProperty(&it).ToHandle(&result); 3525 has_pending_exception = !i::Object::GetProperty(&it).ToHandle(&result);
3524 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); 3526 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
3525 3527
3526 return Utils::ToLocal(result); 3528 return Utils::ToLocal(result);
3527 } 3529 }
3528 3530
3529 3531
3530 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( 3532 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
3531 Handle<String> key) { 3533 Handle<String> key) {
(...skipping 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after
7577 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7579 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7578 Address callback_address = 7580 Address callback_address =
7579 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7581 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7580 VMState<EXTERNAL> state(isolate); 7582 VMState<EXTERNAL> state(isolate);
7581 ExternalCallbackScope call_scope(isolate, callback_address); 7583 ExternalCallbackScope call_scope(isolate, callback_address);
7582 callback(info); 7584 callback(info);
7583 } 7585 }
7584 7586
7585 7587
7586 } } // namespace v8::internal 7588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698