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

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

Issue 313813002: Oilpan: Replace RefPtrs to Node and its subclasses in core/dom/ with Oilpan transtion types. (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
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index f81607e3888e9cbc4097c45d2a157aa6a0920ec6..47e47e7caf4c7ade80fa75f82169c337776714ab 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -465,7 +465,7 @@ Node* Node::pseudoAwareLastChild() const
return lastChild();
}
-void Node::insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
+void Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
{
if (isContainerNode())
toContainerNode(this)->insertBefore(newChild, refChild, exceptionState);
@@ -473,7 +473,7 @@ void Node::insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionStat
exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
}
-void Node::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState)
+void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState)
{
if (isContainerNode())
toContainerNode(this)->replaceChild(newChild, oldChild, exceptionState);
@@ -489,7 +489,7 @@ void Node::removeChild(Node* oldChild, ExceptionState& exceptionState)
exceptionState.throwDOMException(NotFoundError, "This node type does not support this method.");
}
-void Node::appendChild(PassRefPtr<Node> newChild, ExceptionState& exceptionState)
+void Node::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState)
{
if (isContainerNode())
toContainerNode(this)->appendChild(newChild, exceptionState);
@@ -508,7 +508,7 @@ void Node::normalize()
// Go through the subtree beneath us, normalizing all nodes. This means that
// any two adjacent text nodes are merged and any empty text nodes are removed.
- RefPtr<Node> node = this;
+ RefPtrWillBeRawPtr<Node> node = this;
while (Node* firstChild = node->firstChild())
node = firstChild;
while (node) {
@@ -1519,7 +1519,7 @@ void Node::setTextContent(const String& text)
case ATTRIBUTE_NODE:
case DOCUMENT_FRAGMENT_NODE: {
// FIXME: Merge this logic into replaceChildrenWithText.
- RefPtr<ContainerNode> container = toContainerNode(this);
+ RefPtrWillBeRawPtr<ContainerNode> container = toContainerNode(this);
// No need to do anything if the text is identical.
if (container->hasOneTextChild() && toText(container->firstChild())->data() == text)
return;
@@ -2165,7 +2165,7 @@ void Node::unregisterMutationObserver(MutationObserverRegistration* registration
// Deleting the registration may cause this node to be derefed, so we must make sure the Vector operation completes
// before that, in case |this| is destroyed (see MutationObserverRegistration::m_registrationNodeKeepAlive).
// FIXME: Simplify the registration/transient registration logic to make this understandable by humans.
- RefPtr<Node> protect(this);
+ RefPtrWillBeRawPtr<Node> protect(this);
#if ENABLE(OILPAN)
// The explicit dispose() is needed to have the registration
// object unregister itself promptly.

Powered by Google App Engine
This is Rietveld 408576698