[Webkit-unassigned] [Bug 118678] Web Inspector: WebSocket initialization to use remote inspector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 16 07:22:48 PDT 2013


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





--- Comment #4 from Timothy Hatcher <timothy at apple.com>  2013-07-16 07:22:59 PST ---
(From update of attachment 206676)
View in context: https://bugs.webkit.org/attachment.cgi?id=206676&action=review

> Source/WebInspectorUI/UserInterface/Main.js:46
> +    if (WebInspector.WorkerManager.isDedicatedWorkerFrontend())
> +        return;

We don't have dedicated worker frontends. So you can remove this check and WorkerManager.

> Source/WebInspectorUI/UserInterface/Main.js:61
> +        WebInspector.socket.onmessage = function(message) { InspectorBackend.dispatch(message.data); }
> +        WebInspector.socket.onerror = function(error) { console.error(error); }
> +        WebInspector.socket.onopen = function() {

Can these use addEventListener instead?

> Source/WebInspectorUI/UserInterface/Main.js:62
> +            InspectorFrontendHost.sendMessageToBackend = WebInspector.socket.send.bind(WebInspector.socket);

This code should move to InspectorFrontendHostStub.js and if WebInspector.socket exists then use WebInspector.socket.send.

> Source/WebInspectorUI/UserInterface/Main.js:64
> +        WebInspector.socket.onclose = function() {

You can remove onclose.

>> Source/WebInspectorUI/UserInterface/WorkerManager.js:50
>> +}
> 
> If this is all you use WebInspector.WorkerManager for, then this can go in Main.js and WorkerManager.js can be removed. I don't see WorkerManager being called otherwise.

It turns out we don't have dedicated worker frontends like the deprecated Inspector — and likely never will. You can remove this and all of WorkerManager.js.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list