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

Unified Diff: runtime/lib/simd128.cc

Issue 533483003: Cleanup throwing of the RangeError in the runtime to remove duplicated code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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: runtime/lib/simd128.cc
diff --git a/runtime/lib/simd128.cc b/runtime/lib/simd128.cc
index e21655597fe97ca7d54b1a5ee47dc6826b0b2fa1..fcf8d5259ec34b060c614fb9c517ed2bbc0b2c75 100644
--- a/runtime/lib/simd128.cc
+++ b/runtime/lib/simd128.cc
@@ -16,9 +16,7 @@ static void ThrowMaskRangeException(int64_t m) {
const String& error = String::Handle(
String::NewFormatted("mask (%" Pd64 ") must be in the range [0..256)",
m));
- const Array& args = Array::Handle(Array::New(1));
- args.SetAt(0, error);
- Exceptions::ThrowByType(Exceptions::kRange, args);
+ Exceptions::ThrowRangeError(error);
}
}

Powered by Google App Engine
This is Rietveld 408576698