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

Issue 2691513002: Fetch: Make Headers' constructor match the current spec IDL. (Closed)

Created:
3 years, 10 months ago by Raphael Kubo da Costa (rakuco)
Modified:
3 years, 8 months ago
CC:
chromium-reviews, blink-reviews, haraken, jpmedley
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fetch: Make Headers' constructor match the current spec IDL. Instead of specifying several different constructors in the IDL (including an overload for the defunct OpenEndedDictionary type), make Headers.idl match the Fetch spec and just declare a single constructor that optionally takes a HeadersInit type, which has also been modified to take a record<ByteString,ByteString> instead of a Dictionary now that we support records in the WebIDL compiler. By using HeadersInit, which we define in the same IDL, we can get rid of RequestInit::headers_dictionary altogether and leave most of the V8-Impl type conversions to the auto-generated bindings code. Consequently, this also lets us remove several Header::Create() overloads. BUG=707365 R=tyoshino@chromium.org,yhirano@chromium.org Review-Url: https://codereview.chromium.org/2691513002 Cr-Commit-Position: refs/heads/master@{#463623} Committed: https://chromium.googlesource.com/chromium/src/+/07c092298a6243fc2c829e517cf2b19f4caea26c

Patch Set 1 #

Total comments: 1

Patch Set 2 : Patch v2 #

Total comments: 2

Patch Set 3 : Rebase and use records in HeadersInit #

Patch Set 4 : Reference Fetch issue 479 #

Patch Set 5 : Rebase after the Blink Rename #

Total comments: 4

Patch Set 6 : Remove unnecessary includes #

Patch Set 7 : Rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -113 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-record-expected.txt View 1 2 1 chunk +9 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js View 1 2 2 chunks +27 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/generated.gni View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Headers.h View 1 2 3 4 5 6 3 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Headers.cpp View 1 2 3 4 5 6 5 chunks +29 lines, -59 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Headers.idl View 1 2 1 chunk +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Request.cpp View 1 2 3 4 2 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/RequestInit.h View 1 2 3 4 5 6 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/RequestInit.cpp View 1 2 3 4 3 chunks +27 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Response.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/ResponseInit.idl View 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 35 (20 generated)
Raphael Kubo da Costa (rakuco)
PTAL. This is a simplification of existing code and I don't expect any behavior changes, ...
3 years, 10 months ago (2017-02-10 13:30:43 UTC) #1
yhirano
I think this CL changes the behavior. r = new Request('/', {headers: {'hoge': 'fuga'}}); rr ...
3 years, 10 months ago (2017-02-13 05:56:46 UTC) #3
yhirano
https://codereview.chromium.org/2691513002/diff/1/third_party/WebKit/Source/modules/fetch/Headers.cpp File third_party/WebKit/Source/modules/fetch/Headers.cpp (right): https://codereview.chromium.org/2691513002/diff/1/third_party/WebKit/Source/modules/fetch/Headers.cpp#newcode282 third_party/WebKit/Source/modules/fetch/Headers.cpp:282: // FIXME: This method's signature must change once we ...
3 years, 10 months ago (2017-02-13 05:56:51 UTC) #4
Raphael Kubo da Costa (rakuco)
Thanks for the review; patch v2 is up. I now make some additional checks for ...
3 years, 10 months ago (2017-02-13 14:12:20 UTC) #5
yhirano
https://codereview.chromium.org/2691513002/diff/20001/third_party/WebKit/Source/modules/fetch/Headers.cpp File third_party/WebKit/Source/modules/fetch/Headers.cpp (right): https://codereview.chromium.org/2691513002/diff/20001/third_party/WebKit/Source/modules/fetch/Headers.cpp#newcode76 third_party/WebKit/Source/modules/fetch/Headers.cpp:76: } else { NOTREACHED(); } https://codereview.chromium.org/2691513002/diff/20001/third_party/WebKit/Source/modules/fetch/RequestInit.cpp File third_party/WebKit/Source/modules/fetch/RequestInit.cpp (right): ...
3 years, 10 months ago (2017-02-14 03:28:50 UTC) #6
Raphael Kubo da Costa (rakuco)
Sorry for the delay. I ended up taking a long detour that involved adding support ...
3 years, 8 months ago (2017-04-07 12:24:56 UTC) #8
Raphael Kubo da Costa (rakuco)
Patch rebased after the Blink rename that happened last weekend.
3 years, 8 months ago (2017-04-10 12:22:41 UTC) #14
yhirano
lgtm https://codereview.chromium.org/2691513002/diff/80001/third_party/WebKit/Source/modules/fetch/Headers.cpp File third_party/WebKit/Source/modules/fetch/Headers.cpp (right): https://codereview.chromium.org/2691513002/diff/80001/third_party/WebKit/Source/modules/fetch/Headers.cpp#newcode7 third_party/WebKit/Source/modules/fetch/Headers.cpp:7: #include "bindings/core/v8/Dictionary.h" Do we still need this? https://codereview.chromium.org/2691513002/diff/80001/third_party/WebKit/Source/modules/fetch/RequestInit.h ...
3 years, 8 months ago (2017-04-11 03:32:41 UTC) #19
Raphael Kubo da Costa (rakuco)
Thanks for the review; I've removed those unnecessary includes in patch v6, which I'm going ...
3 years, 8 months ago (2017-04-11 08:02:21 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2691513002/100001
3 years, 8 months ago (2017-04-11 08:03:00 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/50392)
3 years, 8 months ago (2017-04-11 09:22:51 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2691513002/100001
3 years, 8 months ago (2017-04-11 09:33:21 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/427860) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 8 months ago (2017-04-11 09:37:59 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2691513002/120001
3 years, 8 months ago (2017-04-11 12:18:45 UTC) #32
commit-bot: I haz the power
3 years, 8 months ago (2017-04-11 14:36:04 UTC) #35
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/07c092298a6243fc2c829e517cf2...

Powered by Google App Engine
This is Rietveld 408576698