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

Unified Diff: src/objects.cc

Issue 3035017: Properly propagate failures from helper methods. (Closed)
Patch Set: Created 10 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698