[whatwg] Structured clone for an Error object

On Fri, Feb 26, 2010 at 1:44 PM, Drew Wilson <atwilson at google.com> wrote:
> BTW, the spec says that unhandled exceptions are either propagated to the
> parent Worker object (in the case of dedicated workers) or reported to the
> user via the console (for shared workers).
> So I'm not certain why passing Error objects via postMessage() would be
> necessary for a spec-compliant UA (note that some UAs have bugs in their
> implementation such that not all exceptions in Workers are logged to the
> console, but that shouldn't motivate a change in the spec).
> -atw

This is good to know. As far as I tested, Firefox and Safari actually
supports worker.onerror.

It also turns out that Firefox and Chromium actually sends a clone of
an Error object. Safari turns it into a string. Are they going to
convert change the behavior in the future?

A. TAKAYAMA

Received on Sunday, 28 February 2010 14:03:31 UTC