<?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>17199</bug_id>
          
          <creation_ts>2008-02-06 13:34:58 -0800</creation_ts>
          <short_desc>ElementRareDataMap should use OwnPtr to avoid any possible leaks</short_desc>
          <delta_ts>2014-01-13 21:56:59 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>aroben</cc>
    
    <cc>mjs</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69603</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-02-06 13:34:58 -0800</bug_when>
    <thetext>ElementRareDataMap should use OwnPtr to avoid any possible leaks

Assuming this is safe,
typedef HashMap&lt;const Element*, ElementRareData*&gt; ElementRareDataMap;

Should be changed to:
typedef HashMap&lt;const Element*, OwnPtr&lt;ElementRareData&gt;&gt; ElementRareDataMap;

To avoid any possible leaks.  Holding new&apos;d objects in raw pointers is dangerous.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69604</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-02-06 13:42:58 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; ElementRareDataMap should use OwnPtr to avoid any possible leaks
&gt; 
&gt; Assuming this is safe,
&gt; typedef HashMap&lt;const Element*, ElementRareData*&gt; ElementRareDataMap;
&gt; 
&gt; Should be changed to:
&gt; typedef HashMap&lt;const Element*, OwnPtr&lt;ElementRareData&gt;&gt; ElementRareDataMap;

I&apos;m not sure this is possible, since OwnPtr isn&apos;t copyable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69608</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-02-06 14:07:38 -0800</bug_when>
    <thetext>Yeah, I tried.  OwnPtr isn&apos;t copyable, thus this didn&apos;t work.  There has to be a solution here though.  Maybe auto_ptr?  There should be construct we can use to do this safely, and make it *very obvious* when reading the code that the memory management is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>967662</commentid>
    <comment_count>3</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2014-01-13 21:56:59 -0800</bug_when>
    <thetext>We no longer store rare data in a side table.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>