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

Unified Diff: src/accessors.cc

Issue 231883007: Return MaybeHandle from Invoke. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 35fff00230633704a2aefbf3c99880d6a84e647d..77550e4aceb6c943b88e81a11ad855fac032568c 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -224,13 +224,12 @@ MaybeObject* Accessors::ArraySetLength(Isolate* isolate,
Handle<JSArray> array_handle = Handle<JSArray>::cast(object);
- bool has_exception;
- Handle<Object> uint32_v =
- Execution::ToUint32(isolate, value, &has_exception);
- if (has_exception) return Failure::Exception();
- Handle<Object> number_v =
- Execution::ToNumber(isolate, value, &has_exception);
- if (has_exception) return Failure::Exception();
+ Handle<Object> uint32_v;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, uint32_v, Execution::ToUint32(isolate, value));
+ Handle<Object> number_v;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, number_v, Execution::ToNumber(isolate, value));
if (uint32_v->Number() == number_v->Number()) {
Handle<Object> result;
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698