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

Issue 66323004: XHR: compliant event sequencing on request errors and aborts. (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: compliant event sequencing on request errors and aborts. Implement the event sequencing that the XHR spec now mandates for request errors and abort()s. For request errors over async requests, the following steps and sequence of events should now be dispatched: - readyState transitions to state DONE, dispatching a readystatechange event. - The ordered event triple (progress, <event type>, loadend) is dispatched to the upload event listeners, if any. - The ordered event triple (progress, <event type>, loadend) is dispatched to the regular/download event listeners. - readyState transitions to UNSENT. where <event type> is one of {'error', 'timeout', 'abort'}. Same steps for abort(), for both sync and async requests. The required dispatching of 'progress' here is a relatively new addition to the specification, late 2012. A behavioral implementation change is the fourth step of transitioning to UNSENT. This was previously done as step two (after dispatching readystatechange), an out-of-spec and incorrect quirk. For the above sequence, to allow for the delivery of 'readystatechange' on transitioning to DONE, but delay the delivery of the final 'progress', we carefully only flush any deferred 'progress' event before that 'readystatechange' event, but do not issue new. That dispatch happens after the upload progress events have been dealt with. To make the correspondence clearer to the underlying spec text, the request error steps have been factored out into a separate method. R=tyoshino,abarth BUG=315488 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162340

Patch Set 1 #

Total comments: 7

Patch Set 2 : Improve test code quality #

Messages

Total messages: 10 (0 generated)
sof
At your own leisure, please take a look. (This is the main functional change from ...
7 years, 1 month ago (2013-11-19 08:51:47 UTC) #1
abarth-chromium
Thanks, this was much easier to review. LGTM
7 years, 1 month ago (2013-11-19 16:54:42 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/66323004/1
7 years, 1 month ago (2013-11-19 16:55:00 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/66323004/diff/1/LayoutTests/http/tests/xmlhttprequest/abort-after-send.html File LayoutTests/http/tests/xmlhttprequest/abort-after-send.html (right): https://codereview.chromium.org/66323004/diff/1/LayoutTests/http/tests/xmlhttprequest/abort-after-send.html#newcode40 LayoutTests/http/tests/xmlhttprequest/abort-after-send.html:40: }), 100); does this need to be 100? https://codereview.chromium.org/66323004/diff/1/LayoutTests/http/tests/xmlhttprequest/abort-after-send.html#newcode72 ...
7 years, 1 month ago (2013-11-19 16:57:38 UTC) #4
tyoshino (SeeGerritForStatus)
except for the comments in #4, lgtm. never mind, please address them later.
7 years, 1 month ago (2013-11-19 16:59:07 UTC) #5
abarth-chromium
On 2013/11/19 16:59:07, tyoshino wrote: > except for the comments in #4, lgtm. never mind, ...
7 years, 1 month ago (2013-11-19 17:25:58 UTC) #6
sof
Thanks for the extra round of reviewing, tyoshino. https://codereview.chromium.org/66323004/diff/1/LayoutTests/http/tests/xmlhttprequest/abort-after-send.html File LayoutTests/http/tests/xmlhttprequest/abort-after-send.html (right): https://codereview.chromium.org/66323004/diff/1/LayoutTests/http/tests/xmlhttprequest/abort-after-send.html#newcode40 LayoutTests/http/tests/xmlhttprequest/abort-after-send.html:40: }), ...
7 years, 1 month ago (2013-11-19 18:57:03 UTC) #7
tyoshino (SeeGerritForStatus)
lgtm Thanks
7 years, 1 month ago (2013-11-20 06:09:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/66323004/140002
7 years, 1 month ago (2013-11-20 06:10:05 UTC) #9
commit-bot: I haz the power
7 years, 1 month ago (2013-11-20 07:39:43 UTC) #10
Message was sent while issue was closed.
Change committed as 162340

Powered by Google App Engine
This is Rietveld 408576698