New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 707365 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OoO until Feb 4th
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 674593



Sign in to add a comment

Use record<ByteString, ByteString> instead of OpenEndedDictionary in Headers constructor

Project Member Reported by lunalu@chromium.org, Mar 31 2017

Issue description

I couldn't find it in the spec. It doesn't seem like Gecko or WebKit has it either. Maybe we should just remove it.
 
Cc: raphael....@intel.com
Status: Available (was: Untriaged)
Summary: Use record<ByteString, ByteString> instead of OpenEndedDictionary in Headers constructor (was: Remove OpenEndedDictionary)
I believe we can use record<ByteString, ByteString> now.
Cc: foolip@chromium.org
Owner: raphael....@intel.com
Status: Started (was: Available)
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.
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Project Member

Comment 5 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment