diff --git a/inspector/BUILD.gn b/inspector/BUILD.gn index 2c47f0edb812049212c466e982e59243d4890d0e..4fff531fa8db40dd45a9c772bb98a67a4194b205 100644 --- a/inspector/BUILD.gn +++ b/inspector/BUILD.gn @@ -42,11 +42,6 @@ config("ark_platform_config") { ] } else if (is_mingw) { defines += [ "WINDOWS_PLATFORM" ] - } else if (is_mac) { - defines += [ - "MAC_PLATFORM", - "UNIX_PLATFORM", - ] } else if (target_os == "android") { if (!ark_standalone_build) { defines += [ @@ -61,6 +56,11 @@ config("ark_platform_config") { "UNIX_PLATFORM", "IOS_PLATFORM", ] + } else if (is_mac) { + defines += [ + "MAC_PLATFORM", + "UNIX_PLATFORM", + ] } else { defines += [ "UNIX_PLATFORM" ] } diff --git a/inspector/connect_inspector.cpp b/inspector/connect_inspector.cpp index 4ec8d29cdb271131ea4252baf873ffb94e0918a5..833899d753d27047009b1d117c010ca498d725ab 100644 --- a/inspector/connect_inspector.cpp +++ b/inspector/connect_inspector.cpp @@ -28,8 +28,12 @@ void* HandleDebugManager(void* const server) LOGE("HandleDebugManager server nullptr"); return nullptr; } - +#if defined(IOS_PLATFORM) || defined(MAC_PLATFORM) + pthread_setname_np("DebugConnectThread"); +#else pthread_setname_np(pthread_self(), "DebugConnectThread"); +#endif + static_cast(server)->RunServer(); return nullptr; } diff --git a/inspector/inspector.cpp b/inspector/inspector.cpp index cf02489b518cdb65b6ca7d85d75275f906e7f967..022eec8ea5b89bab271c426dc7305b7337ddf57d 100644 --- a/inspector/inspector.cpp +++ b/inspector/inspector.cpp @@ -76,7 +76,12 @@ void* HandleClient(void* const server) return nullptr; } +#if defined(IOS_PLATFORM) || defined(MAC_PLATFORM) + pthread_setname_np("DebugThread"); +#else pthread_setname_np(pthread_self(), "DebugThread"); +#endif + static_cast(server)->RunServer(); return nullptr; }