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

Unified Diff: src/runtime.cc

Issue 225673003: Return MaybeHandle from GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 6a0f13765da6721df504eb2ba33024b495e645be..9a6e4f6ec2091d38235a0829821efc64e0fd68b7 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -10828,18 +10828,17 @@ static MaybeObject* DebugLookupResultValue(Heap* heap,
if (structure->IsForeign() || structure->IsAccessorInfo()) {
Isolate* isolate = heap->isolate();
HandleScope scope(isolate);
- Handle<Object> value = JSObject::GetPropertyWithCallback(
+ MaybeHandle<Object> maybe_value = JSObject::GetPropertyWithCallback(
handle(result->holder(), isolate),
handle(receiver, isolate),
handle(structure, isolate),
handle(name, isolate));
- if (value.is_null()) {
- MaybeObject* exception = heap->isolate()->pending_exception();
- heap->isolate()->clear_pending_exception();
- if (caught_exception != NULL) *caught_exception = true;
- return exception;
- }
- return *value;
+ Handle<Object> value;
+ if (maybe_value.ToHandle(&value)) return *value;
+ MaybeObject* exception = heap->isolate()->pending_exception();
+ heap->isolate()->clear_pending_exception();
+ if (caught_exception != NULL) *caught_exception = true;
+ return exception;
} else {
return heap->undefined_value();
}
@@ -11022,9 +11021,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugNamedInterceptorPropertyValue) {
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
PropertyAttributes attributes;
- Handle<Object> result =
- JSObject::GetPropertyWithInterceptor(obj, obj, name, &attributes);
- RETURN_IF_EMPTY_HANDLE(isolate, result);
+ Handle<Object> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result,
+ JSObject::GetPropertyWithInterceptor(obj, obj, name, &attributes));
return *result;
}
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698