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

Unified Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 26971005: Tighter native type annotations for some elements returning Lists (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | sdk/lib/_internal/lib/js_rti.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0219440d185720947107cd8138a06b4094d377be..e346734f1b13f6f0b4f5e06622b5d618d70c3138 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -1030,7 +1030,8 @@ class TypeErrorDecoder {
/// JavaScript toString on receiver), but it has degenerated into
/// "[object Object]" in recent versions.
matchTypeError(message) {
- var match = JS('List|Null', 'new RegExp(#).exec(#)', _pattern, message);
+ var match = JS('JSExtendableArray|Null',
+ 'new RegExp(#).exec(#)', _pattern, message);
if (match == null) return null;
var result = JS('', '{}');
if (_arguments != -1) {
@@ -1093,7 +1094,7 @@ class TypeErrorDecoder {
// have been escaped already), as we will soon be inserting
// regular expression syntax that we want interpreted by RegExp.
List<String> match =
- JS('List|Null', r"#.match(/\\\$[a-zA-Z]+\\\$/g)", message);
+ JS('JSExtendableArray|Null', r"#.match(/\\\$[a-zA-Z]+\\\$/g)", message);
if (match == null) match = [];
// Find the positions within the substring matches of the error message
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_rti.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698