[Bug 24687] DataCue: clarify that .data should be a clone of data argument and not a pointer

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24687

--- Comment #2 from Silvia Pfeiffer <silviapfeiffer1@gmail.com> ---
(In reply to Boris Zbarsky from comment #1)
> Why do you need to structured clone?  If the argument is an arraybuffer, you
> can just explicitly make a copy of its data (basically by calling the
> canonical ArrayBuffer.prototype.slice on it, with 0 as argument).
> 
> Unless you're _trying_ to preserve the at-the-time-of-call expandos as well?
> I would argue that's not worth it, and is in fact undesirable.

Do you think, though, that copying the data is the right approach? See the
example in the thread of strange side effects if we don't do it.

Maybe making .data read-only would be a better approach.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 6 March 2014 07:14:20 UTC