[Webkit-unassigned] [Bug 216266] New: XHR.timeout is affected by long tasks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 8 01:18:07 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216266

            Bug ID: 216266
           Summary: XHR.timeout is affected by long tasks
           Product: WebKit
           Version: Safari 13
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: samuel.elg at sourcedefense.com

Created attachment 408218

  --> https://bugs.webkit.org/attachment.cgi?id=408218&action=review

Files to easily reproduce the bug

Steps to reproduce:

A zip file with the front and back-end needed to reproduce this issue is attached.

Open the zip file, and serve that folder (in mac you can run "http-serve") and visit the index.html file.
The folder has a "server.js" file. Run it with "node server.js."
Refresh multiple times, and you will see that sometimes the timeout callback is called, even though it shouldn't (console will log "timeout!").
What the script and server reproduce:

The timeout is set to 1000ms.
The request is made.
A blocking script is running for 2000ms (a while loop).
The server responds in 100ms (concurrently to step 3).
The timeout callback is called, and the request is canceled.
Actual results:

The request is canceled and the timeout callback is called.

Expected results:

The request should not be canceled (Chrome behaves correctly, Firefox has the same issue).
It seems like the timer counting the time of the request is running on the main thread and therefore affected by long tasks, this should not be the case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200908/e7f1dd23/attachment.htm>


More information about the webkit-unassigned mailing list