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

Issue 311993006: [WebSocket] bufferedAmount should not decrease inside a task. (Closed)

Created:
6 years, 6 months ago by yhirano
Modified:
6 years, 6 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

[WebSocket] bufferedAmount should not decrease inside a task. The spec says that bufferedAmount must not decrease in the task that send() is called. Fixed both the new and the old implementation although the old implementaion is at any rate broken (bufferedAmount in the old implementation includes the protocol overhead). BUG=159563 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176298 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176519

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 15

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 6

Patch Set 10 : #

Total comments: 13

Patch Set 11 : rebase #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : rebase #

Patch Set 19 : #

Total comments: 8

Patch Set 20 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -143 lines) Patch
A LayoutTests/http/tests/websocket/bufferedAmount-after-send.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/websocket/bufferedAmount-after-send-expected.txt View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M Source/modules/websockets/MainThreadWebSocketChannel.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +24 lines, -3 lines 0 comments Download
M Source/modules/websockets/MainThreadWebSocketChannel.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +31 lines, -14 lines 0 comments Download
M Source/modules/websockets/NewWebSocketChannelImpl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
M Source/modules/websockets/NewWebSocketChannelImpl.cpp View 1 2 3 4 5 6 7 8 9 10 8 chunks +7 lines, -12 lines 0 comments Download
M Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -4 lines 0 comments Download
M Source/modules/websockets/WebSocket.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +7 lines, -2 lines 0 comments Download
M Source/modules/websockets/WebSocket.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +25 lines, -7 lines 0 comments Download
M Source/modules/websockets/WebSocketChannel.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M Source/modules/websockets/WebSocketChannelClient.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -17 lines 0 comments Download
M Source/modules/websockets/WebSocketTest.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -5 lines 0 comments Download
M Source/modules/websockets/WorkerThreadableWebSocketChannel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -3 lines 0 comments Download
M Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +8 lines, -49 lines 0 comments Download
M Source/platform/network/SocketStreamHandle.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/network/SocketStreamHandle.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +5 lines, -6 lines 0 comments Download
M Source/platform/network/SocketStreamHandleClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebSocketImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -2 lines 0 comments Download
M Source/web/WebSocketImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +43 lines, -5 lines 1 comment Download
M public/web/WebSocket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +4 lines, -4 lines 0 comments Download
M public/web/WebSocketClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
yhirano
6 years, 6 months ago (2014-06-09 02:54:33 UTC) #1
tyoshino (SeeGerritForStatus)
On 2014/06/09 02:54:33, yhirano wrote: As discussed offline, please update bufferedAmount synchronously also for Blob ...
6 years, 6 months ago (2014-06-09 08:33:55 UTC) #2
yhirano
On 2014/06/09 08:33:55, tyoshino wrote: > On 2014/06/09 02:54:33, yhirano wrote: > > As discussed ...
6 years, 6 months ago (2014-06-09 08:35:47 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp File Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp (right): https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp#newcode110 Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:110: } blank line here https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp#newcode112 Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:112: remove this blank ...
6 years, 6 months ago (2014-06-09 09:24:27 UTC) #4
yhirano
https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp File Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp (right): https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp#newcode110 Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:110: } On 2014/06/09 09:24:26, tyoshino wrote: > blank line ...
6 years, 6 months ago (2014-06-09 11:59:52 UTC) #5
yhirano
By the way I found that I can't use BlobDataHandle::size because Blob::size is a virtual ...
6 years, 6 months ago (2014-06-09 12:19:35 UTC) #6
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/WebSocket.cpp File Source/modules/websockets/WebSocket.cpp (right): https://codereview.chromium.org/311993006/diff/80001/Source/modules/websockets/WebSocket.cpp#newcode685 Source/modules/websockets/WebSocket.cpp:685: m_bufferedAmount = unhandledBufferedAmount; On 2014/06/09 11:59:51, yhirano wrote: > ...
6 years, 6 months ago (2014-06-10 07:24:56 UTC) #7
yhirano
It's ready now. PTAL
6 years, 6 months ago (2014-06-10 11:39:46 UTC) #8
yhirano
ping
6 years, 6 months ago (2014-06-16 01:45:20 UTC) #9
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/311993006/diff/160001/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/311993006/diff/160001/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode356 Source/modules/websockets/MainThreadWebSocketChannel.cpp:356: if (!remain || !m_client || m_state == ChannelClosing || ...
6 years, 6 months ago (2014-06-16 02:29:29 UTC) #10
yhirano
https://codereview.chromium.org/311993006/diff/160001/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/311993006/diff/160001/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode356 Source/modules/websockets/MainThreadWebSocketChannel.cpp:356: if (!remain || !m_client || m_state == ChannelClosing || ...
6 years, 6 months ago (2014-06-16 04:44:27 UTC) #11
tyoshino (SeeGerritForStatus)
almost lg https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode355 Source/modules/websockets/MainThreadWebSocketChannel.cpp:355: if (!m_client || m_state == ChannelClosing || ...
6 years, 6 months ago (2014-06-16 07:31:42 UTC) #12
yhirano
https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/MainThreadWebSocketChannel.cpp File Source/modules/websockets/MainThreadWebSocketChannel.cpp (right): https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/MainThreadWebSocketChannel.cpp#newcode355 Source/modules/websockets/MainThreadWebSocketChannel.cpp:355: if (!m_client || m_state == ChannelClosing || m_state == ...
6 years, 6 months ago (2014-06-16 10:19:45 UTC) #13
yhirano
https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/WebSocket.cpp File Source/modules/websockets/WebSocket.cpp (right): https://codereview.chromium.org/311993006/diff/180001/Source/modules/websockets/WebSocket.cpp#newcode679 Source/modules/websockets/WebSocket.cpp:679: m_bufferedAmount -= m_consumedBufferedAmount; On 2014/06/16 10:19:44, yhirano wrote: > ...
6 years, 6 months ago (2014-06-16 11:53:23 UTC) #14
tyoshino (SeeGerritForStatus)
lgtm
6 years, 6 months ago (2014-06-16 12:37:48 UTC) #15
yhirano
+tkent for Source/web, Source/platform and public/web
6 years, 6 months ago (2014-06-17 01:07:23 UTC) #16
yhirano
+tkent for Source/web, Source/platform and public/web
6 years, 6 months ago (2014-06-17 01:07:44 UTC) #17
tkent
rslgtm
6 years, 6 months ago (2014-06-17 01:34:31 UTC) #18
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-17 01:38:25 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/311993006/260001
6 years, 6 months ago (2014-06-17 01:39:07 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-17 06:01:56 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/12373)
6 years, 6 months ago (2014-06-17 06:01:57 UTC) #22
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-17 06:19:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/270001
6 years, 6 months ago (2014-06-17 06:19:52 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-17 08:11:02 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/11636)
6 years, 6 months ago (2014-06-17 08:11:03 UTC) #26
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-17 08:11:37 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/270001
6 years, 6 months ago (2014-06-17 08:12:23 UTC) #28
commit-bot: I haz the power
Change committed as 176298
6 years, 6 months ago (2014-06-17 08:45:27 UTC) #29
haraken
On 2014/06/17 08:45:27, I haz the power (commit-bot) wrote: > Change committed as 176298 Reverted ...
6 years, 6 months ago (2014-06-17 12:51:12 UTC) #30
yhirano
On 2014/06/17 12:51:12, haraken wrote: > On 2014/06/17 08:45:27, I haz the power (commit-bot) wrote: ...
6 years, 6 months ago (2014-06-18 01:17:57 UTC) #31
yhirano
The CL was reverted because it broke some browser tests. I will disable them on ...
6 years, 6 months ago (2014-06-18 09:18:13 UTC) #32
tkent
rslgtm
6 years, 6 months ago (2014-06-19 00:01:05 UTC) #33
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/311993006/diff/350001/Source/platform/network/SocketStreamHandle.cpp File Source/platform/network/SocketStreamHandle.cpp (right): https://codereview.chromium.org/311993006/diff/350001/Source/platform/network/SocketStreamHandle.cpp#newcode262 Source/platform/network/SocketStreamHandle.cpp:262: } while (!pending && !m_buffer.isEmpty()); ideally, didConsumeBufferedAmount should happen ...
6 years, 6 months ago (2014-06-19 07:38:55 UTC) #34
yhirano
https://codereview.chromium.org/311993006/diff/350001/Source/platform/network/SocketStreamHandle.cpp File Source/platform/network/SocketStreamHandle.cpp (right): https://codereview.chromium.org/311993006/diff/350001/Source/platform/network/SocketStreamHandle.cpp#newcode262 Source/platform/network/SocketStreamHandle.cpp:262: } while (!pending && !m_buffer.isEmpty()); On 2014/06/19 07:38:54, tyoshino ...
6 years, 6 months ago (2014-06-19 07:49:43 UTC) #35
tyoshino (SeeGerritForStatus)
lgtm
6 years, 6 months ago (2014-06-19 08:45:13 UTC) #36
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-19 08:47:05 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/390001
6 years, 6 months ago (2014-06-19 08:48:02 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 10:16:40 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/8011)
6 years, 6 months ago (2014-06-19 10:16:41 UTC) #40
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-19 10:18:26 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/390001
6 years, 6 months ago (2014-06-19 10:18:36 UTC) #42
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 11:34:47 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/19163)
6 years, 6 months ago (2014-06-19 11:34:48 UTC) #44
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-19 11:55:27 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/390001
6 years, 6 months ago (2014-06-19 11:56:13 UTC) #46
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 13:25:10 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/19187)
6 years, 6 months ago (2014-06-19 13:25:11 UTC) #48
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 6 months ago (2014-06-19 14:03:00 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/311993006/390001
6 years, 6 months ago (2014-06-19 14:03:13 UTC) #50
commit-bot: I haz the power
6 years, 6 months ago (2014-06-19 15:56:49 UTC) #51
Message was sent while issue was closed.
Change committed as 176519

Powered by Google App Engine
This is Rietveld 408576698