Suggested by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2006 01:15:34 +0000 (01:15 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2006 01:15:34 +0000 (01:15 +0000)
        * khtml/html/HTMLElementImpl.cpp:
        (WebCore::HTMLElementImpl::createContextualFragment):
        - make nextChild a RefPtr to survive possible DOM changes

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/khtml/html/HTMLElementImpl.cpp

index 95b2ff6..0815973 100644 (file)
@@ -1,3 +1,11 @@
+2006-02-06  David Harrison  <harrison@apple.com>
+
+        Suggested by Darin.
+        
+        * khtml/html/HTMLElementImpl.cpp:
+        (WebCore::HTMLElementImpl::createContextualFragment):
+        - make nextChild a RefPtr to survive possible DOM changes
+
 2006-02-06  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by John and Adele
index 1bbcf34..ecc9f9b 100644 (file)
@@ -274,7 +274,7 @@ DocumentFragmentImpl *HTMLElementImpl::createContextualFragment(const DOMString
             NodeImpl *firstChild = node->firstChild();
             if (firstChild)
                 nextNode = firstChild;
-            NodeImpl *nextChild;
+            RefPtr<NodeImpl> nextChild;
             for (RefPtr<NodeImpl> child = firstChild; child; child = nextChild) {
                 nextChild = child->nextSibling();
                 node->removeChild(child.get(), ignoredExceptionCode);