Bug 96702 - Should have a DOMCriticalSection RAII class which forbids event dispatch, etc. while on the stack
Summary: Should have a DOMCriticalSection RAII class which forbids event dispatch, etc...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 96706 96717
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 15:40 PDT by Eric Seidel (no email)
Modified: 2012-09-14 13:48 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2012-09-13 15:40:55 PDT
Should have a DOMCriticalSection RAIA which forbids event dispatch, etc. while on the stack

Right now we do this manually, and rather ad-hoc.  We should have some slicker tools for annotating when the DOM is in an inconsistent state and we do not expect JS to run.

This came up again while reviewing bug 93639
Comment 1 Adam Barth 2012-09-13 16:13:24 PDT
forbidEventDispatch is something like that, but probably doesn't cover all the cases you'd like to cover.
Comment 2 Alexey Proskuryakov 2012-09-14 13:03:23 PDT
A good idea, although I'm not a big fan of "DOMCriticalSection" name. Besides event dispatch, what forbidden code do you have in mind for these sections?
Comment 3 Ryosuke Niwa 2012-09-14 13:48:20 PDT
(In reply to comment #2)
> A good idea, although I'm not a big fan of "DOMCriticalSection" name. Besides event dispatch, what forbidden code do you have in mind for these sections?

*WidgetHierarchyUpdates is a good candidate.