diff --git a/DEPS b/DEPS index 1b9a36b53e4..fa523eb9955 100644 --- a/DEPS +++ b/DEPS @@ -31,7 +31,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS. # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '0fd6aa87a37023d9691cf50866214c1235dab2d1', + 'dart_revision': 'fe96de2858f078e4ad04f8f30640184bf3d8102d', 'dart_args_tag': '0.13.7', 'dart_async_tag': '2.0.4', diff --git a/common/settings.h b/common/settings.h index cf1de7b8732..5bb5c6cbbea 100644 --- a/common/settings.h +++ b/common/settings.h @@ -24,7 +24,6 @@ struct Settings { bool enable_dart_profiling = false; bool use_test_fonts = false; bool dart_non_checked_mode = false; - bool dart_strong_mode = false; bool enable_software_rendering = false; bool using_blink = true; std::string aot_shared_library_path; diff --git a/runtime/dart_init.cc b/runtime/dart_init.cc index 642555b0d32..e96d07e2789 100644 --- a/runtime/dart_init.cc +++ b/runtime/dart_init.cc @@ -599,18 +599,6 @@ void InitDartVM(const uint8_t* vm_snapshot_data, arraysize(kDartWriteProtectCodeArgs)); #endif - if (settings.dart_strong_mode) { - // In strong mode we enable all the strong mode options and if running - // debug product mode we also enable asserts. - PushBackAll(&args, kDartStrongModeArgs, arraysize(kDartStrongModeArgs)); - if (use_checked_mode) { - PushBackAll(&args, kDartAssertArgs, arraysize(kDartAssertArgs)); - } - } else if (use_checked_mode) { - PushBackAll(&args, kDartAssertArgs, arraysize(kDartAssertArgs)); - PushBackAll(&args, kDartCheckedModeArgs, arraysize(kDartCheckedModeArgs)); - } - if (settings.start_paused) PushBackAll(&args, kDartStartPausedArgs, arraysize(kDartStartPausedArgs)); @@ -641,6 +629,24 @@ void InitDartVM(const uint8_t* vm_snapshot_data, FXL_DCHECK(kernel_platform != nullptr); } } + if ((kernel_platform != nullptr) || + Dart_IsDart2Snapshot(g_default_isolate_snapshot_data)) { + // The presence of the kernel platform file or a snapshot that was generated + // for Dart2 indicates we are running in preview-dart-2 mode and in this + // mode enable strong mode options by default. + // Note: When we start using core snapshots instead of the platform file + // in the engine just sniffing the snapshot file should be sufficient. + PushBackAll(&args, kDartStrongModeArgs, arraysize(kDartStrongModeArgs)); + // In addition if we are running in debug mode we also enable asserts. + if (use_checked_mode) { + PushBackAll(&args, kDartAssertArgs, arraysize(kDartAssertArgs)); + } + } else if (use_checked_mode) { + // In non preview-dart-2 mode we enable checked mode and asserts if + // we are running in debug mode. + PushBackAll(&args, kDartAssertArgs, arraysize(kDartAssertArgs)); + PushBackAll(&args, kDartCheckedModeArgs, arraysize(kDartCheckedModeArgs)); + } for (size_t i = 0; i < settings.dart_flags.size(); i++) args.push_back(settings.dart_flags[i].c_str()); diff --git a/shell/common/shell.cc b/shell/common/shell.cc index cfa32dc599c..c6006f10968 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -107,10 +107,6 @@ void Shell::InitStandalone(fxl::CommandLine command_line, settings.dart_non_checked_mode = command_line.HasOption(FlagForSwitch(Switch::DartNonCheckedMode)); - // strong mode setting. - settings.dart_strong_mode = - command_line.HasOption(FlagForSwitch(Switch::DartStrongMode)); - settings.ipv6 = command_line.HasOption(FlagForSwitch(Switch::IPv6)); settings.start_paused = diff --git a/shell/common/switches.h b/shell/common/switches.h index 4e41408569c..6d5bd03a80a 100644 --- a/shell/common/switches.h +++ b/shell/common/switches.h @@ -104,7 +104,6 @@ DEF_SWITCH(DartNonCheckedMode, "precompiled and checked mode is unsupported. However, this flag " "may be specified if the user wishes to run in the debug product " "mode (i.e. with JIT or DBC) with checked mode off.") -DEF_SWITCH(DartStrongMode, "strong", "Enable Dart 2.0 strong mode.") DEF_SWITCHES_END void PrintUsage(const std::string& executable_name); diff --git a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java index 47af58e96d7..4472b8b194e 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java +++ b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java @@ -301,9 +301,6 @@ public final class FlutterActivityDelegate if (intent.getBooleanExtra("trace-skia", false)) { args.add("--trace-skia"); } - if (intent.getBooleanExtra("strong", false)) { - args.add("--strong"); - } if (!args.isEmpty()) { String[] argsArray = new String[args.size()]; return args.toArray(argsArray); diff --git a/travis/licenses_golden/licenses_third_party b/travis/licenses_golden/licenses_third_party index 18e0c862fe6..69908844dc7 100644 --- a/travis/licenses_golden/licenses_third_party +++ b/travis/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: ecc7589805cacc5ca3aab1dad966d380 +Signature: e5cf14253d584dd35dabad02ec06205b UNUSED LICENSES: