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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 15 17:54:10 PDT 2013


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





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

> Source/WebInspectorUI/UserInterface/Main.js:41
> +{(function parseQueryParameters()
> +{
> +    WebInspector.queryParamsObject = {};
> +    var queryParams = window.location.search;
> +    if (!queryParams)
> +        return;
> +    var params = queryParams.substring(1).split("&");
> +    for (var i = 0; i < params.length; ++i) {
> +        var pair = params[i].split("=");
> +        WebInspector.queryParamsObject[pair[0]] = pair[1];
> +    }
> +})();}

We have parseLocationQueryParameters in Utilities.js. And we use parseLocationQueryParameters once in Main.js already. We should only parse this once. We don't want WebInspector.queryParamsObject like we had before either.

> Source/WebInspectorUI/UserInterface/Main.js:57
> +    if (ws) {

This can be a early return.

> Source/WebInspectorUI/UserInterface/Main.js:66
> +            if (!WebInspector.socket._detachReason)
> +                (new WebInspector.RemoteDebuggingTerminatedScreen("websocket_closed")).showModal();

WebInspector.RemoteDebuggingTerminatedScreen does not exist in our UI. Remove this for now.

> Source/WebInspectorUI/UserInterface/Main.js:76
> +    WebInspector.initializeWebSocketIfNeeded();

this.initializeWebSocketIfNeeded();

> Source/WebInspectorUI/UserInterface/WorkerManager.js:50
> +WebInspector.WorkerManager.isDedicatedWorkerFrontend = function()
> +{
> +    return !!WebInspector.queryParamsObject["dedicatedWorkerId"];
> +}

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.

-- 
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