Use WeakPtr for first-letter memory management
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Oct 2017 21:24:56 +0000 (21:24 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Oct 2017 21:24:56 +0000 (21:24 +0000)
commit2b52746d3b8a71695a05808fb5958237249318f4
tree853ff722e6723b437ecd8d0bf7b1a707645f9200
parente77e274b993245ec647cbbecff3a2a9182b8a994
Use WeakPtr for first-letter memory management
https://bugs.webkit.org/show_bug.cgi?id=177716

Reviewed by Darin Adler.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::destroyLeftoverChildren):

    Remove first-letter special case.
    Use removeAndDestroyChild instead of calling destroy() directly. The latter should
    eventually stop calling takeChild and assert that the renderer is not in the tree.

* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::willBeDestroyed):
(WebCore::RenderTextFragment::setText):
* rendering/RenderTextFragment.h:

    Use WeakPtr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderTextFragment.cpp
Source/WebCore/rendering/RenderTextFragment.h