From 4f3eb42dfd8ac734a75c2b9b29fefe3001ceec4a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 7 Feb 2019 14:14:44 -0800 Subject: [PATCH] Update documentation for command line args in FlutterProjectArgs. (#7733) --- common/settings.h | 4 ++-- shell/platform/embedder/embedder.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/settings.h b/common/settings.h index d51052f3c1..c95e6eb7a5 100644 --- a/common/settings.h +++ b/common/settings.h @@ -97,8 +97,8 @@ struct Settings { std::function idle_notification_callback; // A callback given to the embedder to react to unhandled exceptions in the // running Flutter application. This callback is made on an internal engine - // managed thread and embedders must thread as necessary. Performing blocking - // calls in this callback will cause applications to jank. + // managed thread and embedders must re-thread as necessary. Performing + // blocking calls in this callback will cause applications to jank. UnhandledExceptionCallback unhandled_exception_callback; bool enable_software_rendering = false; bool skia_deterministic_rendering_on_cpu = false; diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index e0603644f4..cebe9d6b74 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -218,6 +218,14 @@ typedef struct { // The command line arguments used to initialize the project. The strings can // be collected after the call to |FlutterEngineRun| returns. The strings must // be NULL terminated. + // Note: The first item in the command line (if specificed at all) is + // interpreted as the executable name. So if an engine flag needs to be passed + // into the same, it needs to not be the very first item in the list. The set + // of engine flags are only meant to control unstable features in the engine. + // Deployed applications should not pass any command line arguments at all as + // they may affect engine stability at runtime in the presence of unsanitized + // input. The list of currently recognized engine flags and their descriptions + // can be retrieved from the |switches.h| engine source file. const char* const* command_line_argv; // The callback invoked by the engine in order to give the embedder the chance // to respond to platform messages from the Dart application. The callback -- GitLab