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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 212d353a15db86993d98e6d39140a9c352b1789c..9fc5886c2acef31281dde655c4feeca57445cec5 100644
--- a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
+++ b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
@@ -36,8 +36,6 @@
#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 {
@@ -527,9 +525,9 @@ void SelectorDataList::execute(ContainerNode& rootNode, typename SelectorQueryTr
findTraverseRootsAndExecute<SelectorQueryTrait>(rootNode, output);
}
-std::unique_ptr<SelectorQuery> SelectorQuery::adopt(CSSSelectorList selectorList)
+PassOwnPtr<SelectorQuery> SelectorQuery::adopt(CSSSelectorList selectorList)
{
- return wrapUnique(new SelectorQuery(std::move(selectorList)));
+ return adoptPtr(new SelectorQuery(std::move(selectorList)));
}
SelectorQuery::SelectorQuery(CSSSelectorList selectorList)
@@ -560,7 +558,7 @@ Element* SelectorQuery::queryFirst(ContainerNode& rootNode) const
SelectorQuery* SelectorQueryCache::add(const AtomicString& selectors, const Document& document, ExceptionState& exceptionState)
{
- HashMap<AtomicString, std::unique_ptr<SelectorQuery>>::iterator it = m_entries.find(selectors);
+ HashMap<AtomicString, OwnPtr<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