| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 365e290fc1a94714532c9ed034b6ea318519f9da..f681ab799f311d89ac3a7dee424d65f1fd1e3661 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1023,8 +1023,8 @@ PassRefPtrWillBeRawPtr<Node> Document::adoptNode(PassRefPtrWillBeRawPtr<Node> so
|
| return nullptr;
|
| case ATTRIBUTE_NODE: {
|
| Attr* attr = toAttr(source.get());
|
| - if (attr->ownerElement())
|
| - attr->ownerElement()->removeAttributeNode(attr, exceptionState);
|
| + if (RefPtrWillBeRawPtr<Element> ownerElement = attr->ownerElement())
|
| + ownerElement->removeAttributeNode(attr, exceptionState);
|
| break;
|
| }
|
| default:
|
|
|