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

Unified Diff: tool/input_sdk/private/js_helper.dart

Issue 1943563002: Updates for js_array (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: 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
« no previous file with comments | « tool/input_sdk/private/js_array.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/js_helper.dart
diff --git a/tool/input_sdk/private/js_helper.dart b/tool/input_sdk/private/js_helper.dart
index 0ffb17b49bdb2c94bb233aab14b8adb9c377c03a..f40855a9721a4ae6caa797cd0fb47d6b535057f9 100644
--- a/tool/input_sdk/private/js_helper.dart
+++ b/tool/input_sdk/private/js_helper.dart
@@ -547,6 +547,12 @@ throwAbstractClassInstantiationError(className) {
throw new AbstractClassInstantiationError(className);
}
+
+@NoInline()
+throwConcurrentModificationError(collection) {
+ throw new ConcurrentModificationError(collection);
+}
+
class NullError extends Error implements NoSuchMethodError {
final String _message;
final String _method;
@@ -556,7 +562,7 @@ class NullError extends Error implements NoSuchMethodError {
String toString() {
if (_method == null) return 'NullError: $_message';
- return 'NullError: Cannot call "$_method" on null';
+ return "NullError: method not found: '$_method' on null";
}
}
@@ -573,10 +579,10 @@ class JsNoSuchMethodError extends Error implements NoSuchMethodError {
String toString() {
if (_method == null) return 'NoSuchMethodError: $_message';
if (_receiver == null) {
- return 'NoSuchMethodError: Cannot call "$_method" ($_message)';
+ return "NoSuchMethodError: method not found: '$_method' ($_message)";
}
- return 'NoSuchMethodError: Cannot call "$_method" on "$_receiver" '
- '($_message)';
+ return "NoSuchMethodError: "
+ "method not found: '$_method' on '$_receiver' ($_message)";
}
}
@@ -600,10 +606,11 @@ class _StackTrace implements StackTrace {
_StackTrace(this._exception);
String toString() {
- if (_trace != null) return _trace;
+ if (_trace != null) return JS('String', '#', _trace);
String trace;
- if (JS('bool', 'typeof # === "object"', _exception)) {
+ if (JS('bool', '# !== null', _exception) &&
+ JS('bool', 'typeof # === "object"', _exception)) {
trace = JS("String|Null", r"#.stack", _exception);
}
return _trace = (trace == null) ? '' : trace;
« no previous file with comments | « tool/input_sdk/private/js_array.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698