File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ class UDPServer;
4747class UDPSocket ;
4848class WeakEventLoopReference ;
4949
50- struct ProxyData ;
51-
5250#ifdef AK_OS_MACH
5351class MachPort ;
5452#endif
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ set(SOURCES
33 ProxyManager.cpp
44 Platform/ProxyPlatform.cpp
55 Platform/ProxyEnv.cpp
6- Platform/ProxyEnv.cpp
76)
87
98if (APPLE )
Original file line number Diff line number Diff line change 77#include " Proxy.h"
88#include " Platform/ProxyPlatform.h"
99#include " ProxyManager.h"
10+ #include < AK/Atomic.h>
1011#include < AK/String.h>
1112#include < AK/StringUtils.h>
1213#include < AK/StringView.h>
Original file line number Diff line number Diff line change 55 */
66
77#include " ProxyManager.h"
8+ #include < AK/NeverDestroyed.h>
9+ #include < LibSync/Once.h>
810
911namespace Proxy {
1012
1113ProxyManager* ProxyManager::s_the = nullptr ;
12- Sync::OnceFlag ProxyManager::s_once {};
1314
1415ProxyManager::ProxyManager ()
1516{
@@ -20,7 +21,8 @@ ProxyManager::ProxyManager()
2021
2122ProxyManager& ProxyManager::the ()
2223{
23- Sync::call_once (s_once, [] {
24+ static NeverDestroyed<Sync::OnceFlag> s_once;
25+ Sync::call_once (*s_once, [] {
2426 s_the = new ProxyManager ();
2527 });
2628 return *s_the;
Original file line number Diff line number Diff line change 1212#include < AK/NonnullRefPtr.h>
1313#include < AK/RefPtr.h>
1414#include < LibSync/Mutex.h>
15- #include < LibSync/Once.h>
1615
1716namespace Proxy {
1817
@@ -28,7 +27,6 @@ class ProxyManager {
2827
2928private:
3029 static ProxyManager* s_the;
31- static Sync::OnceFlag s_once;
3230
3331 Sync::Mutex m_proxy_table_lock;
3432 AK ::RefPtr<SystemProxyTable> m_proxy_tables;
You can’t perform that action at this time.
0 commit comments