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

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

Issue 319453002: [oilpan]: get rid of some trivial RefPtr's to node. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 42a91511de6ab95d5464e240c9d2c30ba8dc0ce9..16fc8bbcc342218fdf62f180eb325aa58ee22ec4 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -87,7 +87,7 @@ void ContainerNode::removeDetachedChildren()
void ContainerNode::parserTakeAllChildrenFrom(ContainerNode& oldParent)
{
- while (RefPtr<Node> child = oldParent.firstChild()) {
+ while (RefPtrWillBeRawPtr<Node> child = oldParent.firstChild()) {
oldParent.parserRemoveChild(*child);
treeScope().adoptIfNeeded(*child);
parserAppendChild(child.get());
@@ -184,7 +184,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce
ASSERT(refCount() || parentOrShadowHostNode());
#endif
- RefPtr<Node> protect(this);
+ RefPtrWillBeRawPtr<Node> protect(this);
// insertBefore(node, 0) is equivalent to appendChild(node)
if (!refChild) {
@@ -206,7 +206,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce
if (refChild->previousSibling() == newChild || refChild == newChild) // nothing to do
return;
- RefPtr<Node> next = refChild;
+ RefPtrWillBeRawPtr<Node> next = refChild;
NodeVector targets;
collectChildrenAndRemoveFromOldParent(*newChild, targets, exceptionState);
@@ -303,7 +303,7 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
ASSERT(refCount() || parentOrShadowHostNode());
#endif
- RefPtr<Node> protect(this);
+ RefPtrWillBeRawPtr<Node> protect(this);
if (oldChild == newChild) // nothing to do
return;
@@ -325,10 +325,11 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
ChildListMutationScope mutation(*this);
- RefPtr<Node> next = oldChild->nextSibling();
+ RefPtrWillBeRawPtr<Node> next = oldChild->nextSibling();
// Remove the node we're replacing
- RefPtr<Node> removedChild = oldChild;
+ RefPtrWillBeRawPtr<Node> protectRemovedChild = oldChild;
+ ASSERT_UNUSED(protectRemovedChild, protectRemovedChild);
removeChild(oldChild, exceptionState);
if (exceptionState.hadException())
return;
@@ -429,7 +430,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& exceptionState)
ASSERT(refCount() || parentOrShadowHostNode());
#endif
- RefPtr<Node> protect(this);
+ RefPtrWillBeRawPtr<Node> protect(this);
// NotFoundError: Raised if oldChild is not a child of this node.
// FIXME: We should never really get PseudoElements in here, but editing will sometimes
@@ -440,7 +441,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& exceptionState)
return;
}
- RefPtr<Node> child = oldChild;
+ RefPtrWillBeRawPtr<Node> child = oldChild;
document().removeFocusedElementOfSubtree(child.get());
@@ -526,7 +527,7 @@ void ContainerNode::removeChildren()
return;
// The container node can be removed from event handlers.
- RefPtr<ContainerNode> protect(this);
+ RefPtrWillBeRawPtr<ContainerNode> protect(this);
if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document()))
fullscreen->removeFullScreenElementOfSubtree(this, true);
@@ -574,7 +575,7 @@ void ContainerNode::removeChildren()
void ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionState& exceptionState)
{
- RefPtr<ContainerNode> protect(this);
+ RefPtrWillBeRawPtr<ContainerNode> protect(this);
#if !ENABLE(OILPAN)
// Check that this node is not "floating".
@@ -663,8 +664,8 @@ void ContainerNode::notifyNodeInserted(Node& root)
InspectorInstrumentation::didInsertDOMNode(&root);
- RefPtr<Node> protect(this);
- RefPtr<Node> protectNode(root);
+ RefPtrWillBeRawPtr<Node> protect(this);
+ RefPtrWillBeRawPtr<Node> protectNode(root);
NodeVector postInsertionNotificationTargets;
notifyNodeInsertedInternal(root, postInsertionNotificationTargets);
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698