Title: [154613] trunk/Source/WebCore
Revision
154613
Author
[email protected]
Date
2013-08-26 10:45:59 -0700 (Mon, 26 Aug 2013)

Log Message

REGRESSION (r154581): Some plugin tests failing in debug bots
https://bugs.webkit.org/show_bug.cgi?id=120315

Reviewed by Darin Adler.
        
We are hitting the new no-event-dispatch-while-iterating assertion.

Detaching deletes a plugin which modifies DOM while it dies.

* dom/Document.cpp:
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
        
    Don't iterate at all. Document never has more than one Element child anyway.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154612 => 154613)


--- trunk/Source/WebCore/ChangeLog	2013-08-26 17:43:09 UTC (rev 154612)
+++ trunk/Source/WebCore/ChangeLog	2013-08-26 17:45:59 UTC (rev 154613)
@@ -1,3 +1,20 @@
+2013-08-26  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r154581): Some plugin tests failing in debug bots
+        https://bugs.webkit.org/show_bug.cgi?id=120315
+
+        Reviewed by Darin Adler.
+        
+        We are hitting the new no-event-dispatch-while-iterating assertion.
+
+        Detaching deletes a plugin which modifies DOM while it dies.
+
+        * dom/Document.cpp:
+        (WebCore::Document::createRenderTree):
+        (WebCore::Document::detach):
+        
+            Don't iterate at all. Document never has more than one Element child anyway.
+
 2013-08-26  David Kilzer  <[email protected]>
 
         BUILD FIX (r154580): RenderObject::document() returns a reference

Modified: trunk/Source/WebCore/dom/Document.cpp (154612 => 154613)


--- trunk/Source/WebCore/dom/Document.cpp	2013-08-26 17:43:09 UTC (rev 154612)
+++ trunk/Source/WebCore/dom/Document.cpp	2013-08-26 17:45:59 UTC (rev 154613)
@@ -1979,8 +1979,8 @@
 
     recalcStyle(Style::Force);
 
-    for (auto child = elementDescendants(this).begin(), end = elementDescendants(this).end(); child != end; ++child)
-        Style::attachRenderTree(&*child);
+    if (m_documentElement)
+        Style::attachRenderTree(m_documentElement.get());
 
     setAttached(true);
 }
@@ -2079,8 +2079,8 @@
 
     TemporaryChange<bool> change(m_renderTreeBeingDestroyed, true);
 
-    for (auto child = elementDescendants(this).begin(), end = elementDescendants(this).end(); child != end; ++child)
-        Style::detachRenderTree(&*child);
+    if (m_documentElement)
+        Style::detachRenderTree(m_documentElement.get());
 
     clearChildNeedsStyleRecalc();
     setAttached(false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to