New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642242 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

XMLHttpRequest.abort() in loadstart event handler should terminate the fetching

Project Member Reported by tyoshino@chromium.org, Aug 30 2016

Issue description

Example:

const xhr = new XMLHttpRequest();
xhr.open("GET", "hello.txt");
xhr.addEventListener("loadstart", () => {
  xhr.abort();
});
xhr.send();

Reported by the Edge of Microsoft. Thanks.

 

Comment 1 by sigbjo...@opera.com, Nov 12 2016

This needs to be spec-addressed first.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13c30eae8fbe5a1b9927c12be1cd88d102009932

commit 13c30eae8fbe5a1b9927c12be1cd88d102009932
Author: sigbjornf <sigbjornf@opera.com>
Date: Fri Nov 18 09:07:27 2016

XMLHttpRequest: check if 'loadstart' handler cancelled send().

'loadstart' is dispatched to both 'download' and upload event handlers
while initiating a send() operation. Should those event handlers cause
the ongoing send operation to be aborted/stopped/cancelled, this outer
send() operation shouldn't proceed upon return.

R=yhirano
BUG= 642242 

Review-Url: https://codereview.chromium.org/2507773002
Cr-Commit-Position: refs/heads/master@{#433157}

[add] https://crrev.com/13c30eae8fbe5a1b9927c12be1cd88d102009932/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/onloadstart-abort.html
[modify] https://crrev.com/13c30eae8fbe5a1b9927c12be1cd88d102009932/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Comment 4 by sigbjo...@opera.com, Nov 21 2016

Owner: sigbjo...@opera.com
Status: Fixed (was: Available)

Sign in to add a comment