Title: [114435] branches/safari-534.57-branch/Source/WebCore
- Revision
- 114435
- Author
- lforsch...@apple.com
- Date
- 2012-04-17 14:43:56 -0700 (Tue, 17 Apr 2012)
Log Message
Merged r110139.
Modified Paths
Diff
Modified: branches/safari-534.57-branch/Source/WebCore/ChangeLog (114434 => 114435)
--- branches/safari-534.57-branch/Source/WebCore/ChangeLog 2012-04-17 21:41:17 UTC (rev 114434)
+++ branches/safari-534.57-branch/Source/WebCore/ChangeLog 2012-04-17 21:43:56 UTC (rev 114435)
@@ -1,3 +1,21 @@
+2012-04-16 Lucas Forschler <lforsch...@apple.com>
+
+ Merge 110139
+
+ 2012-03-07 Adam Barth <aba...@webkit.org>
+
+ ContainerNode::willRemove uses a weak iteration pattern
+ https://bugs.webkit.org/show_bug.cgi?id=80530
+
+ Reviewed by Ryosuke Niwa.
+
+ This patch moves ContainerNode::willRemove to using a better iteration
+ pattern in which we collect all the nodes we're planning to iterate
+ into a vector and then iterate over them.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::willRemove):
+
2012-04-17 Lucas Forschler <lforsch...@apple.com>
Merging to the correct branch.
Modified: branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp (114434 => 114435)
--- branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp 2012-04-17 21:41:17 UTC (rev 114434)
+++ branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp 2012-04-17 21:43:56 UTC (rev 114435)
@@ -368,11 +368,14 @@
{
RefPtr<Node> protect(this);
- for (RefPtr<Node> child = firstChild(); child; child = child->nextSibling()) {
- if (child->parentNode() != this) // Check for child being removed from subtree while removing.
- break;
- child->willRemove();
+ NodeVector children;
+ collectNodes(this, children);
+ for (size_t i = 0; i < children.size(); ++i) {
+ if (children[i]->parentNode() != this) // Check for child being removed from subtree while removing.
+ continue;
+ children[i]->willRemove();
}
+
Node::willRemove();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes