Summary: | Add support for FetchRequest.body | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||
Component: | WebCore Misc. | Assignee: | youenn fablet <youennf> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | achristensen, buildbot, cdumez, commit-queue, esprehn+autocc, kondapallykalyan, sam, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
youenn fablet
2017-08-29 14:10:26 PDT
Created attachment 319281 [details]
Patch
Attachment 319281 [details] did not pass style-queue:
ERROR: Source/WebCore/Modules/fetch/FetchBody.h:99: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4]
Total errors found: 1 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 319282 [details]
Patch
Attachment 319282 [details] did not pass style-queue:
ERROR: Source/WebCore/Modules/fetch/FetchBody.h:99: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4]
Total errors found: 1 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 319282 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319282&action=review > LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-disturbed-expected.txt:6 > +FAIL Input request used for creating new request became disturbed assert_equals: body should not change expected object "[object ReadableStream]" but got object "[object ReadableStream]" I don't understand this failure. Thanks for the review. (In reply to Alex Christensen from comment #5) > Comment on attachment 319282 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319282&action=review > > > LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-disturbed-expected.txt:6 > > +FAIL Input request used for creating new request became disturbed assert_equals: body should not change expected object "[object ReadableStream]" but got object "[object ReadableStream]" > > I don't understand this failure. When using a request A as init to another request B, the expected behavior is to pipe request A stream to request B stream. Request A stream then gets disturbed but remains the same. Currently we are not doing so, we are moving the stream to the other request. I added a FIXME for it in the patch. Comment on attachment 319282 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319282&action=review > Source/WebCore/bindings/js/ReadableStream.h:81 > +template<> struct JSConverter<IDLInterface<ReadableStream>> { > + static constexpr bool needsState = false; > + static constexpr bool needsGlobalObject = false; > + > + static JSC::JSValue convert(ReadableStream* value) > + { > + if (!value) > + return JSC::jsNull(); > + return value->readableStream(); > + } > +}; Can this just be a toJS() implementation? inline JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ReadableStream& impl) { return impl.readableStream(); } inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, ReadableStream* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); } The top one is often out-of-line. Comment on attachment 319282 [details] Patch Clearing flags on attachment: 319282 Committed r221329: <http://trac.webkit.org/changeset/221329> All reviewed patches have been landed. Closing bug. (In reply to Sam Weinig from comment #7) > Comment on attachment 319282 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319282&action=review > > > Source/WebCore/bindings/js/ReadableStream.h:81 > > +template<> struct JSConverter<IDLInterface<ReadableStream>> { > > + static constexpr bool needsState = false; > > + static constexpr bool needsGlobalObject = false; > > + > > + static JSC::JSValue convert(ReadableStream* value) > > + { > > + if (!value) > > + return JSC::jsNull(); > > + return value->readableStream(); > > + } > > +}; > > Can this just be a toJS() implementation? Right, I'll fix it as a follow-up Reopening to attach new patch. Created attachment 319331 [details]
Addendum
Comment on attachment 319331 [details] Addendum Rejecting attachment 319331 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 319331, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit /Volumes/Data/EWS/WebKit/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://webkit-queues.webkit.org/results/4407892 Created attachment 319384 [details]
Addendum
Comment on attachment 319384 [details] Addendum Clearing flags on attachment: 319384 Committed r221395: <http://trac.webkit.org/changeset/221395> All reviewed patches have been landed. Closing bug. |