Closed Bug 819838 Opened 12 years ago Closed 10 years ago

Structured cloning doesn't support dataviews

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 789594

People

(Reporter: bzbarsky, Unassigned)

References

Details

JSStructuredCloneWriter::startWrite has an if cascade that checks obj->isTypedArray() but never checks for dataviews as far as I can tell. On the face of it, this looks like it will fail to correctly structured clone DataView objects, right? I can see how getting the endianness right here might be a pain... Note that until this is implemented trying to use a dataview with worker XHR will probably fail.
Yes, DataViews are totally unsupported in the structured clone implementation. In fact, there's not even a JSAPI way to create DataViews. If it is needed, I can implement it, but it's going to be messy and require some unfortunate code duplication unless I do a fairly major refactoring first.
We aren't creating the the DataViews ourselves... we're getting a DataView passed in from the page and we need to send it to a different thread, hence structured cloning. So we don't really need API for creating them, just the cloning bit. Not sure that makes things easier for you, though.
Yes, sorry, I was unclear -- neither a public JSAPI nor a private API usable by structured clone is available. How much is this needed? I wasn't intending to do this work yet, but I could reshuffle if it's high priority.
I don't think it's high priority yet.
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.