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

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

Issue 3005533002: Fix the return type of String.split in DDC to be correct (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | tests/corelib_2/corelib_2.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/js_string.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_string.dart b/pkg/dev_compiler/tool/input_sdk/private/js_string.dart
index 08a9edb7bb5260cb900dc523232f559223a00166..3ca371308299a21a342625e75460ceed53cc0bb9 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_string.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_string.dart
@@ -97,10 +97,10 @@ class JSString extends Interceptor implements String, JSIndexable<String> {
@notNull
List<String> split(@nullCheck Pattern pattern) {
if (pattern is String) {
- return JS('JSExtendableArray', r'#.split(#)', this, pattern);
+ return new JSArray.of(JS('', r'#.split(#)', this, pattern));
} else if (pattern is JSSyntaxRegExp && regExpCaptureCount(pattern) == 0) {
var re = regExpGetNative(pattern);
- return JS('JSExtendableArray', r'#.split(#)', this, re);
+ return new JSArray.of(JS('', r'#.split(#)', this, re));
} else {
return _defaultSplit(pattern);
}
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | tests/corelib_2/corelib_2.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698