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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/DocumentParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index fffbbe526ee46d68cdeb867b5656af2c9ed94a06..0e123a4bd445c26378da5f43e2689b6c21d2a9c0 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -238,6 +238,7 @@
#include "wtf/TemporaryChange.h"
#include "wtf/text/StringBuffer.h"
#include "wtf/text/TextEncodingRegistry.h"
+#include <memory>
using namespace WTF;
using namespace Unicode;
@@ -520,7 +521,7 @@ Document::~Document()
SelectorQueryCache& Document::selectorQueryCache()
{
if (!m_selectorQueryCache)
- m_selectorQueryCache = adoptPtr(new SelectorQueryCache());
+ m_selectorQueryCache = wrapUnique(new SelectorQueryCache());
return *m_selectorQueryCache;
}
@@ -2887,7 +2888,7 @@ EventTarget* Document::errorEventTarget()
return domWindow();
}
-void Document::logExceptionToConsole(const String& errorMessage, PassOwnPtr<SourceLocation> location)
+void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation> location)
{
ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, std::move(location));
addConsoleMessage(consoleMessage);
@@ -3940,12 +3941,12 @@ Document::EventFactorySet& Document::eventFactories()
const OriginAccessEntry& Document::accessEntryFromURL()
{
if (!m_accessEntryFromURL) {
- m_accessEntryFromURL = adoptPtr(new OriginAccessEntry(url().protocol(), url().host(), OriginAccessEntry::AllowRegisterableDomains));
+ m_accessEntryFromURL = wrapUnique(new OriginAccessEntry(url().protocol(), url().host(), OriginAccessEntry::AllowRegisterableDomains));
}
return *m_accessEntryFromURL;
}
-void Document::registerEventFactory(PassOwnPtr<EventFactoryBase> eventFactory)
+void Document::registerEventFactory(std::unique_ptr<EventFactoryBase> eventFactory)
{
DCHECK(!eventFactories().contains(eventFactory.get()));
eventFactories().add(std::move(eventFactory));
@@ -4377,7 +4378,7 @@ void Document::setEncodingData(const DocumentEncodingData& newData)
&& m_titleElement->textContent().containsOnlyLatin1()) {
CString originalBytes = m_titleElement->textContent().latin1();
- OwnPtr<TextCodec> codec = newTextCodec(newData.encoding());
+ std::unique_ptr<TextCodec> codec = newTextCodec(newData.encoding());
String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalBytes.length(), DataEOF);
m_titleElement->setTextContent(correctlyDecodedTitle);
}
@@ -4593,7 +4594,7 @@ void Document::popCurrentScript()
m_currentScriptStack.removeLast();
}
-void Document::setTransformSource(PassOwnPtr<TransformSource> source)
+void Document::setTransformSource(std::unique_ptr<TransformSource> source)
{
m_transformSource = std::move(source);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/DocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698