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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16638</bug_id>
          
          <creation_ts>2012-04-05 06:33:22 +0000</creation_ts>
          <short_desc>Define who owns what with MutationObserver</short_desc>
          <delta_ts>2012-11-09 18:59:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Olli Pettay">bugs</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>adamk</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>rafaelw</cc>
    
    <cc>rniwa</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66428</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-04-05 06:33:22 +0000</bug_when>
    <thetext>Should MutationObserver own the nodes it is observing?
I think not. If JS doesn&apos;t have a pointer to the node, it can&apos;t
modify it.
But if the original observe target is deleted, what should happen
to the transient observers? I think they should still work (until the end of
the microtask). That way GC/CC behavior isn&apos;t visible to the API user.

Then MutationObserver object itself... I think the only way to hide GC/CC
behavior is to keep MutationObserver object alive as long as
the node(s) it is observing is/are alive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66429</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-04-05 06:37:45 +0000</bug_when>
    <thetext>Yes, that makes sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66448</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-04-05 16:46:08 +0000</bug_when>
    <thetext>So MutationObserver has weak references to its nodes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66469</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-04-06 08:07:54 +0000</bug_when>
    <thetext>Yes, and nodes have strong references to the MutationObservers which are
observing them</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78117</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-09 15:10:49 +0000</bug_when>
    <thetext>Is http://dom.spec.whatwg.org/#garbage-collection correct?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78118</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-09 15:11:14 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/tree/eb59b065b161846cd3c35899a926ba7a426e837e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78119</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2012-11-09 15:13:19 +0000</bug_when>
    <thetext>Sounds right to me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78143</commentid>
    <comment_count>7</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-11-09 18:59:57 +0000</bug_when>
    <thetext>Yup, looks ok.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>