[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 11:12:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9e24c12f2b1cdf75c46e8a7c4d287b1a3ba31476
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 02:40:22 2010 +0000

    2010-07-14  Adam Barth  <abarth at 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):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63393 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 168c566..3d3db7d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-14  Adam Barth  <abarth at 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):
+
 2010-07-14  Victor Wang  <victorw at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/html/HTMLConstructionSite.cpp b/WebCore/html/HTMLConstructionSite.cpp
index 754c118..11dea00 100644
--- a/WebCore/html/HTMLConstructionSite.cpp
+++ b/WebCore/html/HTMLConstructionSite.cpp
@@ -101,9 +101,10 @@ PassRefPtr<ChildType> HTMLConstructionSite::attach(Node* parent, PassRefPtr<Chil
     // |parent| to hold a ref at this point.  In the common case (at least
     // for elements), however, we'll get to use this ref in the stack of
     // open elements.
-    ASSERT(parent->attached());
-    ASSERT(!child->attached());
-    child->attach();
+    if (parent->attached()) {
+        ASSERT(!child->attached());
+        child->attach();
+    }
     return child.release();
 }
 
@@ -116,8 +117,7 @@ void HTMLConstructionSite::attachAtSite(const AttachmentSite& site, PassRefPtr<N
         ExceptionCode ec = 0;
         site.parent->insertBefore(child, site.nextChild, ec);
         ASSERT(!ec);
-        ASSERT(site.parent->attached());
-        if (!child->attached())
+        if (site.parent->attached() && !child->attached())
             child->attach();
         return;
     }
@@ -125,8 +125,7 @@ void HTMLConstructionSite::attachAtSite(const AttachmentSite& site, PassRefPtr<N
     // It's slightly unfortunate that we need to hold a reference to child
     // here to call attach().  We should investigate whether we can rely on
     // |site.parent| to hold a ref at this point.
-    ASSERT(site.parent->attached());
-    if (!child->attached())
+    if (site.parent->attached() && !child->attached())
         child->attach();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list