Bug 85590 - Web Inspector: reconnect websocket
Summary: Web Inspector: reconnect websocket
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 85589 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-04 01:17 PDT by Karl Skomski
Modified: 2014-12-12 14:38 PST (History)
1 user (show)

See Also:


Attachments
Patch (2.00 KB, patch)
2012-05-04 01:20 PDT, Karl Skomski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Skomski 2012-05-04 01:17:50 PDT
Web Inspector: reconnect websocket
Comment 1 Karl Skomski 2012-05-04 01:20:05 PDT
Created attachment 140177 [details]
Patch
Comment 2 Karl Skomski 2012-05-04 01:21:24 PDT
*** Bug 85589 has been marked as a duplicate of this bug. ***
Comment 3 alFReD NSH 2012-08-26 02:25:33 PDT
`InspectorFrontendHost.sendMessageToBackend = WebInspector.socket.send.bind(WebInspector.socket);` is a duplicate line. To refactor this, better to call a callback argument, on open event and `WebInspector.doLoadedDone();` on it.
Comment 4 alFReD NSH 2012-08-26 02:29:37 PDT
This is what I mean:

Change the function call to this:
createWebSocket(function () { WebInspector.doLoadedDone(); });

and then in createWebSocket ->

function createWebSocket(onopen) {
...
  WebInspector.socket.onopen = function() {
    InspectorFrontendHost.sendMessageToBackend = ...
    opopen.call(this);
  }
}
Comment 5 alFReD NSH 2012-08-26 02:47:37 PDT
Also your function definitions doesn't match the webkit style: http://www.webkit.org/coding/coding-style.html#braces
Comment 6 Brian Burg 2014-12-12 14:38:32 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.