This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently the structured clone algorithm throws a NOT_SUPPORTED_ERR error when the cloning fails (for example due to the cloned object containing host objects). This is a fairly generic and uninformative error. One problem is that this makes it hard to defer to the HTML5 spec for other specs that are using structured clones. For example IndexedDB uses the structured clone algorithm for the IDBObjectStore.add method. However if all that is thrown if a "uncloneable" is passed to IDBObjectStore.add is NOT_SUPPORTED_ERR, then that gives the author very little information about what went wrong. I propose we instead throw a DATA_CLONE_ERR error, or some such.
Ok.EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Concurred with reporter's comments.
Checked in as WHATWG revision r5311. Check-in comment: Make the structured clone algorithm using DATA_CLONE_ERR rather than NOT_SUPPORTED_ERR, for sicking. http://html5.org/tools/web-apps-tracker?from=5310&to=5311