Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index be0281b846e7520ab28b581ac18fb078bc4d8de9..0394162200e982ca5323f49abe88cc851020bcb3 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -10703,19 +10703,20 @@ static MaybeObject* DebugLookupResultValue(Heap* heap, |
case CALLBACKS: { |
Object* structure = result->GetCallbackObject(); |
if (structure->IsForeign() || structure->IsAccessorInfo()) { |
- MaybeObject* maybe_value = result->holder()->GetPropertyWithCallback( |
- receiver, structure, name); |
- if (!maybe_value->ToObject(&value)) { |
- if (maybe_value->IsRetryAfterGC()) return maybe_value; |
- ASSERT(maybe_value->IsException()); |
- maybe_value = heap->isolate()->pending_exception(); |
+ Isolate* isolate = heap->isolate(); |
+ HandleScope scope(isolate); |
+ Handle<Object> 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 maybe_value; |
+ if (caught_exception != NULL) *caught_exception = true; |
+ return exception; |
} |
- return value; |
+ return *value; |
} else { |
return heap->undefined_value(); |
} |