<?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>123763</bug_id>
          
          <creation_ts>2013-11-04 16:21:37 -0800</creation_ts>
          <short_desc>FrameView destructor is worried about being retained by a renderer.</short_desc>
          <delta_ts>2013-11-04 17:38:25 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Andreas Kling">kling</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>kling</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>946877</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-11-04 16:21:37 -0800</bug_when>
    <thetext>// FIXME: How could this ever happen when RenderWidget retains the Widget!?

Indeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946878</commentid>
    <comment_count>1</comment_count>
      <attachid>215965</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-11-04 16:22:04 -0800</bug_when>
    <thetext>Created attachment 215965
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946914</commentid>
    <comment_count>2</comment_count>
      <attachid>215965</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-11-04 17:21:54 -0800</bug_when>
    <thetext>Comment on attachment 215965
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215965&amp;action=review

&gt; Source/WebCore/ChangeLog:8
&gt; +        There&apos;s no way we can be in ~FrameView() while also being owned by
&gt; +        a RenderWidget. Remove some overly paranoid code that was making sure
&gt; +        the renderer didn&apos;t have a reference on us.

Could you have put in an assertion or is this so obviously true that an assertion would be a waste?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946915</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-11-04 17:23:26 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 215965 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=215965&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:8
&gt; &gt; +        There&apos;s no way we can be in ~FrameView() while also being owned by
&gt; &gt; +        a RenderWidget. Remove some overly paranoid code that was making sure
&gt; &gt; +        the renderer didn&apos;t have a reference on us.
&gt; 
&gt; Could you have put in an assertion or is this so obviously true that an assertion would be a waste?

I thought about it, and it seemed to me that asserting in ~Foo() that someone&apos;s RefPtr&lt;Foo&gt; isn&apos;t pointing to |this| is overly paranoid. WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946925</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-11-04 17:30:30 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I thought about it, and it seemed to me that asserting in ~Foo() that someone&apos;s RefPtr&lt;Foo&gt; isn&apos;t pointing to |this| is overly paranoid. WDYT?

Yes, and no. Paranoid, yes. But catching overrelease in the destructor might be great instead of having to debug use of the deallocated memory later. I wish every class could have a check like this one. If this would help us debug a case where we someone does an extra deref, then it would be great.

Not really sure how to judge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946928</commentid>
    <comment_count>5</comment_count>
      <attachid>215965</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-11-04 17:31:39 -0800</bug_when>
    <thetext>Comment on attachment 215965
Patch

Clearing flags on attachment: 215965

Committed r158625: &lt;http://trac.webkit.org/changeset/158625&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946929</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-11-04 17:31:40 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946930</commentid>
    <comment_count>7</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-11-04 17:33:28 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; I thought about it, and it seemed to me that asserting in ~Foo() that someone&apos;s RefPtr&lt;Foo&gt; isn&apos;t pointing to |this| is overly paranoid. WDYT?
&gt; 
&gt; Yes, and no. Paranoid, yes. But catching overrelease in the destructor might be great instead of having to debug use of the deallocated memory later. I wish every class could have a check like this one. If this would help us debug a case where we someone does an extra deref, then it would be great.

Doesn&apos;t RefCounted already do something like this with the deletion-has-begun assertions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>946935</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-11-04 17:38:25 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; Doesn&apos;t RefCounted already do something like this with the deletion-has-begun assertions?

Maybe it does!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>215965</attachid>
            <date>2013-11-04 16:22:04 -0800</date>
            <delta_ts>2013-11-04 17:31:39 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-123763.diff</filename>
            <type>text/plain</type>
            <size>1338</size>
            <attacher name="Andreas Kling">kling</attacher>
            
              <data encoding="base64">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