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

Unified Diff: src/objects.cc

Issue 9467005: Simplified return values a bit when defining accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 17ef8dfd2308a39c87a41c76ac72e314ca9b302e..25e4fa9db9d64c49dda762d2e8373ae6b49202ea 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4450,10 +4450,7 @@ MaybeObject* JSObject::DefineElementAccessor(uint32_t index,
}
accessors->set(is_getter, fun);
- { MaybeObject* maybe_ok = SetElementCallback(index, accessors, attributes);
- if (maybe_ok->IsFailure()) return maybe_ok;
- }
- return GetHeap()->undefined_value();
+ return SetElementCallback(index, accessors, attributes);
}
@@ -4478,10 +4475,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
}
copy->set(is_getter, fun);
// Use set to update attributes.
- { MaybeObject* maybe_ok = SetPropertyCallback(name, copy, attributes);
- if (maybe_ok->IsFailure()) return maybe_ok;
- }
- return GetHeap()->undefined_value();
+ return SetPropertyCallback(name, copy, attributes);
}
}
}
@@ -4492,10 +4486,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
}
accessors->set(is_getter, fun);
- { MaybeObject* maybe_ok = SetPropertyCallback(name, accessors, attributes);
- if (maybe_ok->IsFailure()) return maybe_ok;
- }
- return GetHeap()->undefined_value();
+ return SetPropertyCallback(name, accessors, attributes);
}
« 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