Skip to content

Commit c4b8d7e

Browse files
[INSPECTOR] Never destroy RemoteInspectorHTTPServer singleton
Destroying RemoteInspectorHTTPServer with on different thread that it was created on causes RELEASE_ASSERT to be triggered (via ~RemoteInspectorClient -> ~TimerBase). Such case happens when main UIProcess loop doesn't run in the main thread (like WPE WebKitBrowser plugin scenario)
1 parent b6ebe42 commit c4b8d7e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
#include "RemoteInspectorClient.h"
3232
#include <WebCore/SoupVersioning.h>
3333
#include <wtf/FileSystem.h>
34+
#include <wtf/NeverDestroyed.h>
3435
#include <wtf/URL.h>
3536
#include <wtf/glib/GUniquePtr.h>
3637

3738
namespace WebKit {
3839

3940
RemoteInspectorHTTPServer& RemoteInspectorHTTPServer::singleton()
4041
{
41-
static RemoteInspectorHTTPServer server;
42+
static NeverDestroyed<RemoteInspectorHTTPServer> server;
4243
return server;
4344
}
4445

0 commit comments

Comments
 (0)