Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c941f536192ea8690cb7999ace08cb3ec6c4166f..bf28e0ad6859890b49bd082751f63bc1fc2cdc36 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -238,6 +238,7 @@ MaybeObject* Object::GetPropertyWithHandler(Object* receiver_raw, |
// Extract trap function. |
Handle<String> trap_name = isolate->factory()->LookupAsciiSymbol("get"); |
Handle<Object> trap(v8::internal::GetProperty(handler, trap_name)); |
+ if (isolate->has_pending_exception()) return Failure::Exception(); |
if (trap->IsUndefined()) { |
// Get the derived `get' property. |
trap = isolate->derived_get_trap(); |
@@ -2255,6 +2256,7 @@ bool JSProxy::HasPropertyWithHandler(String* name_raw) { |
// Extract trap function. |
Handle<String> trap_name = isolate->factory()->LookupAsciiSymbol("has"); |
Handle<Object> trap(v8::internal::GetProperty(handler, trap_name)); |
+ if (isolate->has_pending_exception()) return Failure::Exception(); |
if (trap->IsUndefined()) { |
trap = isolate->derived_has_trap(); |
} |
@@ -2285,6 +2287,7 @@ MUST_USE_RESULT MaybeObject* JSProxy::SetPropertyWithHandler( |
// Extract trap function. |
Handle<String> trap_name = isolate->factory()->LookupAsciiSymbol("set"); |
Handle<Object> trap(v8::internal::GetProperty(handler, trap_name)); |
+ if (isolate->has_pending_exception()) return Failure::Exception(); |
if (trap->IsUndefined()) { |
trap = isolate->derived_set_trap(); |
} |
@@ -2312,6 +2315,7 @@ MUST_USE_RESULT MaybeObject* JSProxy::DeletePropertyWithHandler( |
// Extract trap function. |
Handle<String> trap_name = isolate->factory()->LookupAsciiSymbol("delete"); |
Handle<Object> trap(v8::internal::GetProperty(handler, trap_name)); |
+ if (isolate->has_pending_exception()) return Failure::Exception(); |
if (trap->IsUndefined()) { |
Handle<Object> args[] = { handler, trap_name }; |
Handle<Object> error = isolate->factory()->NewTypeError( |
@@ -2353,6 +2357,7 @@ MUST_USE_RESULT PropertyAttributes JSProxy::GetPropertyAttributeWithHandler( |
Handle<String> trap_name = |
isolate->factory()->LookupAsciiSymbol("getPropertyDescriptor"); |
Handle<Object> trap(v8::internal::GetProperty(handler, trap_name)); |
+ if (isolate->has_pending_exception()) return NONE; |
if (trap->IsUndefined()) { |
Handle<Object> args[] = { handler, trap_name }; |
Handle<Object> error = isolate->factory()->NewTypeError( |