Intent to Implement and ship: messageerror event and event handlers

87 views
Skip to first unread message

Ben Smith

unread,
May 3, 2017, 1:45:47 PM5/3/17
to blink-dev
bi...@chromium.org https://html.spec.whatwg.org/
(see https://github.com/whatwg/html/pull/2530 for the specific changes)
The messageerror event is a new event, with an associated onmessageerror handler attached to the window, message ports, broadcast channels, and workers. The purpose of the event is to notify the receiver when a posted message could not be decoded. Currently the only use of this is when a SharedArrayBuffer is sent but cannot be shared, but there are also plans to use for other objects that want the same property (WebAssembly modules, for example). Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals
Low
None
Yes

Chris Harrelson

unread,
May 3, 2017, 8:41:55 PM5/3/17
to Ben Smith, blink-dev
Hi Ben, some comments below.

On Wed, May 3, 2017 at 10:45 AM, Ben Smith <bi...@chromium.org> wrote:
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals

Has there been any outreach to the other browsers? All of the browsers have implemented or shipped SharedArrayBuffer very recently, so hopefully all should be able to quickly align on a spec for this event.
 
Low
None
Yes

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Ben Smith

unread,
May 3, 2017, 8:59:55 PM5/3/17
to blink-dev, bi...@chromium.org, chri...@chromium.org
On Wednesday, May 3, 2017 at 5:41:55 PM UTC-7, Chris Harrelson wrote:
Hi Ben, some comments below.

On Wed, May 3, 2017 at 10:45 AM, Ben Smith <bi...@chromium.org> wrote:
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals

Has there been any outreach to the other browsers? All of the browsers have implemented or shipped SharedArrayBuffer very recently, so hopefully all should be able to quickly align on a spec for this event.

Anne has done some legwork to create browser bugs: https://github.com/whatwg/html/pull/2530#issuecomment-296621023


It seems there aren't any comments yet, aside from on Firefox, where they're wondering whether this blocks shipping SharedArrayBuffers.

Ben Smith

unread,
May 5, 2017, 7:04:19 PM5/5/17
to blink-dev, bi...@chromium.org, chri...@chromium.org


On Wednesday, May 3, 2017 at 5:59:55 PM UTC-7, Ben Smith wrote:
On Wednesday, May 3, 2017 at 5:41:55 PM UTC-7, Chris Harrelson wrote:
Hi Ben, some comments below.

On Wed, May 3, 2017 at 10:45 AM, Ben Smith <bi...@chromium.org> wrote:
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals

Has there been any outreach to the other browsers? All of the browsers have implemented or shipped SharedArrayBuffer very recently, so hopefully all should be able to quickly align on a spec for this event.

Anne has done some legwork to create browser bugs: https://github.com/whatwg/html/pull/2530#issuecomment-296621023


It seems there aren't any comments yet, aside from on Firefox, where they're wondering whether this blocks shipping SharedArrayBuffers.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1359017#c2, I've updated to public support.

The Edge bug has been assigned, but no other comments have been made.

I've also commented on the WebKit bug for further info.

Jeremy Roman

unread,
May 5, 2017, 8:25:15 PM5/5/17
to Ben Smith, blink-dev, Chris Harrelson
Would this just handle all exceptions thrown during deserialization? There are a handful of weird cases where we currently return null (catching the exception from V8), but it seems reasonable to dispatch messageerror instead.

Anne van Kesteren

unread,
May 6, 2017, 12:31:24 AM5/6/17
to Jeremy Roman, Ben Smith, blink-dev, Chris Harrelson
On Sat, May 6, 2017 at 2:25 AM, Jeremy Roman <jbr...@chromium.org> wrote:
> Would this just handle all exceptions thrown during deserialization? There
> are a handful of weird cases where we currently return null (catching the
> exception from V8), but it seems reasonable to dispatch messageerror
> instead.

If any of those cases are not related to ArrayBuffer or
SharedArrayBuffer, could you file an issue at
https://github.com/whatwg/html/issues/new? We do indeed mean for this
event to address such scenarios, with the possible exception of
generic OOM as other than for ArrayBuffer that's not really addressed
by JavaScript to begin with.


--
https://annevankesteren.nl/

Jeremy Roman

unread,
May 7, 2017, 12:24:58 PM5/7/17
to Anne van Kesteren, Ben Smith, blink-dev, Chris Harrelson
Right, I was mostly thinking about exceptions thrown in case of resource exhaustion, like stack overflow.

There's also the possibility of internal errors if corrupt/invalid serialized data somehow enters the system -- clearly an implementation issue, but "dispatch an [unspecified] messageerror event" still seems better than our current behaviour, "the whole message is now null". But any case of that happening is a bug of some sort or another.

--
https://annevankesteren.nl/

Philip Jägenstedt

unread,
May 11, 2017, 10:57:24 AM5/11/17
to Jeremy Roman, Anne van Kesteren, Ben Smith, blink-dev, Chris Harrelson
Still no action on the WebKit bug, but with the Edge bug being assigned and lth from Mozilla being involved both in the spec discussion and having commented that "messageerror, along with subtle aspects of sharing semantics, need to be implemented eventually" I think that meets the bar for implementer interest. (If someone hated the idea, we should have heard by now.)

The tests that Domenic wrote are already imported and failing, so hopefully they'll be made to pass as part of this. That covers the web-platform-tests question.

LGTM1

Rick Byers

unread,
May 11, 2017, 12:49:45 PM5/11/17
to Philip Jägenstedt, Jeremy Roman, Anne van Kesteren, Ben Smith, blink-dev, Chris Harrelson
LGTM2

Chris Harrelson

unread,
May 11, 2017, 12:57:19 PM5/11/17
to Rick Byers, Philip Jägenstedt, Jeremy Roman, Anne van Kesteren, Ben Smith, blink-dev
LGTM3

PhistucK

unread,
Aug 30, 2018, 6:18:39 PM8/30/18
to Chris Harrelson, Rick Byers, Philip Jägenstedt, Jeremy Roman, Anne van Kesteren, Ben Smith, blink-dev
Has this been shipped?
If so, it would be great if you updated https://www.chromestatus.com/features/5729005244252160 with the latest data.

Thank you!

PhistucK


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages