Revert "Allow SIGQUIT to toggle the vm-service server a la command line Dart. (#3857)" (flutter/engine#3859)
This reverts commit 763427646f.
Fuchsia TO-370
This commit is contained in:
@@ -195,16 +195,15 @@ Dart_Isolate ServiceIsolateCreateCallback(const char* script_uri,
|
||||
DartUI::InitForIsolate();
|
||||
DartRuntimeHooks::Install(DartRuntimeHooks::SecondaryIsolate, script_uri);
|
||||
const Settings& settings = Settings::Get();
|
||||
std::string ip = settings.ipv6 ? "::1" : "127.0.0.1";
|
||||
intptr_t port = -1;
|
||||
if (settings.enable_observatory) {
|
||||
port = settings.observatory_port;
|
||||
std::string ip = settings.ipv6 ? "::1" : "127.0.0.1";
|
||||
const intptr_t port = settings.observatory_port;
|
||||
const bool disable_websocket_origin_check = false;
|
||||
const bool service_isolate_booted = DartServiceIsolate::Startup(
|
||||
ip, port, tonic::DartState::HandleLibraryTag,
|
||||
IsRunningPrecompiledCode(), disable_websocket_origin_check, error);
|
||||
FTL_CHECK(service_isolate_booted) << error;
|
||||
}
|
||||
const bool disable_websocket_origin_check = false;
|
||||
const bool service_isolate_booted = DartServiceIsolate::Startup(
|
||||
ip, port, tonic::DartState::HandleLibraryTag,
|
||||
IsRunningPrecompiledCode(), disable_websocket_origin_check, error);
|
||||
FTL_CHECK(service_isolate_booted) << error;
|
||||
|
||||
if (g_service_isolate_hook)
|
||||
g_service_isolate_hook(IsRunningPrecompiledCode());
|
||||
|
||||
@@ -160,7 +160,7 @@ bool DartServiceIsolate::Startup(std::string server_ip,
|
||||
// port when the HTTP server is started.
|
||||
server_port = 0;
|
||||
}
|
||||
// Set the HTTP server's port.
|
||||
// Set the HTTP's servers port.
|
||||
result = Dart_SetField(library, Dart_NewStringFromCString("_port"),
|
||||
Dart_NewInteger(server_port));
|
||||
SHUTDOWN_ON_ERROR(result);
|
||||
@@ -171,22 +171,6 @@ bool DartServiceIsolate::Startup(std::string server_ip,
|
||||
Dart_SetField(library, Dart_NewStringFromCString("_originCheckDisabled"),
|
||||
Dart_NewBoolean(disable_origin_check));
|
||||
SHUTDOWN_ON_ERROR(result);
|
||||
|
||||
// Get _getWatchSignalInternal from dart:io.
|
||||
Dart_Handle dart_io_str = Dart_NewStringFromCString("dart:io");
|
||||
SHUTDOWN_ON_ERROR(dart_io_str);
|
||||
Dart_Handle io_lib = Dart_LookupLibrary(dart_io_str);
|
||||
SHUTDOWN_ON_ERROR(io_lib);
|
||||
Dart_Handle function_name =
|
||||
Dart_NewStringFromCString("_getWatchSignalInternal");
|
||||
SHUTDOWN_ON_ERROR(function_name);
|
||||
Dart_Handle signal_watch = Dart_Invoke(io_lib, function_name, 0, NULL);
|
||||
SHUTDOWN_ON_ERROR(signal_watch);
|
||||
Dart_Handle field_name = Dart_NewStringFromCString("_signalWatch");
|
||||
SHUTDOWN_ON_ERROR(field_name);
|
||||
result = Dart_SetField(library, field_name, signal_watch);
|
||||
SHUTDOWN_ON_ERROR(field_name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user