fetch: Add [NewObject] and [SameObject] to the IDLs |
|||
Issue descriptionSince https://github.com/whatwg/fetch/commit/92f9337cd20402c4168cf15332b0116013474db8 (from 2014), several methods in the Fetch spec have been annotated with the [NewObject] and [SameObject] extended attributes. We need to follow suit in our IDL files.
,
Sep 27 2017
,
Sep 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f8daa6827b494ae034395db38e756efee07f08ae commit f8daa6827b494ae034395db38e756efee07f08ae Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Date: Wed Sep 27 17:23:41 2017 fetch: Add [NewObject] to IDL declarations that have it in the spec. Several IDL methods have been annotated with the [NewObject] extended attribute since 2014 (Fetch spec commit 92f9337cd2, "Sprinkle [NewObject], [SameObject] love"). Add it to our IDLs for spec compliance. In practice, at the moment this is a no-op for methods that return promises and it adds a DCHECK for methods that return interface types. Request.clone() and Response.clone() also need the Blink-specific [DoNotTestNewObject] extended attribute, as their C++ implementations call ToV8() on the new object they return, which causes the DCHECKs to fail (in other words, [NewObject] becomes a no-op for them as well). Bug: 769221 Change-Id: If1d598660efef656d165a79618a45ea8ddc99e30 Reviewed-on: https://chromium-review.googlesource.com/685658 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#504717} [modify] https://crrev.com/f8daa6827b494ae034395db38e756efee07f08ae/third_party/WebKit/Source/modules/fetch/Body.idl [modify] https://crrev.com/f8daa6827b494ae034395db38e756efee07f08ae/third_party/WebKit/Source/modules/fetch/Request.idl [modify] https://crrev.com/f8daa6827b494ae034395db38e756efee07f08ae/third_party/WebKit/Source/modules/fetch/Response.idl [modify] https://crrev.com/f8daa6827b494ae034395db38e756efee07f08ae/third_party/WebKit/Source/modules/fetch/WindowFetch.idl [modify] https://crrev.com/f8daa6827b494ae034395db38e756efee07f08ae/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl
,
Sep 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/684f43bff55fd6c4b6d27b65b5844d530e427212 commit 684f43bff55fd6c4b6d27b65b5844d530e427212 Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Date: Thu Sep 28 11:20:35 2017 fetch: Add [SameObject] to Request.headers and Response.headers. Adapt to https://github.com/whatwg/fetch/commit/92f9337cd20402c4168cf15332b0116013474db8 and add the [SameObject] extended attribute where it's used in the spec. In practice, there is no change to the generated code, as [SameObject] on its own is a no-op to our bindings layer and we always return the same Header object from Request and Response. Tests for this extended attribute were added upstream in https://github.com/w3c/web-platform-tests/pull/7511 (which has already been imported into Blink). Bug: 769221 Change-Id: Iad0a1ac72517f2da63013c9f7cff92cffe989af5 Reviewed-on: https://chromium-review.googlesource.com/689614 Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#504970} [modify] https://crrev.com/684f43bff55fd6c4b6d27b65b5844d530e427212/third_party/WebKit/Source/modules/fetch/Request.idl [modify] https://crrev.com/684f43bff55fd6c4b6d27b65b5844d530e427212/third_party/WebKit/Source/modules/fetch/Response.idl
,
Sep 28 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by raphael....@intel.com
, Sep 27 2017