Closed Bug 311425 Opened 19 years ago Closed 14 years ago

allow setting OnProgress after XMLHttpRequest::open()

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- -

People

(Reporter: Biesinger, Assigned: smaug)

References

Details

Attachments

(1 file)

since all the other m* can be set even after open is called, so should
OnProgress. The issue here is that this affects the load flags of the channel
(must clear LOAD_BACKGROUND). But, load flags can be set just fine after channel
creation.

http://lxr.mozilla.org/seamonkey/source/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#939
We could easily make it possible to set onprogress up until the point where send is called.
So all we need to do is change the channel's flags when onprogress is set or addEventListener is called for the "progress" event, right?
Flags: blocking1.9a2?
Yeah.  Do we have to worry about when mScriptContext is assigned?  It seems to be assigned from several of the "on" property setters.
Flags: blocking1.9a2? → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Smaug: you wanna have a look at this since this affects the newly added progress events.

Ideally you would request progress events even on background channels :(
Sure, I can take this.
Assignee: xml → Olli.Pettay
Depends on: 435425
QA Contact: ashshbhatt → xml
blocking2.0: --- → ?
Attached patch patchSplinter Review
I think we should do this, at least for now.
Changing background loading would need changes to necko.

Still trying to figure out how to test this reliably.
(progress events are dispatched only every 50ms or so)
Attachment #473024 - Flags: review?(jonas)
Comment on attachment 473024 [details] [diff] [review]
patch

Passed tryserver tests.
Attachment #473024 - Flags: approval2.0?
http://hg.mozilla.org/mozilla-central/rev/6e5afa551ac2
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: