Crash in WebCore::SVGElement::removedFromDocument
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 23:54:40 +0000 (23:54 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 23:54:40 +0000 (23:54 +0000)
commit2b5ec68f160cb1c34a306ee5b169f65ae09df0e3
tree4d11697decb7b0847f9e922602188d0b07e37c85
parent1711d48189bd36062832657ea26e00309aec1569
Crash in WebCore::SVGElement::removedFromDocument
https://bugs.webkit.org/show_bug.cgi?id=77270

Reviewed by Adam Barth.

Source/WebCore:

Add a protector before calling NodeRemovalDispatcher::dispatch since
NodeRemovalDispatcher::dispatch may remove the last RefPtr to this node.

Test: fast/dom/Range/surround-contents-font-face-crash.svg

* dom/ContainerNodeAlgorithms.h:
(WebCore::Private::addChildNodesToDeletionQueue):

LayoutTests:

Add a regression test for the crash.

* fast/dom/Range/surround-contents-font-face-crash-expected.txt: Added.
* fast/dom/Range/surround-contents-font-face-crash.svg: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Range/surround-contents-font-face-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Range/surround-contents-font-face-crash.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.h