Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 1555653002: Handle some failing DocumentOrderedMap ID lookups across tree removals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index 1e2fe05deb8fd395510513ca71914d9918336852..13c682ff9ff5507d0b4d3c182d5ef9c0b495334f 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -586,7 +586,9 @@ PassRefPtrWillBeRawPtr<Node> ContainerNode::removeChild(PassRefPtrWillBeRawPtr<N
{
HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
-
+#if ENABLE(ASSERT)
+ TreeScope::RemoveScope treeRemoveScope(this);
esprehn 2016/01/05 07:48:33 DocumentOrderedMap::RemoveScope
+#endif
Node* prev = child->previousSibling();
Node* next = child->nextSibling();
removeBetween(prev, next, *child);
@@ -638,6 +640,9 @@ void ContainerNode::parserRemoveChild(Node& oldChild)
oldChild.notifyMutationObserversNodeWillDetach();
HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
+#if ENABLE(ASSERT)
+ TreeScope::RemoveScope treeRemoveScope(this);
esprehn 2016/01/05 07:48:33 no need to pass anything if you just increment the
+#endif
Node* prev = oldChild.previousSibling();
Node* next = oldChild.nextSibling();
removeBetween(prev, next, oldChild);
@@ -685,7 +690,9 @@ void ContainerNode::removeChildren(SubtreeModificationAction action)
#endif
{
HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
-
+#if ENABLE(ASSERT)
+ TreeScope::RemoveScope treeRemoveScope(this);
+#endif
{
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;

Powered by Google App Engine
This is Rietveld 408576698