Changeset 195727 in webkit


Ignore:
Timestamp:
Jan 27, 2016 8:42:36 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION(r190430): Assertion failure in Text::~Text()
https://bugs.webkit.org/show_bug.cgi?id=153577

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by destroyRenderTreeIfNeeded exiting early on all HTMLSlotElement as it lacks a render object.
Fixed it by explicitly avoiding the early return when child is a HTMLSlotElement.

Test: fast/shadow-dom/slot-removal-crash-2.html

  • dom/ContainerNode.cpp:

(WebCore::destroyRenderTreeIfNeeded):

LayoutTests:

Added a regression test. The test hits an assertion in debug build without the fix.

  • fast/shadow-dom/slot-removal-crash-2-expected.txt: Added.
  • fast/shadow-dom/slot-removal-crash-2.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195724 r195727  
     12016-01-27  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r190430): Assertion failure in Text::~Text()
     4        https://bugs.webkit.org/show_bug.cgi?id=153577
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Added a regression test. The test hits an assertion in debug build without the fix.
     9
     10        * fast/shadow-dom/slot-removal-crash-2-expected.txt: Added.
     11        * fast/shadow-dom/slot-removal-crash-2.html: Added.
     12
    1132016-01-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r195724 r195727  
     12016-01-27  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r190430): Assertion failure in Text::~Text()
     4        https://bugs.webkit.org/show_bug.cgi?id=153577
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The bug was caused by destroyRenderTreeIfNeeded exiting early on all HTMLSlotElement as it lacks a render object.
     9        Fixed it by explicitly avoiding the early return when child is a HTMLSlotElement.
     10
     11        Test: fast/shadow-dom/slot-removal-crash-2.html
     12
     13        * dom/ContainerNode.cpp:
     14        (WebCore::destroyRenderTreeIfNeeded):
     15
    1162016-01-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
    217
  • trunk/Source/WebCore/dom/ContainerNode.cpp

    r194691 r195727  
    3636#include "HTMLFormControlsCollection.h"
    3737#include "HTMLOptionsCollection.h"
     38#include "HTMLSlotElement.h"
    3839#include "HTMLTableRowsCollection.h"
    3940#include "InlineTextBox.h"
     
    100101{
    101102    // FIXME: Get rid of the named flow test.
    102     if (!child.renderer() && !child.isNamedFlowContentNode())
     103    if (!child.renderer() && !child.isNamedFlowContentNode() && !is<HTMLSlotElement>(child))
    103104        return;
    104105    if (is<Element>(child))
Note: See TracChangeset for help on using the changeset viewer.