XHR.response crashes if the response is an empty string.

RESOLVED FIXED in Firefox 38

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: amarchesini, Assigned: amarchesini)

Tracking

Trunk
mozilla38
Points:
---

Firefox Tracking Flags

(firefox38 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Comment hidden (empty)
Created attachment 8564166 [details] [diff] [review]
xhr.patch

Of course this happens just in debug builds.
Attachment #8564166 - Flags: review?(bkelly)
Comment on attachment 8564166 [details] [diff] [review]
xhr.patch

Review of attachment 8564166 [details] [diff] [review]:
-----------------------------------------------------------------

As far as I can tell from the spec, this is allowed.  For example, see here:

  https://xhr.spec.whatwg.org/#text-response

Please include the empty.html file as well.  Thanks!
Attachment #8564166 - Flags: review?(bkelly) → review+
Created attachment 8564175 [details] [diff] [review]
xhr.patch
Attachment #8564166 - Attachment is obsolete: true
Keywords: checkin-needed
Comment on attachment 8564175 [details] [diff] [review]
xhr.patch

Sorry guys, removing the assertion isn't quite right. If the string is empty we need to use JS_GetEmptyStringValue, not create a new empty string.
Attachment #8564175 - Flags: review-
Keywords: checkin-needed
Created attachment 8564189 [details] [diff] [review]
xhr.patch
Attachment #8564175 - Attachment is obsolete: true
Attachment #8564189 - Flags: review?(bent.mozilla)
Comment on attachment 8564189 [details] [diff] [review]
xhr.patch

Thanks!
Attachment #8564189 - Flags: review?(bent.mozilla) → review+
Keywords: checkin-needed
Please provide a Try link.
Keywords: checkin-needed
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2e1f154f0341

If you see some b2g serviceWorker failure, this is related to a patch included in this push.
It's not related to this patch.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/41aa3bdc7e75
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.