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

Unified Diff: src/runtime/runtime-array.cc

Issue 2006673002: Reduce boilerplace for common pattern to return MaybeHandle. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 7 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
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index 519df7784bca7a1506229f1f2da7491830beb5c9..c32d2ce4629aac3f1cd5d3b7ce6e52cb46dc58d5 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -491,11 +491,8 @@ RUNTIME_FUNCTION(Runtime_ArraySpeciesConstructor) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0);
- Handle<Object> constructor;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, constructor,
- Object::ArraySpeciesConstructor(isolate, original_array));
- return *constructor;
+ RETURN_RESULT_OR_FAILURE(
+ isolate, Object::ArraySpeciesConstructor(isolate, original_array));
}
} // namespace internal
« src/isolate.h ('K') | « src/isolate.h ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698