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

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') | 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 // 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 3523 matching lines...) Expand 10 before | Expand all | Expand 10 after
3534 i::LookupResult* lookup) { 3534 i::LookupResult* lookup) {
3535 if (!lookup->IsProperty()) { 3535 if (!lookup->IsProperty()) {
3536 // No real property was found. 3536 // No real property was found.
3537 return Local<Value>(); 3537 return Local<Value>();
3538 } 3538 }
3539 3539
3540 // If the property being looked up is a callback, it can throw 3540 // If the property being looked up is a callback, it can throw
3541 // an exception. 3541 // an exception.
3542 EXCEPTION_PREAMBLE(isolate); 3542 EXCEPTION_PREAMBLE(isolate);
3543 PropertyAttributes ignored; 3543 PropertyAttributes ignored;
3544 i::Handle<i::Object> result = 3544 i::Handle<i::Object> result;
3545 i::Object::GetProperty(receiver, receiver, lookup, name, 3545 has_pending_exception = !i::Object::GetProperty(
3546 &ignored); 3546 receiver, receiver, lookup, name, &ignored).ToHandle(&result);
3547 has_pending_exception = result.is_null();
3548 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); 3547 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
3549 3548
3550 return Utils::ToLocal(result); 3549 return Utils::ToLocal(result);
3551 } 3550 }
3552 3551
3553 3552
3554 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( 3553 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
3555 Handle<String> key) { 3554 Handle<String> key) {
3556 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3555 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3557 ON_BAILOUT(isolate, 3556 ON_BAILOUT(isolate,
(...skipping 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after
7663 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7662 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7664 Address callback_address = 7663 Address callback_address =
7665 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7664 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7666 VMState<EXTERNAL> state(isolate); 7665 VMState<EXTERNAL> state(isolate);
7667 ExternalCallbackScope call_scope(isolate, callback_address); 7666 ExternalCallbackScope call_scope(isolate, callback_address);
7668 callback(info); 7667 callback(info);
7669 } 7668 }
7670 7669
7671 7670
7672 } } // namespace v8::internal 7671 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698