| 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 158e3e8d680ef1455eb9343f2c7ba4697a7529db..5b1b636398e6f2b8b0ffa092a1460e891e1a47f9 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;
|
| @@ -529,7 +530,7 @@ Document::~Document()
|
| SelectorQueryCache& Document::selectorQueryCache()
|
| {
|
| if (!m_selectorQueryCache)
|
| - m_selectorQueryCache = adoptPtr(new SelectorQueryCache());
|
| + m_selectorQueryCache = wrapUnique(new SelectorQueryCache());
|
| return *m_selectorQueryCache;
|
| }
|
|
|
| @@ -2891,7 +2892,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);
|
| @@ -3949,12 +3950,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));
|
| @@ -4384,7 +4385,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);
|
| }
|
| @@ -4585,7 +4586,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);
|
| }
|
|
|