From 80155170cefde7599411ba888360456543e35881 Mon Sep 17 00:00:00 2001 From: "floitsch@google.com" Date: Mon, 13 Apr 2015 07:49:54 +0000 Subject: [PATCH] dart2js: Fix csp minified. For the most part this only required status file or test updates. There was, however, a bug in the code that extracted the class-name from its constructor. R=sra@google.com Review URL: https://codereview.chromium.org//1073273002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45084 260f80e4-7a28-3924-810f-c04153c831b5 --- sdk/lib/_internal/compiler/js_lib/js_helper.dart | 2 +- tests/html/canvas_pixel_array_type_alias_test.dart | 2 ++ tests/html/html.status | 3 +++ tests/language/language_dart2js.status | 6 ++++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart index 2248dc6ef57..c2d26ff6029 100644 --- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart +++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart @@ -726,7 +726,7 @@ class Primitives { // the name out of that. If the decompiled name is a string containing an // identifier, we use that instead of the very generic 'Object'. var decompiled = - JS('var', r'#.match(/^\s*function\s*(\S*)\s*\(/)[1]', + JS('var', r'#.match(/^\s*function\s*([\w$]*)\s*\(/)[1]', JS('var', r'String(#.constructor)', object)); if (decompiled is String) if (JS('bool', r'/^\w+$/.test(#)', decompiled)) diff --git a/tests/html/canvas_pixel_array_type_alias_test.dart b/tests/html/canvas_pixel_array_type_alias_test.dart index f346850f3c5..4dd6b407825 100644 --- a/tests/html/canvas_pixel_array_type_alias_test.dart +++ b/tests/html/canvas_pixel_array_type_alias_test.dart @@ -94,7 +94,9 @@ main() { var data = context.createImageData(canvas.width, canvas.height).data; expect(inscrutable(data).runtimeType == data.runtimeType, isTrue); }); + }); + group('types2_runtimeTypeName', () { test('runtimeTypeName', () { var data = context.createImageData(canvas.width, canvas.height).data; expect('${inscrutable(data).runtimeType}', 'Uint8ClampedList'); diff --git a/tests/html/html.status b/tests/html/html.status index 5d9ac65d5ca..5de74c5acc8 100644 --- a/tests/html/html.status +++ b/tests/html/html.status @@ -185,6 +185,9 @@ xsltprocessor_test/supported: Fail worker_test/functional: Fail # IE uses incorrect security context for Blob URIs. transferables_test: Fail # Issue 9846 +[ $compiler == dart2js && $minified ] +canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605 + [ $compiler == dart2js && $runtime == chrome ] css_test/supportsPointConversions: Fail # Issues 21710 css_test/functional: Fail # Issues 21710 diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status index dd3cf4c6930..e5a340ae6a9 100644 --- a/tests/language/language_dart2js.status +++ b/tests/language/language_dart2js.status @@ -109,11 +109,13 @@ positional_parameters_type_test/02: MissingRuntimeError, OK issue13474_test: RuntimeError, OK generic_field_mixin3_test: Crash # Issue 18651 +[ $compiler == dart2js && $unchecked && $minified ] +f_bounded_quantification5_test: Fail, OK # Issue 12605 + [ $compiler == dart2js && $minified ] cyclic_type_test/0*: Fail # Issue 12605 cyclic_type2_test: Fail # Issue 12605 -f_bounded_quantification4_test: Fail # Issue 12605 -f_bounded_quantification5_test: Fail # Issue 12605 +f_bounded_quantification4_test: Fail, OK # Issue 12605 mixin_generic_test: Fail # Issue 12605 mixin_mixin2_test: Fail # Issue 12605 mixin_mixin3_test: Fail # Issue 12605