Closed Bug 1346767 Opened 3 years ago Closed 2 years ago

XMLHttpRequest: upload listener flag not implemented correctly


(Core :: DOM: Core & HTML, enhancement, P2)




Tracking Status
firefox56 --- fixed


(Reporter: annevk, Assigned: shawnjohnjr)


(Blocks 1 open bug)



(2 files, 3 obsolete files)

In particular, it seems we bypass it for same-origin requests, which is unlikely to work well, as same-origin can be redirected to cross-origin.
Maybe baku knows what's up here?
Flags: needinfo?(amarchesini)
Priority: -- → P2
One of ProgressEventTimer doesn't get cancel, then it fires progress event unexpectedly.
I will find out why progress event timer still exists. We also need to make sure if event listeners are registered after send(), progress event should not fire at all.
Assignee: nobody → shuang
Sorry for late response, now I switch back to this bug. Set ETA.
Whiteboard: [ETA:6/20]
Flags: needinfo?(amarchesini)
Not sure if this could break other tests compatibility, so run try all.
The risk is that xhr.upload event listeners are registered after xhr.send() in same origin/non-simple, progress events shall not be received, maybe this would break some web sites.
(In reply to Shawn Huang [:shawnjohnjr] from comment #11)
> try:
> jobs?repo=try&revision=4557f3fe1619ab4972f26d5638f14094336ce5c7

There are so many unknown error.
Push to try again:
Attachment #8888785 - Flags: review?(amarchesini) → review+
Attachment #8888786 - Flags: review?(amarchesini) → review+
Pushed by
Part 1: Check mFlagHadUploadListenersOnSend before sending progress event, r=baku
Part 2: Make sure xhr.upload event listeners will be ignored if listeners are registered after send(), r=baku
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Ah wait, doesn't look like I need to update any docs to account for this.
Keywords: dev-doc-needed
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.