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

Unified Diff: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 1983783002: Remove OwnPtr::release() calls in modules/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 7806207dd5f7f003b2a639ea787d4e8cd0a05939..a1e70fb3f7f54cf36e5acd8437fc828fb25c608c 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -249,7 +249,7 @@ void fillWidgetStates(AXObject* axObject, protocol::Array<AXProperty>* propertie
PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXRelatedObjectVector& nodes)
{
OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes, AXValueTypeEnum::NodeList);
- return createProperty(key, nodeListValue.release());
+ return createProperty(key, std::move(nodeListValue));
}
PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject::AXObjectVector& nodes, const QualifiedName& attr, AXObject* axObject)
@@ -257,7 +257,7 @@ PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject
OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes);
const AtomicString& attrValue = axObject->getAttribute(attr);
nodeListValue->setValue(protocol::StringValue::create(attrValue));
- return createProperty(key, nodeListValue.release());
+ return createProperty(key, std::move(nodeListValue));
}
void fillRelationships(AXObject* axObject, protocol::Array<AXProperty>* properties)
@@ -297,7 +297,7 @@ PassOwnPtr<AXValue> createRoleNameValue(AccessibilityRole role)
} else {
roleNameValue = createValue(AXObject::internalRoleName(role), AXValueTypeEnum::InternalRole);
}
- return roleNameValue.release();
+ return roleNameValue;
}
PassOwnPtr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl)
@@ -318,9 +318,9 @@ PassOwnPtr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXO
OwnPtr<protocol::Array<AXProperty>> ignoredReasonProperties = protocol::Array<AXProperty>::create();
for (size_t i = 0; i < ignoredReasons.size(); i++)
ignoredReasonProperties->addItem(createProperty(ignoredReasons[i]));
- ignoredNodeObject->setIgnoredReasons(ignoredReasonProperties.release());
+ ignoredNodeObject->setIgnoredReasons(std::move(ignoredReasonProperties));
- return ignoredNodeObject.release();
+ return ignoredNodeObject;
}
PassOwnPtr<AXNode> buildObjectForNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl, PassOwnPtr<protocol::Array<AXProperty>> properties)
@@ -344,16 +344,16 @@ PassOwnPtr<AXNode> buildObjectForNode(Node* node, AXObject* axObject, AXObjectCa
properties->addItem(createRelatedNodeListProperty(AXRelationshipAttributesEnum::Labelledby, nameSource.relatedObjects));
}
}
- name->setSources(nameSourceProperties.release());
+ name->setSources(std::move(nameSourceProperties));
}
nodeObject->setProperties(std::move(properties));
- nodeObject->setName(name.release());
+ nodeObject->setName(std::move(name));
} else {
nodeObject->setProperties(std::move(properties));
}
fillCoreProperties(axObject, nodeObject.get());
- return nodeObject.release();
+ return nodeObject;
}
} // namespace
@@ -397,7 +397,7 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
fillWidgetStates(axObject, properties.get());
fillRelationships(axObject, properties.get());
- *accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, properties.release());
+ *accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, std::move(properties));
}
DEFINE_TRACE(InspectorAccessibilityAgent)
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698