Use record<ByteString, ByteString> instead of OpenEndedDictionary in Headers constructor |
||||
Issue descriptionI couldn't find it in the spec. It doesn't seem like Gecko or WebKit has it either. Maybe we should just remove it.
,
Apr 7 2017
,
Apr 7 2017
We can. In fact, that was the original reason I set out to add record<> support to our WebIDL code :-) Before the code landed I sent https://codereview.chromium.org/2691513002/, I just never got around to updating it afterwards.
,
Apr 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e1372a28311ec4b7fee0ae76eba7301069e7c6a commit 9e1372a28311ec4b7fee0ae76eba7301069e7c6a Author: raphael.kubo.da.costa <raphael.kubo.da.costa@intel.com> Date: Fri Apr 07 14:30:12 2017 bindings: Skip undefined property descriptors when creating records. We were being too aggressive with our DCHECK(desc->IsObject()). The spec says (and we even mention it in a comment) that a call to Object.getOwnPropertyDescriptor can return undefined in addition to a proper object descriptor. We were only considering the latter case, and crashing on the DCHECK if we ever received an undefined descriptor, which can happen when a Proxy is used in JS. This is also covered by external/wpt/fetch/api/headers/headers-record.html. BUG= 707365 R=bashi@chromium.org,haraken@chromium.org,yukishiino@chromium.org Review-Url: https://codereview.chromium.org/2801003005 Cr-Commit-Position: refs/heads/master@{#462850} [modify] https://crrev.com/9e1372a28311ec4b7fee0ae76eba7301069e7c6a/third_party/WebKit/LayoutTests/bindings/record-type.html [modify] https://crrev.com/9e1372a28311ec4b7fee0ae76eba7301069e7c6a/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h
,
Apr 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/07c092298a6243fc2c829e517cf2b19f4caea26c commit 07c092298a6243fc2c829e517cf2b19f4caea26c Author: raphael.kubo.da.costa <raphael.kubo.da.costa@intel.com> Date: Tue Apr 11 14:35:07 2017 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} [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-record-expected.txt [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/bindings/modules/v8/generated.gni [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/Headers.cpp [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/Headers.h [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/Headers.idl [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/Request.cpp [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/RequestInit.cpp [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/RequestInit.h [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/Response.cpp [modify] https://crrev.com/07c092298a6243fc2c829e517cf2b19f4caea26c/third_party/WebKit/Source/modules/fetch/ResponseInit.idl
,
Apr 11 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by yhirano@chromium.org
, Apr 6 2017Status: Available (was: Untriaged)
Summary: Use record<ByteString, ByteString> instead of OpenEndedDictionary in Headers constructor (was: Remove OpenEndedDictionary)