Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

XMLHTTPRequest abort multipletimes will cause updateTaskCount incorrect #569

@JiaLiPassion

Description

@JiaLiPassion

Based on #287, and the comment from @RicardoVaranda's comment, the XMLHTTPRequest will cause Uncaught Error: More tasks executed then were scheduled. The error can be described
as

const req = new XMLHttpRequest();
      req.open('get', '/', true);
      req.send();
      req.addEventListener('readystatechange', function(ev) {
        if (req.readyState >= 2) {
          req.abort();
        }
      });

The abort will be called multiple times before the request is done.
So we should add logic to verify whether the request has already been aborted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions