From b91855fdb2c6e135819a7f523bf4bd9a3c5777fa Mon Sep 17 00:00:00 2001 From: zmf <279822581@qq.com> Date: Wed, 15 Nov 2023 17:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0dart=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3windows=E8=BF=9E=E6=8E=A5=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zmf <279822581@qq.com> --- attachment/repos/dart.patch | 51 +++---------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/attachment/repos/dart.patch b/attachment/repos/dart.patch index cc33b2e571..86799577ec 100644 --- a/attachment/repos/dart.patch +++ b/attachment/repos/dart.patch @@ -11,20 +11,6 @@ index 177a9265649..c7038c56ad7 100644 bool ipv6 = false, bool enableServicePortFallback = false, List cachedUserTags = const [], -diff --git a/pkg/dds/lib/devtools_server.dart b/pkg/dds/lib/devtools_server.dart -index 9d302638dc7..e95c3602cad 100644 ---- a/pkg/dds/lib/devtools_server.dart -+++ b/pkg/dds/lib/devtools_server.dart -@@ -218,7 +218,8 @@ class DevToolsServer { - String? appSizeBase, - String? appSizeTest, - }) async { -- hostname ??= 'localhost'; -+ //hostname ??= 'localhost'; -+ hostname ??= '0.0.0.0'; - - // Collect profiling information. - if (profileFilename != null && serviceProtocolUri != null) { diff --git a/pkg/dds/lib/src/dap/adapters/dart.dart b/pkg/dds/lib/src/dap/adapters/dart.dart index 7cc20b487ed..552048e2e24 100644 --- a/pkg/dds/lib/src/dap/adapters/dart.dart @@ -2562,25 +2548,6 @@ index f2c1be724ef..0a5d97d1bbe 100644 "sync_socket_macos.cc", "sync_socket_win.cc", "typed_data_utils.cc", -diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h -index 2c9100f2af0..49293cd6306 100644 ---- a/runtime/bin/main_options.h -+++ b/runtime/bin/main_options.h -@@ -90,9 +90,12 @@ enum VerbosityLevel { - kAll, - }; - --static constexpr const char* DEFAULT_VM_SERVICE_SERVER_IP = "localhost"; -+//static constexpr const char* DEFAULT_VM_SERVICE_SERVER_IP = "localhost"; -+//TODO 临时修改非localhost -+static constexpr const char* DEFAULT_VM_SERVICE_SERVER_IP = "0.0.0.0"; - static constexpr int DEFAULT_VM_SERVICE_SERVER_PORT = 8181; --static constexpr int INVALID_VM_SERVICE_SERVER_PORT = -1; -+//static constexpr int INVALID_VM_SERVICE_SERVER_PORT = -1; -+static constexpr int INVALID_VM_SERVICE_SERVER_PORT = DEFAULT_VM_SERVICE_SERVER_PORT; - - class Options { - public: diff --git a/runtime/bin/namespace_ohos.cc b/runtime/bin/namespace_ohos.cc new file mode 100644 index 00000000000..71b68ca618d @@ -7635,15 +7602,12 @@ index 4413fdeecb2..41168412aec 100644 "timer.cc", "timer.h", diff --git a/sdk/lib/_internal/vm/bin/vmservice_server.dart b/sdk/lib/_internal/vm/bin/vmservice_server.dart -index b7e5be3eab5..7f318bb176d 100644 +index b7e5be3eab5..8a8f873f6c5 100644 --- a/sdk/lib/_internal/vm/bin/vmservice_server.dart +++ b/sdk/lib/_internal/vm/bin/vmservice_server.dart -@@ -175,13 +175,20 @@ class Server { - // would have to be written into the hub alongside the port number. - Server( +@@ -177,11 +177,11 @@ class Server { this._service, -- this._ip, -+ _ip, + this._ip, this._port, - this._originCheckDisabled, + _originCheckDisabled, @@ -7651,14 +7615,7 @@ index b7e5be3eab5..7f318bb176d 100644 this._serviceInfoFilename, this._enableServicePortFallback) - : _authCodesDisabled = (authCodesDisabled || Platform.isFuchsia); -+ : _authCodesDisabled = (authCodesDisabled || Platform.isFuchsia),this._ip="0.0.0.0",this._originCheckDisabled=true; -+ /* -+ // TODO 临时去掉验证 -+ this._authCodesDisabled = true; -+ this._ip="0.0.0.0"; -+ this._originCheckDisabled = true; -+ } -+ */ ++ : _authCodesDisabled = (authCodesDisabled || Platform.isFuchsia),this._originCheckDisabled=true; bool _isAllowedOrigin(String origin) { Uri uri; -- Gitee