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

Unified Diff: third_party/WebKit/Source/core/dom/SelectorQuery.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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: third_party/WebKit/Source/core/dom/SelectorQuery.cpp
diff --git a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
index 9fc5886c2acef31281dde655c4feeca57445cec5..212d353a15db86993d98e6d39140a9c352b1789c 100644
--- a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
+++ b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
@@ -36,6 +36,8 @@
#include "core/dom/StaticNodeList.h"
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -525,9 +527,9 @@ void SelectorDataList::execute(ContainerNode& rootNode, typename SelectorQueryTr
findTraverseRootsAndExecute<SelectorQueryTrait>(rootNode, output);
}
-PassOwnPtr<SelectorQuery> SelectorQuery::adopt(CSSSelectorList selectorList)
+std::unique_ptr<SelectorQuery> SelectorQuery::adopt(CSSSelectorList selectorList)
{
- return adoptPtr(new SelectorQuery(std::move(selectorList)));
+ return wrapUnique(new SelectorQuery(std::move(selectorList)));
}
SelectorQuery::SelectorQuery(CSSSelectorList selectorList)
@@ -558,7 +560,7 @@ Element* SelectorQuery::queryFirst(ContainerNode& rootNode) const
SelectorQuery* SelectorQueryCache::add(const AtomicString& selectors, const Document& document, ExceptionState& exceptionState)
{
- HashMap<AtomicString, OwnPtr<SelectorQuery>>::iterator it = m_entries.find(selectors);
+ HashMap<AtomicString, std::unique_ptr<SelectorQuery>>::iterator it = m_entries.find(selectors);
if (it != m_entries.end())
return it->value.get();
« no previous file with comments | « third_party/WebKit/Source/core/dom/SelectorQuery.h ('k') | third_party/WebKit/Source/core/dom/SelectorQueryTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698