Remove support for the —enable-checked-mode flag from the engine. (flutter/engine#2987)

This commit is contained in:
Chinmay Garde
2016-08-31 09:46:05 -07:00
committed by GitHub
parent 72eab498d0
commit 66ecf81e48
2 changed files with 4 additions and 9 deletions

View File

@@ -18,7 +18,6 @@ struct Settings {
// on the target with the port after it has been selected.
uint32_t observatory_port = 0;
bool start_paused = false;
bool enable_dart_checked_mode = false;
bool trace_startup = false;
bool endless_trace_buffer = false;
std::string aot_snapshot_path;

View File

@@ -522,13 +522,6 @@ void SetRegisterNativeServiceProtocolExtensionHook(
g_register_native_service_protocol_extensions_hook = hook;
}
static bool ShouldEnableCheckedMode() {
// Checked mode is never enabled during precompilation. Even snapshot
// generation disables checked mode arguments.
return IsRunningPrecompiledCode() ? false
: Settings::Get().enable_dart_checked_mode;
}
void PushBackAll(std::vector<const char*>* args,
const char** argv,
size_t argc) {
@@ -572,8 +565,11 @@ void InitDartVM() {
arraysize(kDartPrecompilationArgs));
}
if (ShouldEnableCheckedMode())
if (!IsRunningPrecompiledCode()) {
// Enable checked mode if we are not running precompiled code. We run non-
// precompiled code only in the debug product mode.
PushBackAll(&args, kDartCheckedModeArgs, arraysize(kDartCheckedModeArgs));
}
if (settings.start_paused)
PushBackAll(&args, kDartStartPausedArgs, arraysize(kDartStartPausedArgs));