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

Side by Side Diff: src/api.cc

Issue 225673003: Return MaybeHandle from GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/ic.cc » ('j') | src/objects.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3536 i::LookupResult* lookup) { 3536 i::LookupResult* lookup) {
3537 if (!lookup->IsProperty()) { 3537 if (!lookup->IsProperty()) {
3538 // No real property was found. 3538 // No real property was found.
3539 return Local<Value>(); 3539 return Local<Value>();
3540 } 3540 }
3541 3541
3542 // If the property being looked up is a callback, it can throw 3542 // If the property being looked up is a callback, it can throw
3543 // an exception. 3543 // an exception.
3544 EXCEPTION_PREAMBLE(isolate); 3544 EXCEPTION_PREAMBLE(isolate);
3545 PropertyAttributes ignored; 3545 PropertyAttributes ignored;
3546 i::Handle<i::Object> result = 3546 i::Handle<i::Object> result;
3547 i::Object::GetProperty(receiver, receiver, lookup, name, 3547 has_pending_exception = !i::Object::GetProperty(
3548 &ignored); 3548 receiver, receiver, lookup, name, &ignored).ToHandle(&result);
3549 has_pending_exception = result.is_null();
3550 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); 3549 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
3551 3550
3552 return Utils::ToLocal(result); 3551 return Utils::ToLocal(result);
3553 } 3552 }
3554 3553
3555 3554
3556 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( 3555 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
3557 Handle<String> key) { 3556 Handle<String> key) {
3558 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3557 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3559 ON_BAILOUT(isolate, 3558 ON_BAILOUT(isolate,
(...skipping 4098 matching lines...) Expand 10 before | Expand all | Expand 10 after
7658 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7657 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7659 Address callback_address = 7658 Address callback_address =
7660 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7659 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7661 VMState<EXTERNAL> state(isolate); 7660 VMState<EXTERNAL> state(isolate);
7662 ExternalCallbackScope call_scope(isolate, callback_address); 7661 ExternalCallbackScope call_scope(isolate, callback_address);
7663 callback(info); 7662 callback(info);
7664 } 7663 }
7665 7664
7666 7665
7667 } } // namespace v8::internal 7666 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ic.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698