|
Split the constructor of ThreadableLoader into two methods (ctor and start())
Reasons:
- Basically, it's not good to do much work in a constructor.
- DocumentThreadableLoader may fail synchronously, and then
m_client->didFail() will be called. The design that m_client is passed
to the constructor means that the client should be ready for
callbacks (didFail(), etc.) when calling the constructor. It's better
if both didFail() call by network thread and the sync one are handled
by single logic. However, in the sync callback case, the loader
instance is not yet created. This difference gives us some unexpected
complexity in the logic to be implemented in didFail().
- Splitting the constructor into a new trivial constructor and start()
method allows finishing association between the loader and the client
without worry about failure.
This CL simplifies EventSource code as m_requestInFlight is unnecessary.
start() takes a ResourceRequest as it's good to keep the current design
that we don't hold ResourceRequest in a member variable.
BUG= 518855, 514547, 389326
Committed: https://crrev.com/f2a0d7de0ca23cb14148af488c18f8638a3976a8
Cr-Commit-Position: refs/heads/master@{#375537}
Total comments: 24
Total comments: 6
Total comments: 18
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+281 lines, -150 lines) |
Patch |
 |
A |
third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-async-post-xhr-blocked.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-blocked.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-fetch.html
|
View
|
1
2
3
4
5
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
|
View
|
1
2
3
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
10 chunks |
+37 lines, -14 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/MockThreadableLoader.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/ThreadableLoader.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+27 lines, -11 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/ThreadableLoader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
7 chunks |
+15 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
5 chunks |
+54 lines, -33 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/EventSource.h
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/EventSource.cpp
|
View
|
1
2
3
4
5
6
7
8
|
13 chunks |
+18 lines, -25 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/EventSourceTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
|
View
|
1
2
3
|
3 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandleTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
8 chunks |
+17 lines, -11 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchFormDataConsumerHandleTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
3 chunks |
+17 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchManager.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/AssociatedURLLoader.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 59 (21 generated)
|