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

Unified Diff: sdk/lib/_internal/compiler/js_lib/core_patch.dart

Issue 1181003005: Use ArgumentError.value in more places in js_lib. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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: sdk/lib/_internal/compiler/js_lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/core_patch.dart b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
index d42f9a854e1d7be99076861688d9a6eb6cab4d9f..047800e86905302ee31f136c93d8ce35682ac939 100644
--- a/sdk/lib/_internal/compiler/js_lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
@@ -180,7 +180,8 @@ class DateTime {
bool isUtc)
// checkBool is manually inlined here because dart2js doesn't inline it
// and [isUtc] is usually a constant.
- : this.isUtc = isUtc is bool ? isUtc : throw new ArgumentError(isUtc),
+ : this.isUtc =
+ isUtc is bool ? isUtc : throw new ArgumentError.value(isUtc),
Lasse Reichstein Nielsen 2015/06/19 12:22:06 Use .value(isUtc, "isUtc").
sra1 2015/06/19 17:57:59 Done.
millisecondsSinceEpoch = checkInt(Primitives.valueFromDecomposedDate(
year, month, day, hour, minute, second, millisecond, isUtc));

Powered by Google App Engine
This is Rietveld 408576698