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

Issue 221833002: Test for WebSocketJob being deleted on the stack (Closed)

Created:
6 years, 8 months ago by Adam Rice
Modified:
6 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Test for WebSocketJob being deleted on the stack SocketStreamDispatcherHost can delete the WebSocketJob while it is still on the stack. Add tests to ensure that WebSocketJob does not attempt to access its own members after being deleted. Also fix two cases where WebSocketJob attempted to access its members after being deleted. BUG=358038 TEST=net_unittests --gtest_filter=WebSocketJobDeleteTest* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261707

Patch Set 1 #

Total comments: 4

Patch Set 2 : Explicitly confirm that the WebSocketJob object is no longer referenced at the end of each test. #

Total comments: 3

Patch Set 3 : Make WebSocketJobDeleteTest.OnClose realistic. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -6 lines) Patch
M net/websockets/websocket_job.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M net/websockets/websocket_job_test.cc View 1 2 3 chunks +166 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Adam Rice
6 years, 8 months ago (2014-04-02 07:14:11 UTC) #1
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/221833002/diff/1/net/websockets/websocket_job_test.cc File net/websockets/websocket_job_test.cc (right): https://codereview.chromium.org/221833002/diff/1/net/websockets/websocket_job_test.cc#newcode1225 net/websockets/websocket_job_test.cc:1225: // doesn't work. Detach it first to prevent a ...
6 years, 8 months ago (2014-04-03 05:21:55 UTC) #2
Adam Rice
https://codereview.chromium.org/221833002/diff/1/net/websockets/websocket_job_test.cc File net/websockets/websocket_job_test.cc (right): https://codereview.chromium.org/221833002/diff/1/net/websockets/websocket_job_test.cc#newcode1225 net/websockets/websocket_job_test.cc:1225: // doesn't work. Detach it first to prevent a ...
6 years, 8 months ago (2014-04-03 06:03:03 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc File net/websockets/websocket_job_test.cc (right): https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc#newcode1227 net/websockets/websocket_job_test.cc:1227: socket_->DetachDelegate(); is this done by some code before OnClose() ...
6 years, 8 months ago (2014-04-04 04:39:07 UTC) #4
Adam Rice
https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc File net/websockets/websocket_job_test.cc (right): https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc#newcode1227 net/websockets/websocket_job_test.cc:1227: socket_->DetachDelegate(); On 2014/04/04 04:39:07, tyoshino wrote: > is this ...
6 years, 8 months ago (2014-04-04 06:00:36 UTC) #5
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc File net/websockets/websocket_job_test.cc (right): https://codereview.chromium.org/221833002/diff/10001/net/websockets/websocket_job_test.cc#newcode1227 net/websockets/websocket_job_test.cc:1227: socket_->DetachDelegate(); On 2014/04/04 06:00:36, Adam Rice wrote: > ...
6 years, 8 months ago (2014-04-04 06:04:44 UTC) #6
Adam Rice
The CQ bit was checked by ricea@chromium.org
6 years, 8 months ago (2014-04-04 06:06:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/221833002/30001
6 years, 8 months ago (2014-04-04 06:06:22 UTC) #8
commit-bot: I haz the power
6 years, 8 months ago (2014-04-04 08:30:56 UTC) #9
Message was sent while issue was closed.
Change committed as 261707

Powered by Google App Engine
This is Rietveld 408576698