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

Unified Diff: Source/WebCore/dom/ContainerNode.cpp

Issue 9375043: Merge 106972 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 10 months 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
« no previous file with comments | « LayoutTests/fast/dom/remove-body-during-body-replacement2-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/ContainerNode.cpp
===================================================================
--- Source/WebCore/dom/ContainerNode.cpp (revision 107340)
+++ Source/WebCore/dom/ContainerNode.cpp (working copy)
@@ -116,6 +116,8 @@
// If it is, it can be deleted as a side effect of sending mutation events.
ASSERT(refCount() || parentOrHostNode());
+ RefPtr<Node> protect(this);
+
ec = 0;
// insertBefore(node, 0) is equivalent to appendChild(node)
@@ -261,6 +263,8 @@
// If it is, it can be deleted as a side effect of sending mutation events.
ASSERT(refCount() || parentOrHostNode());
+ RefPtr<Node> protect(this);
+
ec = 0;
if (oldChild == newChild) // nothing to do
@@ -427,6 +431,8 @@
// If it is, it can be deleted as a side effect of sending mutation events.
ASSERT(refCount() || parentOrHostNode());
+ RefPtr<Node> protect(this);
+
ec = 0;
// NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
@@ -605,7 +611,7 @@
bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec, bool shouldLazyAttach)
{
- RefPtr<ContainerNode> protector(this);
+ RefPtr<ContainerNode> protect(this);
// Check that this node is not "floating".
// If it is, it can be deleted as a side effect of sending mutation events.
« no previous file with comments | « LayoutTests/fast/dom/remove-body-during-body-replacement2-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698