<?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>144546</bug_id>
          
          <creation_ts>2015-05-03 07:43:25 -0700</creation_ts>
          <short_desc>Web Inspector: Exception under ContentViewContainer _disassociateFromContentView</short_desc>
          <delta_ts>2015-05-03 18:07:47 -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>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>jonowells</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1091213</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-05-03 07:43:25 -0700</bug_when>
    <thetext>_disassociateFromContentView is being passed a BackForwardEntry instead of a ContentView in one case. There is also an associated logic error.

I think this was masked by the fact that _disassociateFromContentView wouldn&apos;t call closed() if the representedObject was null on the passed object. Since BackForwardEntry doesn&apos;t have a representedObject, it would always abort early. This would lead to memory leaks too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091214</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-05-03 07:43:41 -0700</bug_when>
    <thetext>&lt;rdar://problem/20793755&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091215</commentid>
    <comment_count>2</comment_count>
      <attachid>252268</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-05-03 07:46:00 -0700</bug_when>
    <thetext>Created attachment 252268
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091262</commentid>
    <comment_count>3</comment_count>
      <attachid>252268</attachid>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-05-03 15:10:13 -0700</bug_when>
    <thetext>Comment on attachment 252268
Patch

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

r=me

&gt; Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:182
&gt; +                this._disassociateFromContentView(removedEntries[i].contentView);

Would be prudent to add a type test for the method&apos;s parameter. (The method name is really clear, but this still slipped up.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091274</commentid>
    <comment_count>4</comment_count>
      <attachid>252268</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-05-03 15:56:27 -0700</bug_when>
    <thetext>Comment on attachment 252268
Patch

Clearing flags on attachment: 252268

Committed r183733: &lt;http://trac.webkit.org/changeset/183733&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091275</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-05-03 15:56:31 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091304</commentid>
    <comment_count>6</comment_count>
      <attachid>252268</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-05-03 18:07:47 -0700</bug_when>
    <thetext>Comment on attachment 252268
Patch

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

&gt;&gt; Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:182
&gt;&gt; +                this._disassociateFromContentView(removedEntries[i].contentView);
&gt; 
&gt; Would be prudent to add a type test for the method&apos;s parameter. (The method name is really clear, but this still slipped up.)

I think this happened during refactoring when you added BackForwardEntry into the mix instead of dealing with ContentViews directly. It was just masked by an early return that I recently removed.

But yes, an assert for the type would normally be good.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>252268</attachid>
            <date>2015-05-03 07:46:00 -0700</date>
            <delta_ts>2015-05-03 15:56:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-144546-20150503074447.patch</filename>
            <type>text/plain</type>
            <size>2256</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTgzNzI1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViSW5zcGVj
dG9yVUkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwppbmRleCAy
OGU0YWUxN2U0MTJlNDI3OTA2OWZhMzRhOGY4MDAzZmIyNWJkNTY3Li5iYzQwYjIwMDdlMWNjZDc4
ZDc3ZGY2NjlmNTJkMzk0NTRiZTA3OTQ3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViSW5zcGVjdG9y
VUkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNiBAQAorMjAxNS0wNS0wMyAgVGltb3RoeSBIYXRjaGVyICA8dGltb3RoeUBhcHBsZS5j
b20+CisKKyAgICAgICAgV2ViIEluc3BlY3RvcjogRXhjZXB0aW9uIHVuZGVyIENvbnRlbnRWa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AgaWYgKHNob3VsZERpc3NvY2lhdGVDb250ZW50VmlldykKLSAgICAgICAgICAg
ICAgICB0aGlzLl9kaXNhc3NvY2lhdGVGcm9tQ29udGVudFZpZXcocmVtb3ZlZEVudHJpZXNbaV0p
OworICAgICAgICAgICAgICAgIHRoaXMuX2Rpc2Fzc29jaWF0ZUZyb21Db250ZW50VmlldyhyZW1v
dmVkRW50cmllc1tpXS5jb250ZW50Vmlldyk7CiAgICAgICAgIH0KIAogICAgICAgICAvLyBBc3Nv
Y2lhdGUgd2l0aCB0aGUgbmV3IGNvbnRlbnQgdmlldy4K
</data>

          </attachment>
      

    </bug>

</bugzilla>