Clean up additional dart2js strong mode runtime error and don't add method type variable in dart 1 version.

Change-Id: I8f8a62fe2b4fcc00c05fbab22ed9e7a55eb95ccf
Reviewed-on: https://dart-review.googlesource.com/57523
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index eae6858..b589950 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -451,7 +451,7 @@
         //     {"": A.A$, "foo": A.A$foo, "bar": A.A$bar}
         //
         // We expect most of the time the map will be a singleton.
-        var properties = [];
+        var properties = <jsAst.Property>[];
         for (ConstructorEntity member in analysis.constructors(classElement)) {
           properties.add(new jsAst.Property(
               js.string(member.name), _emitter.staticFunctionAccess(member)));
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 468e038..4868207 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -926,10 +926,13 @@
     FunctionType functionType =
         _elementMap.getFunctionType(originalClosureNode);
     functionType.forEachTypeVariable((TypeVariableType typeVariableType) {
-      DartType result = localsHandler.substInContext(typeVariableType);
-      HInstruction argument =
-          typeBuilder.analyzeTypeArgument(result, sourceElement);
-      typeArguments.add(argument);
+      if (options.strongMode ||
+          typeVariableType.element.typeDeclaration is ClassEntity) {
+        DartType result = localsHandler.substInContext(typeVariableType);
+        HInstruction argument =
+            typeBuilder.analyzeTypeArgument(result, sourceElement);
+        typeArguments.add(argument);
+      }
     });
     push(new HTypeInfoExpression(
         TypeInfoExpressionKind.COMPLETE,
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 70fb077..ded000c 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -196,11 +196,6 @@
 [ $compiler == dart2js && $csp ]
 mutation_observer: Skip # This test cannot run under CSP because it is injecting a JavaScript polyfill
 
-[ $compiler == dart2js && $fasta && $host_checked ]
-analysis_server_client/test/analysis_server_client_test: Crash
-js_ast/test/printer_callback_test: Crash
-js_ast/test/string_escape_test: Crash
-
 [ $compiler == dart2js && ($runtime == chrome || $runtime == ff) ]
 async/test/stream_zip_test: SkipSlow # Times out. Issue 22050
 collection/test/unmodifiable_collection_test: SkipSlow # Times out. Issue 22050
diff --git a/tests/html/html.status b/tests/html/html.status
index 972a95a..9fe79e4 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -505,8 +505,8 @@
 mirrors_js_typed_interop_test: SkipByDesign
 
 [ $compiler == dart2js && $fasta && $host_checked ]
-fontface_loaded_test: Crash
-streams_test: Crash
+fontface_loaded_test: RuntimeError
+streams_test: RuntimeError
 
 [ $compiler == dart2js && $minified ]
 canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index 785d1a3..08c2590 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -689,10 +689,9 @@
 html/js_typed_interop_test: RuntimeError
 
 [ $compiler == dart2js && $fasta && $host_checked ]
-async/stream_controller_async_test: Crash
 html/custom/mirrors_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
 html/custom/mirrors_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
-html/fontface_loaded_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
+html/fontface_loaded_test: RuntimeError # TypeError: Cannot read property 'createFragment$3$treeSanitizer$validator' of undefined
 html/indexeddb_3_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
 html/indexeddb_5_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
 html/js_array_test: CompileTimeError