[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:46:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9906bb9e06f93b8daccecdc8fe74c4b550adc390
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 11 15:24:44 2003 +0000

            Reviewed by Ken.
    
            - fixed 3300220 -- repro crash in closeURL when choosing from popup menus on www.drivewire.com
    
            * khtml/xml/dom_nodeimpl.cpp:
            (NodeImpl::dispatchGenericEvent): Removed unused local variable. Since we update all documents,
            there was no longer any need to keep that pointer around, but we still had this obsolete code.
            This had nothing to do with the bug, just a related cleanup.
            (NodeImpl::dispatchWindowEvent): Add check for nil. We ref the document pointer, but we don't
            ref the document itself. So we do need to check for the case where the document went away.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 3f3c6c4..e13cf3a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-07-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3300220 -- repro crash in closeURL when choosing from popup menus on www.drivewire.com
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::dispatchGenericEvent): Removed unused local variable. Since we update all documents,
+        there was no longer any need to keep that pointer around, but we still had this obsolete code.
+        This had nothing to do with the bug, just a related cleanup.
+        (NodeImpl::dispatchWindowEvent): Add check for nil. We ref the document pointer, but we don't
+        ref the document itself. So we do need to check for the case where the document went away.
+
 2003-07-10  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 3f3c6c4..e13cf3a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-07-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3300220 -- repro crash in closeURL when choosing from popup menus on www.drivewire.com
+
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeImpl::dispatchGenericEvent): Removed unused local variable. Since we update all documents,
+        there was no longer any need to keep that pointer around, but we still had this obsolete code.
+        This had nothing to do with the bug, just a related cleanup.
+        (NodeImpl::dispatchWindowEvent): Add check for nil. We ref the document pointer, but we don't
+        ref the document itself. So we do need to check for the case where the document went away.
+
 2003-07-10  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/khtml/xml/dom_nodeimpl.cpp b/WebCore/khtml/xml/dom_nodeimpl.cpp
index fd428ae..055f745 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.cpp
+++ b/WebCore/khtml/xml/dom_nodeimpl.cpp
@@ -569,17 +569,12 @@ bool NodeImpl::dispatchGenericEvent( EventImpl *evt, int &/*exceptioncode */)
         else if (evt->id() == EventImpl::KHTML_DBLCLICK_EVENT)
             dispatchUIEvent(EventImpl::DOMACTIVATE_EVENT, 2);
 
-    // copy this over into a local variable, as the following deref() calls might cause this to be deleted.
-    DocumentPtr *doc = document;
-    doc->ref();
-
     // deref all nodes in chain
     it.toFirst();
     for (; it.current(); ++it)
         it.current()->deref(); // this may delete us
 
     DocumentImpl::updateDocumentsRendering();
-    doc->deref();
 
     return !evt->defaultPrevented(); // ### what if defaultPrevented was called before dispatchEvent?
 }
@@ -603,7 +598,7 @@ bool NodeImpl::dispatchWindowEvent(int _id, bool canBubbleArg, bool cancelableAr
     DocumentPtr *doc = document;
     doc->ref();
     bool r = dispatchGenericEvent( evt, exceptioncode );
-    if (!evt->defaultPrevented())
+    if (!evt->defaultPrevented() && doc->document())
 	doc->document()->defaultEventHandler(evt);
     doc->deref();
     evt->deref();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list