Title: [114050] branches/safari-534.57-branch/Source/WebCore
Diff
Modified: branches/safari-534.57-branch/Source/WebCore/ChangeLog (114049 => 114050)
--- branches/safari-534.57-branch/Source/WebCore/ChangeLog 2012-04-13 00:03:22 UTC (rev 114049)
+++ branches/safari-534.57-branch/Source/WebCore/ChangeLog 2012-04-13 00:05:16 UTC (rev 114050)
@@ -1,5 +1,23 @@
2012-04-12 Lucas Forschler <[email protected]>
+ Merge 110139
+
+ 2012-03-07 Adam Barth <[email protected]>
+
+ 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-12 Lucas Forschler <[email protected]>
+
Merge 109480
2012-03-01 Kent Tamura <[email protected]>
Modified: branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp (114049 => 114050)
--- branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp 2012-04-13 00:03:22 UTC (rev 114049)
+++ branches/safari-534.57-branch/Source/WebCore/dom/ContainerNode.cpp 2012-04-13 00:05:16 UTC (rev 114050)
@@ -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
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes