Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Issue 60203010: XHR.abort(): no event dispatching in completed/non-started states. (Closed)

Created:
7 years, 1 month ago by sof
Modified:
7 years, 1 month ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

XHR.abort(): no event dispatching in completed/non-started states. Follow the spec and other implementations and only transition to an UNSENT state if abort() is called on request that either hasn't been sent or has completed. That is, no dispatching of progress events will be done. R= BUG=315470 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161515

Patch Set 1 #

Total comments: 3

Messages

Total messages: 11 (0 generated)
sof
Please have a look.
7 years, 1 month ago (2013-11-06 11:06:42 UTC) #1
abarth-chromium
lgtm
7 years, 1 month ago (2013-11-06 18:09:35 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/60203010/1
7 years, 1 month ago (2013-11-06 18:09:41 UTC) #3
abarth-chromium
Thanks for the CL!
7 years, 1 month ago (2013-11-06 18:09:43 UTC) #4
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=15951
7 years, 1 month ago (2013-11-06 20:41:54 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/60203010/1
7 years, 1 month ago (2013-11-06 22:44:12 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=15993
7 years, 1 month ago (2013-11-07 00:56:04 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/60203010/1
7 years, 1 month ago (2013-11-07 07:43:42 UTC) #8
commit-bot: I haz the power
Change committed as 161515
7 years, 1 month ago (2013-11-07 08:39:02 UTC) #9
tyoshino (SeeGerritForStatus)
Thanks for the fix. lgtm. i'll create patches for some minor issues later. https://codereview.chromium.org/60203010/diff/1/LayoutTests/http/tests/xmlhttprequest/readystatechange-and-abort.html File ...
7 years, 1 month ago (2013-11-07 13:38:05 UTC) #10
sof
7 years, 1 month ago (2013-11-07 14:34:11 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/60203010/diff/1/LayoutTests/http/tests/xmlhtt...
File LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js
(right):

https://codereview.chromium.org/60203010/diff/1/LayoutTests/http/tests/xmlhtt...
LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js:198: if
(me.request.readyState == XMLHttpRequest.DONE || me.request.readyState >
XMLHttpRequest.OPENED) {
On 2013/11/07 13:38:05, tyoshino wrote:
> maybe this should be
> me.request.readyState < XMLHttpRequest.OPENED
> but we don't hit this bug?
> 
> this code was hard to read before your change. i'll do some refactoring.

Much better, that was the intent & close enough (i.e., you could still be in
OPENED, pre-send(), and have abort() not dispatch any progress events.) But none
of the tests here exercises such early calls to abort(), afaict.

[The upstream Mozilla version doesn't have this extra condition & silently
completes the final AbortedRequest() (for "aborted") test without outputting
PASS.]

Powered by Google App Engine
This is Rietveld 408576698