Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1726)

Issue 14320014: Make the WebSocket fail messages meaningful (Closed)

Created:
7 years, 8 months ago by yhirano
Modified:
7 years, 8 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Make the WebSocket fail messages meaningful Currently the source file and the line number of fail messages to be shown is <origin url> and 1 respectively. It is helpless for developers. Fixed the behavior by: 1) If the error is occurred in the JS context, show the source file and the line number of the calling statement. 2) Otherwise, show the source file and the line number where the Websocket object is created. Note that we can't test 1) behavior by the LayoutTests because the completion of the source file and the line number is not done in DumpRenderTree. This CL doesn't fix the problem for WebSocket objects in a WebWorker. R=tyoshino BUG=164546 TEST=http/tests/websocket Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149148

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : Fix a test expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -55 lines) Patch
M LayoutTests/http/tests/inspector/web-socket-frame-error-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/broken-utf8-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt View 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/fragmented-control-frame-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-error-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/interleaved-fragments-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/invalid-continuation-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length-expected.txt View 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/long-control-frame-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/long-invalid-header-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/reserved-bits-expected.txt View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/reserved-opcodes-expected.txt View 1 chunk +10 lines, -10 lines 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/send-file-blob-fail-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/websocket/tests/hybi/too-long-payload-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/websockets/MainThreadWebSocketChannel.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M Source/modules/websockets/MainThreadWebSocketChannel.cpp View 1 2 3 4 4 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
yhirano
Hi, I was sorry for confusing you, but it is ready now. Can you review ...
7 years, 8 months ago (2013-04-19 06:29:10 UTC) #1
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode49 Source/modules/websockets/MainThreadWebSocketChannel.cpp:49: #include "ScriptCallStack.h" swap order of these two https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode207 Source/modules/websockets/MainThreadWebSocketChannel.cpp:207: ...
7 years, 8 months ago (2013-04-19 14:18:10 UTC) #2
yhirano
https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode49 Source/modules/websockets/MainThreadWebSocketChannel.cpp:49: #include "ScriptCallStack.h" On 2013/04/19 14:18:10, tyoshino wrote: > swap ...
7 years, 8 months ago (2013-04-22 05:18:29 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/14320014/diff/5001/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/14320014/diff/5001/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode214 Source/modules/websockets/MainThreadWebSocketChannel.cpp:214: static_cast<ScriptExecutionContext*>(m_document)->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message, url, lineNumber, 0, 0); How about ...
7 years, 8 months ago (2013-04-22 05:47:17 UTC) #4
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/14320014/diff/1/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode208 Source/modules/websockets/MainThreadWebSocketChannel.cpp:208: m_document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message); On 2013/04/22 05:18:29, yhirano wrote: > ...
7 years, 8 months ago (2013-04-22 06:32:34 UTC) #5
yhirano
I uploaded a patch fixing a crash bug in the former patches. Also I updated ...
7 years, 8 months ago (2013-04-22 07:33:38 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years, 8 months ago (2013-04-22 10:23:49 UTC) #7
tyoshino (SeeGerritForStatus)
LGTM
7 years, 8 months ago (2013-04-25 05:42:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/10003
7 years, 8 months ago (2013-04-25 05:42:24 UTC) #9
commit-bot: I haz the power
Failed to apply patch for Source/modules/websockets/MainThreadWebSocketChannel.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 8 months ago (2013-04-25 05:42:29 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/20001
7 years, 8 months ago (2013-04-25 09:09:32 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) test_shell_tests, webkit_lint, webkit_tests, webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=3298
7 years, 8 months ago (2013-04-25 09:30:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/20001
7 years, 8 months ago (2013-04-25 09:36:43 UTC) #13
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) test_shell_tests, webkit_lint, webkit_tests, webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=3303
7 years, 8 months ago (2013-04-25 09:57:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/20001
7 years, 8 months ago (2013-04-25 10:12:03 UTC) #15
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-25 10:15:52 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/20001
7 years, 8 months ago (2013-04-25 10:24:03 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/23002
7 years, 8 months ago (2013-04-25 22:56:10 UTC) #18
commit-bot: I haz the power
Retried try job too often on win_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_layout_rel&number=2975
7 years, 8 months ago (2013-04-26 00:33:47 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/14320014/23002
7 years, 8 months ago (2013-04-26 00:36:07 UTC) #20
commit-bot: I haz the power
7 years, 8 months ago (2013-04-26 01:21:01 UTC) #21
Message was sent while issue was closed.
Change committed as 149148

Powered by Google App Engine
This is Rietveld 408576698