servo: Dispatch error events when event handler attributes fail to compile.
I’m not currently doing that because of double borrows in html/webappapis/scripting/processing-model-2/runtime-error-in-body-onerror.html.
We should also make sure to pass tests/wpt/web-platform-tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-late.html; I believe that we’ll need to change the timing of compilation for that.
About this issue
- Original URL
- State: open
- Created 10 years ago
- Comments: 20 (17 by maintainers)
Commits related to this issue
- Auto merge of #25249 - pshaughn:throwcompileerror, r=jdm Throwing errors on event compilation, without panics and at least sometimes test-passingly <!-- Please describe your changes on the following... — committed to servo/servo by deleted user 7 years ago
- Auto merge of #25274 - Manishearth:event-handlers-filter, r=<try> Only compile applicable event handler content attributes Part of https://github.com/servo/servo/issues/13152 r? @jdm cc @pshaugn — committed to servo/servo by deleted user 7 years ago
- Auto merge of #25249 - pshaughn:throwcompileerror, r=<try> Throwing errors on event compilation, without panics and at least sometimes test-passingly <!-- Please describe your changes on the followi... — committed to servo/servo by deleted user 7 years ago
The first part of https://github.com/servo/servo/issues/13152#issuecomment-254849922 might describe a problem that no longer exists.
When I change https://github.com/servo/servo/blob/e10cf7adad91a4740a5ba859f4fc33ee59423908/components/script/dom/eventtarget.rs#L532 from false to true and go to a page with the following source:
I see “called f without crashing”, with no double-borrow panic.
When I try the more complicated second example, f fires before g, so there are other matters to consider, but it may be that the double-borrow hazard for nested events has been eliminated by other code changes and it is safe to start throwing event handler attribute compile errors.