<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>96702</bug_id>
          
          <creation_ts>2012-09-13 15:40:55 -0700</creation_ts>
          <short_desc>Should have a DOMCriticalSection RAII class which forbids event dispatch, etc. while on the stack</short_desc>
          <delta_ts>2012-09-14 13:48:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>96706</dependson>
    
    <dependson>96717</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>dglazkov</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>720039</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-09-13 15:40:55 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>720083</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-09-13 16:13:24 -0700</bug_when>
    <thetext>forbidEventDispatch is something like that, but probably doesn&apos;t cover all the cases you&apos;d like to cover.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721063</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-09-14 13:03:23 -0700</bug_when>
    <thetext>A good idea, although I&apos;m not a big fan of &quot;DOMCriticalSection&quot; name. Besides event dispatch, what forbidden code do you have in mind for these sections?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721099</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-09-14 13:48:20 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; A good idea, although I&apos;m not a big fan of &quot;DOMCriticalSection&quot; name. Besides event dispatch, what forbidden code do you have in mind for these sections?

*WidgetHierarchyUpdates is a good candidate.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>