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

Adele adele at opensource.apple.com
Thu Nov 17 15:17:02 PST 2005


adele       05/11/17 15:17:01

  Modified:    .        ChangeLog
               khtml/html html_formimpl.cpp
  Log:
          Reviewed by Beth.
  
          - fix for <rdar://problem/4347856> Safari crash after browsing Fandango.
  
          When removeFormElement is getting called in a destructor, there may not be a document.
          So we don't need to worry about cleaning up the radio buttons in this case, not only to
          avoid the crash, but also because the document's destructor will clean that up.
  
          * khtml/html/html_formimpl.cpp:
          (DOM::HTMLFormElementImpl::removeFormElement): Added nil check for document.
  
  Revision  Changes    Path
  1.379     +13 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.378
  retrieving revision 1.379
  diff -u -r1.378 -r1.379
  --- ChangeLog	17 Nov 2005 22:29:09 -0000	1.378
  +++ ChangeLog	17 Nov 2005 23:16:58 -0000	1.379
  @@ -1,3 +1,16 @@
  +2005-11-17  Adele Peterson  <adele at apple.com>
  +
  +        Reviewed by Beth.
  +
  +        - fix for <rdar://problem/4347856> Safari crash after browsing Fandango.
  +
  +        When removeFormElement is getting called in a destructor, there may not be a document.
  +        So we don't need to worry about cleaning up the radio buttons in this case, not only to
  +        avoid the crash, but also because the document's destructor will clean that up.
  +
  +        * khtml/html/html_formimpl.cpp: 
  +        (DOM::HTMLFormElementImpl::removeFormElement): Added nil check for document.
  +
   2005-11-17  David Hyatt  <hyatt at apple.com>
   
   	Add support for getting a style property off of a DOMAttr.  This is an API that allows
  
  
  
  1.204     +1 -1      WebCore/khtml/html/html_formimpl.cpp
  
  Index: html_formimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
  retrieving revision 1.203
  retrieving revision 1.204
  diff -u -r1.203 -r1.204
  --- html_formimpl.cpp	11 Nov 2005 02:15:35 -0000	1.203
  +++ html_formimpl.cpp	17 Nov 2005 23:17:00 -0000	1.204
  @@ -740,7 +740,7 @@
   
   void HTMLFormElementImpl::removeFormElement(HTMLGenericFormElementImpl *e)
   {
  -    if (!e->name().isEmpty()) {
  +    if (!e->name().isEmpty() && getDocument()) {
           HTMLGenericFormElementImpl* currentCheckedRadio = getDocument()->checkedRadioButtonForGroup(e->name().impl(), this);
           if (currentCheckedRadio == e)
               getDocument()->removeRadioButtonGroup(e->name().impl(), this);
  
  
  



More information about the webkit-changes mailing list