From e96383b0a0aded8fc5e7702bb0fb606dd2b6b31b Mon Sep 17 00:00:00 2001 From: harrison Date: Tue, 7 Feb 2006 01:15:34 +0000 Subject: [PATCH] Suggested by Darin. * 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 | 8 ++++++++ WebCore/khtml/html/HTMLElementImpl.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 95b2ff621bd6..081597363dac 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,11 @@ +2006-02-06 David Harrison + + Suggested by Darin. + + * khtml/html/HTMLElementImpl.cpp: + (WebCore::HTMLElementImpl::createContextualFragment): + - make nextChild a RefPtr to survive possible DOM changes + 2006-02-06 Beth Dakin Reviewed by John and Adele diff --git a/WebCore/khtml/html/HTMLElementImpl.cpp b/WebCore/khtml/html/HTMLElementImpl.cpp index 1bbcf34265fb..ecc9f9b39ab0 100644 --- a/WebCore/khtml/html/HTMLElementImpl.cpp +++ b/WebCore/khtml/html/HTMLElementImpl.cpp @@ -274,7 +274,7 @@ DocumentFragmentImpl *HTMLElementImpl::createContextualFragment(const DOMString NodeImpl *firstChild = node->firstChild(); if (firstChild) nextNode = firstChild; - NodeImpl *nextChild; + RefPtr nextChild; for (RefPtr child = firstChild; child; child = nextChild) { nextChild = child->nextSibling(); node->removeChild(child.get(), ignoredExceptionCode); -- 2.36.0