Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 8f668fb3b142570207cc07080e5c9b1f71966d51..7a08eec3fb5e341b070751c24e7c26eb2f9a04f8 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2966,7 +2966,8 @@ Object* JSObject::DefineAccessor(AccessorInfo* info) { |
break; |
} |
- SetElementCallback(index, info, info->property_attributes()); |
+ Object* ok = SetElementCallback(index, info, info->property_attributes()); |
+ if (ok->IsFailure()) return ok; |
} else { |
// Lookup the name. |
LookupResult result; |
@@ -2976,7 +2977,8 @@ Object* JSObject::DefineAccessor(AccessorInfo* info) { |
if (result.IsProperty() && (result.IsReadOnly() || result.IsDontDelete())) { |
return Heap::undefined_value(); |
} |
- SetPropertyCallback(name, info, info->property_attributes()); |
+ Object* ok = SetPropertyCallback(name, info, info->property_attributes()); |
+ if (ok->IsFailure()) return ok; |
} |
return this; |