[Webkit-unassigned] [Bug 216120] New: RemoteInspectorServer is not started if not WebKitWebContext is created earlier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 3 04:25:48 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216120

            Bug ID: 216120
           Summary: RemoteInspectorServer is not started if not
                    WebKitWebContext is created earlier
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: psaavedra at igalia.com
                CC: bugs-noreply at webkitgtk.org

For the cases where "WEBKIT_INSPECTOR_SERVER" is defined as an envvar.


Let's think in a case where we are initializing the  UI process (ex: a WebKit launcher) and we have a code like this

```
...
webkit_user_content_filter_store_save()
webkit_web_context_new_with_website_data_manager()
...
```

(note that before `webkit_user_content_filter_store_save()` no other WebContext or WebView was initialized nor created).



When the webkit_user_content_filter_store_save() calls RemoteInspector.singleton() [WebKit!L72](https://github.com/WebKit/webkit/blame/d2c95d8ce5e68f5c81983dad44085dbf915ca52b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp#L72), the RemoteInspectorServer isn't initialized yet because this action is triggered only by any API method which returns a WebKitWebContext:

WebKitWebContext *      webkit_web_context_get_default ()
WebKitWebContext *      webkit_web_context_new ()
WebKitWebContext *      webkit_web_context_new_ephemeral ()
WebKitWebContext *      webkit_web_context_new_with_website_data_manager ()

... so the RemoteInspector object is going to fail trying to connect to the server: "RemoteInspector failed to connect to inspector server at: %s: %s"


The initialization of the RemoteInspectorServer is done in the WebKit::WebProcessPool::platformInitialize() method during the WebProcessPool::create(). And this, as I said, it only can be triggered from the WK API  by creating or getting a WebContext. This is because the initialization is done during the WebKit::WebProcessPool::WebProcessPool() creation.

My question:

Is it really needed the Inspector::RemoteInspectorServer::start() be called only from the WebKit::WebProcessPool::platformInitialize() or the    from WebKit::WebProcessPool::WebProcessPool()? Could be possible start the Inspector::RemoteInspectorServer from another place, early?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200903/5901e31a/attachment.htm>


More information about the webkit-unassigned mailing list