<?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>24030</bug_id>
          
          <creation_ts>2009-02-19 10:57:42 -0800</creation_ts>
          <short_desc>Amalgamate suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive?</short_desc>
          <delta_ts>2011-01-28 14:26:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dimich</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jorlow</cc>
    
    <cc>mihaip</cc>
    
    <cc>psolanki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110232</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-02-19 10:57:42 -0800</bug_when>
    <thetext>suspendActiveDOMObjects/resumeActiveDOMObjects and documentWillBecomeInactive/documentDidBecomeActive do something very similar. Perhaps they should be one and the same?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>341736</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2011-01-28 14:23:49 -0800</bug_when>
    <thetext>Indeed. Perhaps it makes sense to split ActiveDOMObject into 2 parts - the more generic interface like ScriptExecutionContextObserver (name?) that would receive stop/start/canSuspend/suspend/resume/contextDestroyed, and a PendingActivity object that would have hasPendingActivity (with counter) and optionally register with the list on SEC to keep their wrappers alive.

By splitting observer-like functionality from ActiveDOMObject, we would be able to have observers that don&apos;t have JS wrappers or a notion of pending activity.

Old ActiveDOMObjects would derive from both, while things like HTMLInputElement could only be an observer.

What do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>341739</commentid>
    <comment_count>2</comment_count>
    <who name="Jeremy Orlow">jorlow</who>
    <bug_when>2011-01-28 14:26:49 -0800</bug_when>
    <thetext>For the record, https://bugs.webkit.org/show_bug.cgi?id=53202 has some similar discussion....but yeah, I think that&apos;s probably the right basic concept.

We should probably also add a comment to ActiveDOMObject to make it more clear what it should be used for (and what an &quot;active dom object&quot; really means/implies).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>