Closed Bug 1132924 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Attached patch xhr.patch (obsolete) — Splinter Review
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+
Attached patch xhr.patch (obsolete) — Splinter Review
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-
Attached patch xhr.patchSplinter Review
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: