Closed
Bug 1392358
Opened 7 years ago
Closed 7 years ago
Unify xhr.send() and remove xhr.send(nsIInputStream)
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
17.70 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
4.26 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
from the spec, XHR should have this send method: void send(optional (Document or BodyInit)? body = null); We still expose |send(nsIInputStream)| because maybe some addon was still depending on it, but because of FF57 we can stop the supporting nsIInputStream in xhr.send().
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8899557 -
Flags: review?(bugs)
Comment 2•7 years ago
|
||
Comment on attachment 8899557 [details] [diff] [review] xhr.patch Better to push this to tryserver before landing.
Attachment #8899557 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 3•7 years ago
|
||
It turned out that searchController uses the sending of an inputStream. I would like to have this feature as a separate method, chrome only: it makes cleaner to know what is exposed to content and what is not.
Attachment #8900612 -
Flags: review?(bugs)
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 4•7 years ago
|
||
Comment on attachment 8900612 [details] [diff] [review] xhr2.patch Please check if some other code might use input stream too. Like, look for XHR usage in browser chrome.
Attachment #8900612 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/586a6514e046 Remove XHR.send(nsIInputStream) and unify XHR.send(params) as the spec says, r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/0d9988ed1c6e Introduce XHR.sendInputStream(nsIInputStream) chrome-only, r=smaug
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/586a6514e046 https://hg.mozilla.org/mozilla-central/rev/0d9988ed1c6e
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 7•7 years ago
|
||
BTW, Thunderbird was using XHR.send(nsIInputStream) and now we switched to XHR.sendInputStream(nsIInputStream), bug 1394081. It would be nice if you could think of your tiny little brother before removing interfaces without replacement. Luckily you're using it yourself.
Comment 8•7 years ago
|
||
I've updated the send() method page to provide a better explanation of its parameter, and remove any information about nsIInputStream: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send I've also added a note to the Fx57 rel notes: https://developer.mozilla.org/en-US/Firefox/Releases/57#DOM Let me know if that looks OK. Thanks!
Keywords: dev-doc-needed → dev-doc-complete
Comment 9•7 years ago
|
||
Chris, the nsIInputStream overload was not exposed to the web. It was only exposed to privileged code. So I'm not sure whether we should document it in the "Firefox 57 for developers" documentation...
Flags: needinfo?(cmills)
Comment 10•7 years ago
|
||
(In reply to Boris Zbarsky [:bz] (still digging out from vacation mail) from comment #9) > Chris, the nsIInputStream overload was not exposed to the web. It was only > exposed to privileged code. So I'm not sure whether we should document it > in the "Firefox 57 for developers" documentation... OK, makes sense. I've removed it from the rel notes.
Flags: needinfo?(cmills)
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•