Skip to content

Commit

Permalink
Merge r175528 - RenderQuote shouldn't need a pre-destructor hook.
Browse files Browse the repository at this point in the history
<https://webkit.org/b/138352>

Reviewed by Antti Koivisto.

The willBeDestroyed() hook in RenderQuote came from the time when it was
potential unsafe to access the RenderView from a renderer destructor.

Move the code to the plain ol' destructor instead.

* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed): Deleted.
* rendering/RenderQuote.h:

Canonical link: https://commits.webkit.org/154760.187@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@175946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling authored and carlosgcampos committed Nov 11, 2014
1 parent a5d7263 commit cbfc4d3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
2014-11-04 Andreas Kling <akling@apple.com>

RenderQuote shouldn't need a pre-destructor hook.
<https://webkit.org/b/138352>

Reviewed by Antti Koivisto.

The willBeDestroyed() hook in RenderQuote came from the time when it was
potential unsafe to access the RenderView from a renderer destructor.

Move the code to the plain ol' destructor instead.

* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed): Deleted.
* rendering/RenderQuote.h:

2014-11-03 Philippe Normand <pnormand@igalia.com>

[LEAK] [GStreamer] Removing video element will not free assigned memory
Expand Down
8 changes: 2 additions & 6 deletions Source/WebCore/rendering/RenderQuote.cpp
Expand Up @@ -43,17 +43,13 @@ RenderQuote::RenderQuote(Document& document, PassRef<RenderStyle> style, QuoteTy

RenderQuote::~RenderQuote()
{
detachQuote();

ASSERT(!m_isAttached);
ASSERT(!m_next);
ASSERT(!m_previous);
}

void RenderQuote::willBeDestroyed()
{
detachQuote();
RenderInline::willBeDestroyed();
}

void RenderQuote::willBeRemovedFromTree()
{
RenderInline::willBeRemovedFromTree();
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/rendering/RenderQuote.h
Expand Up @@ -37,7 +37,6 @@ class RenderQuote final : public RenderInline {
private:
void detachQuote();

virtual void willBeDestroyed() override;
virtual const char* renderName() const override { return "RenderQuote"; }
virtual bool isQuote() const override { return true; };
virtual void styleDidChange(StyleDifference, const RenderStyle*) override;
Expand Down

0 comments on commit cbfc4d3

Please sign in to comment.