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(); |