[webkit-changes] cvs commit: WebCore/khtml/html html_miscimpl.cpp html_miscimpl.h

Adele adele at opensource.apple.com
Tue Aug 16 17:45:35 PDT 2005


adele       05/08/16 17:45:35

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               khtml/html Tag: Safari-2-0-branch html_miscimpl.cpp
                        html_miscimpl.h
  Log:
          Merged fix from TOT to Safari-2-0-branch
          <rdar://problem/4219015> HTMLCollections leak their info (reproducible on sony.com)
  
      2005-08-15  Maciej Stachowiak  <mjs at apple.com>
  
          Reviewed by John.
  
  	- fixed leak of HTML collection info - this can build up to
  	hundreds of leaks pretty quickly
  
  	http://bugzilla.opendarwin.org/show_bug.cgi?id=4450
  
          * khtml/html/html_miscimpl.cpp:
          (DOM::HTMLCollectionImpl::HTMLCollectionImpl): Initialize new
  	m_ownsInfo member.
          (DOM::HTMLCollectionImpl::~HTMLCollectionImpl): Delete info if
  	owned.
          (DOM::HTMLCollectionImpl::resetCollectionInfo): When creating new
  	info, indicate that it's owned.
          * khtml/html/html_miscimpl.h: Declare new member.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4104.2.119 +23 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4104.2.118
  retrieving revision 1.4104.2.119
  diff -u -r1.4104.2.118 -r1.4104.2.119
  --- ChangeLog	16 Aug 2005 01:42:39 -0000	1.4104.2.118
  +++ ChangeLog	17 Aug 2005 00:45:14 -0000	1.4104.2.119
  @@ -1,3 +1,26 @@
  +2005-08-16  Adele Peterson  <adele at apple.com>
  +
  +        Merged fix from TOT to Safari-2-0-branch
  +        <rdar://problem/4219015> HTMLCollections leak their info (reproducible on sony.com)
  +
  +    2005-08-15  Maciej Stachowiak  <mjs at apple.com>
  +
  +        Reviewed by John.
  +
  +	- fixed leak of HTML collection info - this can build up to
  +	hundreds of leaks pretty quickly
  +
  +	http://bugzilla.opendarwin.org/show_bug.cgi?id=4450
  +	
  +        * khtml/html/html_miscimpl.cpp:
  +        (DOM::HTMLCollectionImpl::HTMLCollectionImpl): Initialize new
  +	m_ownsInfo member.
  +        (DOM::HTMLCollectionImpl::~HTMLCollectionImpl): Delete info if
  +	owned.
  +        (DOM::HTMLCollectionImpl::resetCollectionInfo): When creating new
  +	info, indicate that it's owned.
  +        * khtml/html/html_miscimpl.h: Declare new member.
  +
   2005-08-15  Justin Garcia  <justin.garcia at apple.com>
   
           Reviewed by mjs 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.24.8.1  +4 -0      WebCore/khtml/html/html_miscimpl.cpp
  
  Index: html_miscimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.cpp,v
  retrieving revision 1.24
  retrieving revision 1.24.8.1
  diff -u -r1.24 -r1.24.8.1
  --- html_miscimpl.cpp	26 Jan 2005 00:28:57 -0000	1.24
  +++ html_miscimpl.cpp	17 Aug 2005 00:45:34 -0000	1.24.8.1
  @@ -41,6 +41,8 @@
   
   HTMLBaseFontElementImpl::~HTMLBaseFontElementImpl()
   {
  +    if (m_ownsInfo)
  +        delete info;
   }
   
   NodeImpl::Id HTMLBaseFontElementImpl::id() const
  @@ -56,6 +58,7 @@
       base->ref();
       type = _type;
       idsDone = false;
  +    m_ownsInfo = false;
       info = base->isDocumentNode() && base->getDocument()->isHTMLDocument() ? static_cast<HTMLDocumentImpl*>(base->getDocument())->collectionInfo(type) : 0;
   }
   
  @@ -90,6 +93,7 @@
   
       if (!info) {
           info = new CollectionInfo;
  +        m_ownsInfo = true;
           info->version = docversion;
           return;
       }
  
  
  
  1.15.8.1  +2 -0      WebCore/khtml/html/html_miscimpl.h
  
  Index: html_miscimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.h,v
  retrieving revision 1.15
  retrieving revision 1.15.8.1
  diff -u -r1.15 -r1.15.8.1
  --- html_miscimpl.h	27 Jan 2005 19:24:09 -0000	1.15
  +++ html_miscimpl.h	17 Aug 2005 00:45:34 -0000	1.15.8.1
  @@ -119,6 +119,8 @@
   
       // For nextNamedItem()
       mutable bool idsDone;
  +
  +    mutable bool m_ownsInfo;
   };
   
   // this whole class is just a big hack to find form elements even in
  
  
  



More information about the webkit-changes mailing list