Changeset 63393 in webkit


Ignore:
Timestamp:
Jul 14, 2010 7:40:22 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-14 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

HTMLTreeBuilder shouldn't crash during fast/parser/remove-parser-current-node.html
https://bugs.webkit.org/show_bug.cgi?id=42312

We were crashing because of an ASSERT I added to the attach logic in
the HTMLConstructionSite. I knew this ASSERT was wrong when I added
it, I just wanted to make sure we had test coverage of those cases.
Turns out we do! :)

  • html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): (WebCore::HTMLConstructionSite::attachAtSite):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63389 r63393  
     12010-07-14  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        HTMLTreeBuilder shouldn't crash during fast/parser/remove-parser-current-node.html
     6        https://bugs.webkit.org/show_bug.cgi?id=42312
     7
     8        We were crashing because of an ASSERT I added to the attach logic in
     9        the HTMLConstructionSite.  I knew this ASSERT was wrong when I added
     10        it, I just wanted to make sure we had test coverage of those cases.
     11        Turns out we do!  :)
     12
     13        * html/HTMLConstructionSite.cpp:
     14        (WebCore::HTMLConstructionSite::attach):
     15        (WebCore::HTMLConstructionSite::attachAtSite):
     16
    1172010-07-14  Victor Wang  <victorw@chromium.org>
    218
  • trunk/WebCore/html/HTMLConstructionSite.cpp

    r63386 r63393  
    102102    // for elements), however, we'll get to use this ref in the stack of
    103103    // open elements.
    104     ASSERT(parent->attached());
    105     ASSERT(!child->attached());
    106     child->attach();
     104    if (parent->attached()) {
     105        ASSERT(!child->attached());
     106        child->attach();
     107    }
    107108    return child.release();
    108109}
     
    117118        site.parent->insertBefore(child, site.nextChild, ec);
    118119        ASSERT(!ec);
    119         ASSERT(site.parent->attached());
    120         if (!child->attached())
     120        if (site.parent->attached() && !child->attached())
    121121            child->attach();
    122122        return;
     
    126126    // here to call attach().  We should investigate whether we can rely on
    127127    // |site.parent| to hold a ref at this point.
    128     ASSERT(site.parent->attached());
    129     if (!child->attached())
     128    if (site.parent->attached() && !child->attached())
    130129        child->attach();
    131130}
Note: See TracChangeset for help on using the changeset viewer.