Bug 47891

Summary: Web Inspector: Uncaught TypeError when connection to WebSocket server is refused
Product: WebKit Reporter: Yuta Kitamura <yutak>
Component: Web Inspector (Deprecated)Assignee: Yuta Kitamura <yutak>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, commit-queue, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, ukai, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Yuta Kitamura 2010-10-19 02:07:13 PDT
The following error occurs in Resources panel when a connection to an WebSocket server is refused.

Chromium's stderr looks like:
"Uncaught TypeError: Cannot call method 'split' of undefined," source: chrome://devtools/DevTools.js (8852)
"Uncaught TypeError: Cannot call method 'escapeHTML' of undefined," source: chrome://devtools/DevTools.js (30523)

How to reproduce:
1. Start HTTP server for layout tests (run-webkit-httpd) but do NOT start the WebSocket server.
2. Start the browser, open Web Inspector, enable resource tracking, and go to <http://localhost:8000/websocket/tests/send.html>.
3. Observe the error.


This error occurs because resource.url is not set when an WebSocket is initialized.
Comment 1 Yuta Kitamura 2010-10-19 02:23:40 PDT
Created attachment 71144 [details]
Patch
Comment 2 Fumitoshi Ukai 2010-10-19 02:29:33 PDT
Comment on attachment 71144 [details]
Patch

LGTM
Comment 3 WebKit Commit Bot 2010-10-19 03:22:05 PDT
Comment on attachment 71144 [details]
Patch

Clearing flags on attachment: 71144

Committed r70043: <http://trac.webkit.org/changeset/70043>
Comment 4 WebKit Commit Bot 2010-10-19 03:22:11 PDT
All reviewed patches have been landed.  Closing bug.