Setting the .responseType field of an XMLHttpRequest in a web worker throws InvalidStateError.

RESOLVED FIXED in Firefox 50

Status

()

Core
DOM: Workers
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Jukka Jylänki, Assigned: baku)

Tracking

Trunk
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

(Whiteboard: btpp-followup-2016-06-15)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

2 years ago
Created attachment 8761095 [details]
xhr_responsetype_in_worker.html

STR: Run the attached file and check the page console.

Observed: page throws exception "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable"

Expected: it should be possible to set responseType to 'arraybuffer' when an XHR is initiated in a web worker. Note how the code does work when run in main thread.
baku, wdyt?
Flags: needinfo?(amarchesini)
Whiteboard: btpp-followup-2016-06-15
(Assignee)

Updated

2 years ago
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
(Assignee)

Comment 2

2 years ago
Created attachment 8761615 [details] [diff] [review]
xhr.patch

Maybe khuey can review this, but he is on vacation. Smaug, if you are busy, just move this review request. Or ping me on IRC and I do it.
Attachment #8761095 - Attachment is obsolete: true
Attachment #8761615 - Flags: review?(bugs)
(Assignee)

Comment 3

2 years ago
Created attachment 8761616 [details] [diff] [review]
xhr.patch
Attachment #8761615 - Attachment is obsolete: true
Attachment #8761615 - Flags: review?(bugs)
Attachment #8761616 - Flags: review?(bugs)
Attachment #8761616 - Flags: review?(bugs) → review?(bkelly)

Updated

2 years ago
Attachment #8761616 - Flags: review?(bkelly) → review+

Comment 4

2 years ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f8bf34b3dcc
XHR in workers should support the setting of responseType before calling open(), r=bkelly

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0f8bf34b3dcc
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.