Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ struct Settings {
// target indicating the URL at which the VM service can be accessed.
uint32_t vm_service_port = 0;

// Determines whether an authentication code is required to communicate with
// the VM service.
bool disable_service_auth_codes = true;

// Determine whether the vmservice should fallback to automatic port selection
// after failing to bind to a specified port.
bool enable_service_port_fallback = false;
Expand Down
1 change: 0 additions & 1 deletion runtime/dart_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
settings.vm_service_port, // server VM service port
tonic::DartState::HandleLibraryTag, // embedder library tag handler
false, // disable websocket origin check
settings.disable_service_auth_codes, // disable VM service auth codes
settings.enable_service_port_fallback, // enable fallback to port 0
// when bind fails.
error // error (out)
Expand Down
5 changes: 0 additions & 5 deletions runtime/dart_service_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ bool DartServiceIsolate::Startup(const std::string& server_ip,
intptr_t server_port,
Dart_LibraryTagHandler embedder_tag_handler,
bool disable_origin_check,
bool disable_service_auth_codes,
bool enable_service_port_fallback,
char** error) {
Dart_Isolate isolate = Dart_CurrentIsolate();
Expand Down Expand Up @@ -182,10 +181,6 @@ bool DartServiceIsolate::Startup(const std::string& server_ip,
Dart_SetField(library, Dart_NewStringFromCString("_originCheckDisabled"),
Dart_NewBoolean(disable_origin_check));
SHUTDOWN_ON_ERROR(result);
result =
Dart_SetField(library, Dart_NewStringFromCString("_authCodesDisabled"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this can be deleted. This is still affecting the behavior of the vm service: https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L24

Dart_NewBoolean(disable_service_auth_codes));
SHUTDOWN_ON_ERROR(result);
result = Dart_SetField(
library, Dart_NewStringFromCString("_enableServicePortFallback"),
Dart_NewBoolean(enable_service_port_fallback));
Expand Down
3 changes: 0 additions & 3 deletions runtime/dart_service_isolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class DartServiceIsolate {
/// @param[in] embedder_tag_handler The library tag handler.
/// @param[in] disable_origin_check If websocket origin checks must
/// be enabled.
/// @param[in] disable_service_auth_codes If service auth codes must be
/// enabled.
/// @param[in] enable_service_port_fallback If fallback to port 0 must be
/// enabled when the bind fails.
/// @param error The error when this method
Expand All @@ -63,7 +61,6 @@ class DartServiceIsolate {
intptr_t server_port,
Dart_LibraryTagHandler embedder_tag_handler,
bool disable_origin_check,
bool disable_service_auth_codes,
bool enable_service_port_fallback,
char** error);

Expand Down
9 changes: 0 additions & 9 deletions runtime/dart_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ static const char* kDartStartPausedArgs[]{
"--pause_isolates_on_start",
};

static const char* kDartDisableServiceAuthCodesArgs[]{
"--disable-service-auth-codes",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and its use below is all that should be deleted, IIUC

};

static const char* kDartEndlessTraceBufferArgs[]{
"--timeline_recorder=endless",
};
Expand Down Expand Up @@ -380,11 +376,6 @@ DartVM::DartVM(const std::shared_ptr<const DartVMData>& vm_data,
PushBackAll(&args, kDartStartPausedArgs, fml::size(kDartStartPausedArgs));
}

if (settings_.disable_service_auth_codes) {
PushBackAll(&args, kDartDisableServiceAuthCodesArgs,
fml::size(kDartDisableServiceAuthCodesArgs));
}

if (settings_.endless_trace_buffer || settings_.trace_startup) {
// If we are tracing startup, make sure the trace buffer is endless so we
// don't lose early traces.
Expand Down
5 changes: 0 additions & 5 deletions shell/common/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,6 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
command_line.GetOptionValue(FlagForSwitch(Switch::DomainNetworkPolicy),
&settings.domain_network_policy);

// Disable need for authentication codes for VM service communication, if
// specified.
settings.disable_service_auth_codes =
command_line.HasOption(FlagForSwitch(Switch::DisableServiceAuthCodes));

// Allow fallback to automatic port selection if binding to a specified port
// fails.
settings.enable_service_port_fallback =
Expand Down
4 changes: 0 additions & 4 deletions shell/common/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ DEF_SWITCH(FlutterAssetsDir,
"Path to the Flutter assets directory.")
DEF_SWITCH(Help, "help", "Display this help text.")
DEF_SWITCH(LogTag, "log-tag", "Tag associated with log messages.")
DEF_SWITCH(DisableServiceAuthCodes,
"disable-service-auth-codes",
"Disable the requirement for authentication codes for communicating"
" with the VM service.")
DEF_SWITCH(EnableServicePortFallback,
"enable-service-port-fallback",
"Allow the VM service to fallback to automatic port selection if"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ private static String[] getArgsFromIntent(Intent intent) {
if (intent.getBooleanExtra("start-paused", false)) {
args.add("--start-paused");
}
if (intent.getBooleanExtra("disable-service-auth-codes", false)) {
args.add("--disable-service-auth-codes");
}
if (intent.getBooleanExtra("use-test-fonts", false)) {
args.add("--use-test-fonts");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public class FlutterShellArgs {
public static final String ARG_TRACE_STARTUP = "--trace-startup";
public static final String ARG_KEY_START_PAUSED = "start-paused";
public static final String ARG_START_PAUSED = "--start-paused";
public static final String ARG_KEY_DISABLE_SERVICE_AUTH_CODES = "disable-service-auth-codes";
public static final String ARG_DISABLE_SERVICE_AUTH_CODES = "--disable-service-auth-codes";
public static final String ARG_KEY_ENDLESS_TRACE_BUFFER = "endless-trace-buffer";
public static final String ARG_ENDLESS_TRACE_BUFFER = "--endless-trace-buffer";
public static final String ARG_KEY_USE_TEST_FONTS = "use-test-fonts";
Expand Down Expand Up @@ -92,9 +90,6 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) {
args.add(ARG_VM_SERVICE_PORT + Integer.toString(vmServicePort));
}
}
if (intent.getBooleanExtra(ARG_KEY_DISABLE_SERVICE_AUTH_CODES, false)) {
args.add(ARG_DISABLE_SERVICE_AUTH_CODES);
}
if (intent.getBooleanExtra(ARG_KEY_ENDLESS_TRACE_BUFFER, false)) {
args.add(ARG_ENDLESS_TRACE_BUFFER);
}
Expand Down
6 changes: 0 additions & 6 deletions shell/platform/fuchsia/dart_runner/service_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,6 @@ Dart_Isolate CreateServiceIsolate(
Dart_NewBoolean(false));
SHUTDOWN_ON_ERROR(result);

// _authCodesDisabled = false
result =
Dart_SetField(library, Dart_NewStringFromCString("_authCodesDisabled"),
Dart_NewBoolean(false));
SHUTDOWN_ON_ERROR(result);

InitBuiltinLibrariesForIsolate(std::string(uri), nullptr, fileno(stdout),
fileno(stderr), zx::channel(), true);

Expand Down
1 change: 0 additions & 1 deletion shell/testing/observatory/launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ShellLauncher {
'--vm-service-port=0',
'--non-interactive',
'--run-forever',
'--disable-service-auth-codes',
];
final String shellExecutablePath;
final String mainDartPath;
Expand Down