[webkit-changes] [WebKit/WebKit] 7cfb84: Test addition (247071 at main): [ macOS wk1 Debug ] T...

Chris Dumez noreply at github.com
Wed Nov 9 17:34:41 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7cfb84288e855e7c3bf1f79692523a06f450ab0b
      https://github.com/WebKit/WebKit/commit/7cfb84288e855e7c3bf1f79692523a06f450ab0b
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WebCore/xml/XMLHttpRequest.cpp
    M Source/WebCore/xml/XMLHttpRequest.h

  Log Message:
  -----------
  Test addition (247071 at main): [ macOS wk1 Debug ] Two imported/w3c/web-platform-tests/xhr/ tests are a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=244715
rdar://99492054

Reviewed by Geoffrey Garen.

The issue is that CFNetwork doesn't reliably calls didSendData() before calling
didFinishLoad(). As a result, it is possible for a XMLHttpRequest upload to be
marked as DONE without getting any progress events on XMLHttpRequest.upload.

This was causing the test to fail flakily since it verified that at least
one `progress` event get fired at `XMLHttpRequest.upload` before the XHR is
marked as DONE.

To address the issue, we now explicitly call didSendData(bodySize) inside
didFinishLoading() if didSendData() wasn't called yet.

* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::didSendData):
* Source/WebCore/xml/XMLHttpRequest.h:

Canonical link: https://commits.webkit.org/256512@main




More information about the webkit-changes mailing list