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

Issue 13009012: [SPDY] Refactor SpdySession's write queue (Closed)

Created:
7 years, 9 months ago by akalin
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

[SPDY] Refactor SpdySession's write queue This is in preparation for replacing the various IOBuffers used for reads/writes with a single SpdyBuffer class. Replace the priority queue of SpdyIOBufferProducers with a SpdyWriteQueue object, which is an an array of FIFO queues binned by priority. The priority queue was looking only at priority and so was not guaranteeing FIFO behavior among producers with the same priority. Remove the frame queue in SpdyStream and instead have it use the session's write queue directly. Remove unused fields from SpdyIOBuffer and clean it up. Propagate and handle errors from SpdyCredentialBuilder::Build. Rename SpdyIOBufferProducer to SpdyFrameProducer, have it return a SpdyFrame, clean up its interface, and move the stream-activating logic out of it. Replace uses of std::list with std::deque. Steamline logic in SpdySession that deals with the write queue. Convert some raw pointers to scoped_ptr<>. Convert a use of Unretained() in SpdySession to use the weak pointer factory. BUG=176582 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192975 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194102

Patch Set 1 #

Total comments: 3

Patch Set 2 : Address comments #

Patch Set 3 : Rebase #

Patch Set 4 : Fix gyp error #

Total comments: 21

Patch Set 5 : Address comments #

Patch Set 6 : Fix use-after-free (crbug.com/230259) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+585 lines, -470 lines) Patch
M net/net.gyp View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
A net/spdy/spdy_frame_producer.h View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A net/spdy/spdy_frame_producer.cc View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M net/spdy/spdy_io_buffer.h View 1 chunk +16 lines, -23 lines 0 comments Download
M net/spdy/spdy_io_buffer.cc View 2 chunks +9 lines, -16 lines 0 comments Download
M net/spdy/spdy_session.h View 1 2 3 4 5 7 chunks +43 lines, -73 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 23 chunks +122 lines, -158 lines 0 comments Download
M net/spdy/spdy_session_spdy2_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -33 lines 0 comments Download
M net/spdy/spdy_session_spdy3_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -33 lines 0 comments Download
M net/spdy/spdy_stream.h View 1 5 chunks +17 lines, -25 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 2 3 4 5 9 chunks +130 lines, -109 lines 0 comments Download
A net/spdy/spdy_write_queue.h View 1 2 3 4 1 chunk +72 lines, -0 lines 0 comments Download
A net/spdy/spdy_write_queue.cc View 1 2 3 4 1 chunk +95 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
akalin
+rch for review
7 years, 9 months ago (2013-03-24 07:07:48 UTC) #1
Ryan Hamilton
https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h File net/spdy/spdy_session.h (right): https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h#newcode172 net/spdy/spdy_session.h:172: virtual SpdyStream* GetStream() = 0; See this comment on ...
7 years, 9 months ago (2013-03-24 15:22:54 UTC) #2
akalin
+willchan re. question https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h File net/spdy/spdy_session.h (right): https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h#newcode172 net/spdy/spdy_session.h:172: virtual SpdyStream* GetStream() = 0; On ...
7 years, 9 months ago (2013-03-24 18:24:13 UTC) #3
willchan no longer on Chromium
https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h File net/spdy/spdy_session.h (right): https://codereview.chromium.org/13009012/diff/1/net/spdy/spdy_session.h#newcode172 net/spdy/spdy_session.h:172: virtual SpdyStream* GetStream() = 0; On 2013/03/24 18:24:14, akalin ...
7 years, 9 months ago (2013-03-24 18:58:22 UTC) #4
akalin
On 2013/03/24 18:58:22, willchan wrote: > Layering. This is at the frame level, which is ...
7 years, 9 months ago (2013-03-24 19:16:08 UTC) #5
akalin
On 2013/03/24 19:16:08, akalin wrote: > Okay. > > What do you think about removing ...
7 years, 9 months ago (2013-03-24 19:36:35 UTC) #6
Ryan Hamilton
On 2013/03/24 19:36:35, akalin wrote: > On 2013/03/24 19:16:08, akalin wrote: > > Okay. > ...
7 years, 9 months ago (2013-03-25 17:09:05 UTC) #7
akalin
Made the write queue store a SpdyStream/SpdyFrameProducer pair. Also moved all the write queue logic ...
7 years, 9 months ago (2013-03-26 03:05:28 UTC) #8
akalin
(I don't know why the trybots aren't working, even if I specify -r. Sigh.)
7 years, 9 months ago (2013-03-26 04:32:33 UTC) #9
akalin
ping!
7 years, 9 months ago (2013-03-27 23:43:16 UTC) #10
Ryan Hamilton
Looks great. Just a number of nits... https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_session.cc#newcode679 net/spdy/spdy_session.cc:679: DCHECK_NE(rv, ERR_IO_PENDING); ...
7 years, 9 months ago (2013-03-28 15:51:04 UTC) #11
akalin
PTAL! https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_session.cc#newcode679 net/spdy/spdy_session.cc:679: DCHECK_NE(rv, ERR_IO_PENDING); On 2013/03/28 15:51:04, Ryan Hamilton wrote: ...
7 years, 8 months ago (2013-04-06 01:17:48 UTC) #12
Ryan Hamilton
lgtm https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_write_queue.cc File net/spdy/spdy_write_queue.cc (right): https://codereview.chromium.org/13009012/diff/30001/net/spdy/spdy_write_queue.cc#newcode91 net/spdy/spdy_write_queue.cc:91: queue_[stream->priority()].push_back(*it); On 2013/04/06 01:17:48, akalin wrote: > On ...
7 years, 8 months ago (2013-04-08 16:17:14 UTC) #13
akalin
On 2013/04/08 16:17:14, Ryan Hamilton wrote: > Good to know! I'm unfamiliar with the internal ...
7 years, 8 months ago (2013-04-08 21:13:47 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/13009012/43001
7 years, 8 months ago (2013-04-09 00:23:32 UTC) #15
akalin
Committed patchset #5 manually as r192975 (presubmit successful).
7 years, 8 months ago (2013-04-09 00:50:29 UTC) #16
akalin
On 2013/04/09 00:50:29, akalin wrote: > Committed patchset #5 manually as r192975 (presubmit successful). Latest ...
7 years, 8 months ago (2013-04-13 06:41:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/13009012/71001
7 years, 8 months ago (2013-04-13 06:41:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/13009012/71001
7 years, 8 months ago (2013-04-13 06:42:33 UTC) #19
commit-bot: I haz the power
7 years, 8 months ago (2013-04-13 12:18:17 UTC) #20
Message was sent while issue was closed.
Change committed as 194102

Powered by Google App Engine
This is Rietveld 408576698