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/compiler/lib/src/dart2js.dart

Issue 1457383003: Alternative fix for the js-interop crash. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/js_interop_analysis.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index fa7aeb734416f54622013c9333148631401373e8..662316bcd69ac7196a889f7acc55f2b44a05618d 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -119,6 +119,7 @@ Future<api.CompilationResult> compile(List<String> argv) {
bool dumpInfo = false;
bool allowNativeExtensions = false;
bool trustTypeAnnotations = false;
+ bool trustJSInteropTypeAnnotations = false;
bool checkedMode = false;
// List of provided options that imply that output is expected.
List<String> optionsImplyCompilation = <String>[];
@@ -227,6 +228,11 @@ Future<api.CompilationResult> compile(List<String> argv) {
implyCompilation(argument);
}
+ setTrustJSInteropTypeAnnotations(String argument) {
+ trustJSInteropTypeAnnotations = true;
+ implyCompilation(argument);
+ }
+
setTrustPrimitives(String argument) {
implyCompilation(argument);
}
@@ -326,6 +332,9 @@ Future<api.CompilationResult> compile(List<String> argv) {
new OptionHandler(Flags.trustPrimitives,
(_) => setTrustPrimitives(
Flags.trustPrimitives)),
+ new OptionHandler(Flags.trustJSInteropTypeAnnotations,
+ (_) => setTrustJSInteropTypeAnnotations(
+ Flags.trustJSInteropTypeAnnotations)),
new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
new OptionHandler('--packages=.+', setPackageConfig),
new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/js_interop_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698