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

Side by Side Diff: src/api.cc

Issue 314953006: Implement LookupIterator designed to replace LookupResult (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding to BUILD.gn 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 | « BUILD.gn ('k') | src/arm/stub-cache-arm.cc » ('j') | src/lookup.h » ('J')
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 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
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
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/arm/stub-cache-arm.cc » ('j') | src/lookup.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698