Index: src/runtime/runtime-scopes.cc |
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
index 700925db622d718cd1497707de9058aa6c691337..d2d202c08d7b856fd91fe7c1a8e49602105b27b5 100644 |
--- a/src/runtime/runtime-scopes.cc |
+++ b/src/runtime/runtime-scopes.cc |
@@ -230,6 +230,8 @@ RUNTIME_FUNCTION(Runtime_DeclareLookupSlot) { |
BindingFlags binding_flags; |
Handle<Object> holder = |
context->Lookup(name, flags, &index, &attributes, &binding_flags); |
+ // In case of JSProxy, an exception might have been thrown. |
+ if (isolate->has_pending_exception()) return isolate->heap()->exception(); |
Yang
2015/07/08 07:55:18
This looks hacky. I.e. we should have returned a M
|
Handle<JSObject> object; |
Handle<Object> value = |
@@ -308,6 +310,8 @@ RUNTIME_FUNCTION(Runtime_InitializeLegacyConstLookupSlot) { |
BindingFlags binding_flags; |
Handle<Object> holder = |
context->Lookup(name, flags, &index, &attributes, &binding_flags); |
+ // In case of JSProxy, an exception might have been thrown. |
+ if (isolate->has_pending_exception()) return isolate->heap()->exception(); |
if (index >= 0) { |
DCHECK(holder->IsContext()); |
@@ -855,6 +859,8 @@ RUNTIME_FUNCTION(Runtime_DeleteLookupSlot) { |
// If the slot was not found the result is true. |
if (holder.is_null()) { |
+ // In case of JSProxy, an exception might have been thrown. |
+ if (isolate->has_pending_exception()) return isolate->heap()->exception(); |
return isolate->heap()->true_value(); |
} |