<?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>56607</bug_id>
          
          <creation_ts>2011-03-17 16:01:13 -0700</creation_ts>
          <short_desc>RequestAnimationFrame callbacks prevent Document from being released on detach</short_desc>
          <delta_ts>2011-03-17 17:02:33 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Zhenyao Mo">zmo</reporter>
          <assigned_to name="Zhenyao Mo">zmo</assigned_to>
          <cc>abarth</cc>
    
    <cc>jamesr</cc>
    
    <cc>kbr</cc>
    
    <cc>vangelis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>369368</commentid>
    <comment_count>0</comment_count>
    <who name="Zhenyao Mo">zmo</who>
    <bug_when>2011-03-17 16:01:13 -0700</bug_when>
    <thetext>This is also reported in crbug: http://code.google.com/p/chromium/issues/detail?id=74636

After a discussion with Adam, it seems like using ActiveDOMObject for RequestAnimationFrameCallback is the proper way, however, delete callbacks on Document::detach also fixes this memory holding.

Let&apos;s get the quick/simple fix in now and merge back to chrome M10 and M11, then we can do the proper ActiveDOMObject thing on the top of the tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369372</commentid>
    <comment_count>1</comment_count>
      <attachid>86107</attachid>
    <who name="Zhenyao Mo">zmo</who>
    <bug_when>2011-03-17 16:04:48 -0700</bug_when>
    <thetext>Created attachment 86107
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369379</commentid>
    <comment_count>2</comment_count>
      <attachid>86107</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-17 16:14:15 -0700</bug_when>
    <thetext>Comment on attachment 86107
Patch

Can you add a FIXME comment to both these locations saying that we should consider using ActiveDOMObject in the future?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369381</commentid>
    <comment_count>3</comment_count>
    <who name="Zhenyao Mo">zmo</who>
    <bug_when>2011-03-17 16:15:24 -0700</bug_when>
    <thetext>Will do upon landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369389</commentid>
    <comment_count>4</comment_count>
    <who name="Zhenyao Mo">zmo</who>
    <bug_when>2011-03-17 16:26:52 -0700</bug_when>
    <thetext>Committed r81407: &lt;http://trac.webkit.org/changeset/81407&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369397</commentid>
    <comment_count>5</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-17 16:39:01 -0700</bug_when>
    <thetext>As a nit, I personally like .clear() instead of = 0 to null out an OwnPtr&lt;&gt;&apos;s reference.

As for ActiveDOMObject you are all welcome to debate ap@ on that point but I&apos;m not inclined to jump on that grenade again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369416</commentid>
    <comment_count>6</comment_count>
    <who name="Zhenyao Mo">zmo</who>
    <bug_when>2011-03-17 17:02:33 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; As a nit, I personally like .clear() instead of = 0 to null out an OwnPtr&lt;&gt;&apos;s reference.
&gt; 
&gt; As for ActiveDOMObject you are all welcome to debate ap@ on that point but I&apos;m not inclined to jump on that grenade again.

Feel free to change it, and thanks for the warning of the grenade.  :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>86107</attachid>
            <date>2011-03-17 16:04:48 -0700</date>
            <delta_ts>2011-03-17 16:14:15 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-56607-20110317160446.patch</filename>
            <type>text/plain</type>
            <size>1558</size>
            <attacher name="Zhenyao Mo">zmo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDgxMzk4KQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTQgQEAKKzIwMTEtMDMtMTcgIFpoZW55YW8g
TW8gIDx6bW9AZ29vZ2xlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMh
KS4KKworICAgICAgICBSZXF1ZXN0QW5pbWF0aW9uRnJhbWUgY2FsbGJhY2tzIHByZXZlbnQgRG9j
dW1lbnQgZnJvbSBiZWluZyByZWxlYXNlZCBvbiBkZXRhY2gKKyAgICAgICAgaHR0cHM6Ly9idWdz
LndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTU2NjA3CisKKyAgICAgICAgKiBkb20vRG9jdW1l
bnQuY3BwOgorICAgICAgICAoV2ViQ29yZTo6RG9jdW1lbnQ6OnJlbW92ZWRMYXN0UmVmKTogUmVt
b3ZlIFJlcXVlc3RBbmltYXRpb25GcmFtZUNhbGxiYWNrIGRhdGEuCisgICAgICAgIChXZWJDb3Jl
OjpEb2N1bWVudDo6ZGV0YWNoKTogRGl0dG8uCisKIDIwMTEtMDMtMTcgIEplZmYgTWlsbGVyICA8
amVmZm1AYXBwbGUuY29tPgog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PSByZW5kZXJlcigpOwogCiAgICAgLy8g
U2VuZCBvdXQgZG9jdW1lbnRXaWxsQmVjb21lSW5hY3RpdmUoKSBub3RpZmljYXRpb25zIHRvIHJl
Z2lzdGVyZWQgZWxlbWVudHMsCg==
</data>
<flag name="review"
          id="78337"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>