|
Moving the work currently done in the QuicSession constructor to
Initialize().
This is worthwhile because currently it's possible for virtual functions
to be called from under the stack of the QuicSession constructor, which
is confusing and annoying to debug. Example: if a bad config (without
SetDefaults called) is passed to the quic server session, it calls
SetFromConfig which calls SetIdleNetworkTimeout which calls
CheckForTimeout which can technically call SendConnectionClose which
calls CloseConnection which calls visitor->OnConnectionClosed() on the
session, which still doesn't have a good vtable.
As it turns out, this puts the internal server in an inconsistent state
which causes all sorts of other annoying to debug things. This can be
solved by never giving an invalid config (heh) or, say, not doing a ton
of complicated work in a constructor in the first place.
This hopefully will also make some unit testing earlier as you don't
have to do quite as much work in test classes.
Moving work from the QuicSession constructor to InitializeSession()
Merge internal change: 70661792
R=rch@chromium.org
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+91 lines, -69 lines) |
Patch |
 |
M |
net/quic/quic_client_session.h
|
View
|
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_client_session.cc
|
View
|
|
5 chunks |
+20 lines, -17 lines |
2 comments
|
Download
|
 |
M |
net/quic/quic_client_session_test.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_http_stream_test.cc
|
View
|
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_server_session.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_session.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_session.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
net/quic/quic_session_test.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/quic/quic_stream_factory.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/quic/test_tools/crypto_test_utils.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/quic/test_tools/quic_test_utils.cc
|
View
|
|
3 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_client.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_client_session.h
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_client_session.cc
|
View
|
|
3 chunks |
+16 lines, -11 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_client_session_test.cc
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_server_session.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_spdy_client_stream_test.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/test_tools/quic_test_utils.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|