Closed Bug 1346767 Opened 3 years ago Closed 2 years ago

XMLHttpRequest: upload listener flag not implemented correctly

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: annevk, Assigned: shawnjohnjr)

References

(Blocks 1 open bug)

Details

Attachments

(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.

https://github.com/w3c/web-platform-tests/pull/5122
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:
>  https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=4557f3fe1619ab4972f26d5638f14094336ce5c7

There are so many unknown error.
Push to try again:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ae85a618859475927bfb95e1f5d37a8070dea578
Attachment #8888785 - Flags: review?(amarchesini) → review+
Attachment #8888786 - Flags: review?(amarchesini) → review+
Pushed by shuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0817bf2f80b
Part 1: Check mFlagHadUploadListenersOnSend before sending progress event, r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/4377bafde262
Part 2: Make sure xhr.upload event listeners will be ignored if listeners are registered after send(), r=baku
https://hg.mozilla.org/mozilla-central/rev/f0817bf2f80b
https://hg.mozilla.org/mozilla-central/rev/4377bafde262
Status: NEW → RESOLVED
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.