⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243757 in webkit


Ignore:
Timestamp:
Apr 2, 2019, 1:48:19 PM (7 years ago)
Author:
Chris Dumez
Message:

[Fetch API] Allow used body replacement in Request constructor
https://bugs.webkit.org/show_bug.cgi?id=183703
<rdar://problem/49425609>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test now that one more check is passing.

  • web-platform-tests/fetch/api/request/request-disturbed-expected.txt:

Source/WebCore:

Allow used body replacement in Request constructor as per:

No new tests, rebaseline existing test.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r243756 r243757  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [Fetch API] Allow used body replacement in Request constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=183703
     5        <rdar://problem/49425609>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Rebaseline WPT test now that one more check is passing.
     10
     11        * web-platform-tests/fetch/api/request/request-disturbed-expected.txt:
     12
    1132019-04-02  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-disturbed-expected.txt

    r230330 r243757  
    44PASS Check cloning a disturbed request
    55PASS Check creating a new request from a disturbed request
    6 FAIL Check creating a new request with a new body from a disturbed request Request input is disturbed or locked.
     6PASS Check creating a new request with a new body from a disturbed request
    77FAIL Input request used for creating new request became disturbed assert_equals: body should not change expected object "[object ReadableStream]" but got object "[object ReadableStream]"
    88FAIL Input request used for creating new request became disturbed even if body is not used assert_true: bodyUsed is true when request is disturbed expected true got false
  • trunk/Source/WebCore/ChangeLog

    r243756 r243757  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [Fetch API] Allow used body replacement in Request constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=183703
     5        <rdar://problem/49425609>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Allow used body replacement in Request constructor as per:
     10        - https://github.com/whatwg/fetch/pull/675
     11
     12        No new tests, rebaseline existing test.
     13
     14        * Modules/fetch/FetchRequest.cpp:
     15        (WebCore::FetchRequest::initializeWith):
     16
    1172019-04-02  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp

    r243163 r243757  
    204204ExceptionOr<void> FetchRequest::initializeWith(FetchRequest& input, Init&& init)
    205205{
    206     if (input.isDisturbedOrLocked())
    207         return Exception {TypeError, "Request input is disturbed or locked."_s };
    208 
    209206    m_request = input.m_request;
    210207    m_options = input.m_options;
     
    241238            return setBodyResult.releaseException();
    242239    } else {
     240        if (input.isDisturbedOrLocked())
     241            return Exception { TypeError, "Request input is disturbed or locked."_s };
     242
    243243        auto setBodyResult = setBody(input);
    244244        if (setBodyResult.hasException())
Note: See TracChangeset for help on using the changeset viewer.