Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement ErrorEvent, Window/Worker.onerror, and proper JS error reporters #3311
Comments
|
This is potentially being worked on by a team of students, so anyone interested in working on it should contact me first. |
|
Initial step: Build Servo, add a new
|
|
@jdm is this still being worked on by students? There's a bunch of easy wins in the web-platform-tests if we can finish this. I would be happy to complete this if it's not being worked on. |
|
Nope, it's available! |
|
Sweet. I'll get on it tonight. |
|
Blocks #2185. |
|
@jdm I have some questions:
|
Background information: SpiderMonkey (the JavaScript engine) exposes a user-specifiable callback executing JS that throws an exception that is not caught. At the moment, the
rust-mozjslibrary (which wraps the C-basedmozjsaka SpiderMonkey) sets this callback to a simple function that logs the exception to the terminal. We want to replace this in Servo with a method that implements the error reporting specification for web browsers as described below.Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#runtime-script-errors
ErrorEvent interface: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent
OnError algorithm: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#the-event-handler-processing-algorithm
This will require fixing an
XXXjdmcomment inset_event_handler_uncompiled, too, and implementing a new SpiderMonkey error reporter that invokes the actual ErrorEvent dispatch to the window/worker.