Index: sdk/lib/_internal/lib/js_helper.dart |
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart |
index fadb9846d74a2e0f013707ccd60065748435b89e..453e1ac8b4dc1ba6018f8d79a616dc4b8802bbba 100644 |
--- a/sdk/lib/_internal/lib/js_helper.dart |
+++ b/sdk/lib/_internal/lib/js_helper.dart |
@@ -679,7 +679,7 @@ checkString(value) { |
* object out of the wrapper again. |
*/ |
wrapException(ex) { |
- if (ex == null) ex = const NullThrownError(); |
+ if (ex == null) ex = new NullThrownError(); |
var wrapper = new DartError(ex); |
if (JS('bool', '!!Error.captureStackTrace')) { |
@@ -1023,7 +1023,7 @@ jsPropertyAccess(var jsObject, String property) { |
* Called at the end of unaborted switch cases to get the singleton |
* FallThroughError exception that will be thrown. |
*/ |
-getFallThroughError() => const FallThroughErrorImplementation(); |
+getFallThroughError() => new FallThroughErrorImplementation(); |
/** |
* Represents the type dynamic. The compiler treats this specially. |
@@ -1439,8 +1439,8 @@ class CastErrorImplementation implements CastError { |
String toString() => message; |
} |
-class FallThroughErrorImplementation implements FallThroughError { |
- const FallThroughErrorImplementation(); |
+class FallThroughErrorImplementation extends FallThroughError { |
+ FallThroughErrorImplementation(); |
String toString() => "Switch case fall-through."; |
} |
@@ -1478,7 +1478,7 @@ void throwCyclicInit(String staticName) { |
/** |
* Error thrown when a runtime error occurs. |
*/ |
-class RuntimeError implements Error { |
+class RuntimeError extends Error { |
final message; |
RuntimeError(this.message); |
String toString() => "RuntimeError: $message"; |