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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/interceptors.dart

Issue 3009623002: fix list_test for strong mode, and fix DDC List constructors (Closed)
Patch Set: update status, one additional fix Created 3 years, 4 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: pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart b/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
index 58528e774653c30c6ea2d1fb87f59f6857996d85..6d5f6f52bbb5321dc2953c2008932ecbca6e0993 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
@@ -104,11 +104,23 @@ class NullError extends Interceptor implements NoSuchMethodError {
// TODO(vsm): Distinguish between null reference errors and other
// TypeErrors. We should not get non-null TypeErrors from DDC code,
// but we may from native JavaScript.
- var message = JS('String', '#.message', this);
- return "NullError: $message";
+ return "NullError: ${JS('String', '#.message', this)}";
}
}
+// Note that this needs to be in interceptors.dart in order for
+// it to be picked up as an extension type.
+@JsPeerInterface(name: 'RangeError')
+class JSRangeError extends Interceptor implements ArgumentError {
+ StackTrace get stackTrace => Primitives.extractStackTrace(this);
+
+ get invalidValue => null;
+ get name => null;
+ get message => JS('String', '#.message', this);
+
+ String toString() => "Invalid argument: $message";
+}
+
// Obsolete in dart dev compiler. Added only so that the same version of
// dart:html can be used in dart2js an dev compiler.
// Warning: calls to these methods need to be removed before custom elements

Powered by Google App Engine
This is Rietveld 408576698