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

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

Issue 49613005: Have TreeScrope::adoptIfNeeded() take a reference instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « Source/core/dom/Document.cpp ('k') | Source/core/dom/TreeScope.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 93bbb1d44e4e377325d4ba0dd3f1231f3e09b329..dcc525a5e8b869143f617ac65f55e063a2d58e35 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1931,7 +1931,7 @@ PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& es)
setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), NotInSynchronizationOfLazyAttribute);
attrNode->attachToElement(this);
- treeScope().adoptIfNeeded(attrNode);
+ treeScope().adoptIfNeeded(*attrNode);
ensureAttrNodeListForElement(this).append(attrNode);
return oldAttrNode.release();
@@ -3062,7 +3062,7 @@ PassRefPtr<Attr> Element::ensureAttr(const QualifiedName& name)
RefPtr<Attr> attrNode = findAttrNodeInList(attrNodeList, name);
if (!attrNode) {
attrNode = Attr::create(*this, name);
- treeScope().adoptIfNeeded(attrNode.get());
+ treeScope().adoptIfNeeded(*attrNode);
attrNodeList.append(attrNode);
}
return attrNode.release();
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/TreeScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698