forked fromWebKit/WebKit
- Notifications
You must be signed in to change notification settings - Fork0
Commit206817f
[fetch] Implement the
https://bugs.webkit.org/show_bug.cgi?id=240375Reviewed by Youenn Fablet.This implements the `Response.json` static method, added to the fetchspec inwhatwg/fetch#1392.* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any-expected.txt:* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.serviceworker-expected.txt:* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.sharedworker-expected.txt:* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-json.any.worker-expected.txt:* Source/WebCore/Modules/fetch/FetchBody.h:* Source/WebCore/Modules/fetch/FetchResponse.cpp:(WebCore::FetchResponse::create): Added this method overload to implement the spec's "initialize a response" algorithm. This algortihm used to be combined with the regular Response creation algorithm which extracts the body, but Response.json cannot use that directly.(WebCore::FetchResponse::staticJson):* Source/WebCore/Modules/fetch/FetchResponse.h:* Source/WebCore/Modules/fetch/FetchResponse.idl:Canonical link:https://commits.webkit.org/261960@mainResponse.json
static method1 parent84eb232 commit206817f
File tree
8 files changed
+93
-92
lines changed- LayoutTests/imported/w3c/web-platform-tests/fetch/api/response
- Source/WebCore/Modules/fetch
8 files changed
+93
-92
lines changedLines changed: 8 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 14 | + | |
19 | 15 |
|
Lines changed: 8 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 14 | + | |
19 | 15 |
|
Lines changed: 8 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 14 | + | |
19 | 15 |
|
Lines changed: 8 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 14 | + | |
19 | 15 |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 |
| |
64 | 69 |
| |
65 | 70 |
| |
| |||
96 | 101 |
| |
97 | 102 |
| |
98 | 103 |
| |
99 |
| - | |
100 | 104 |
| |
101 | 105 |
| |
102 | 106 |
| |
| |||
130 | 134 |
| |
131 | 135 |
| |
132 | 136 |
| |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 |
|
0 commit comments
Comments
(0)