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

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: 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 | src/arm64/stub-cache-arm64.cc » ('j') | src/lookup.cc » ('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 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | src/arm64/stub-cache-arm64.cc » ('j') | src/lookup.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698