Index: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp |
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp |
index efc696f2a2721380b85f538ecfab83a5333a8eaa..29f1480cd9d153c1d275c2580d9d33a0d10f6d62 100644 |
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp |
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp |
@@ -47,19 +47,18 @@ |
#include "core/workers/WorkerInspectorProxy.h" |
#include "core/workers/WorkerThreadStartupData.h" |
#include "wtf/WTF.h" |
-#include <memory> |
namespace blink { |
namespace { |
-void processUnhandledExceptionOnWorkerGlobalScope(const String& errorMessage, std::unique_ptr<SourceLocation> location, ExecutionContext* scriptContext) |
+void processUnhandledExceptionOnWorkerGlobalScope(const String& errorMessage, PassOwnPtr<SourceLocation> location, ExecutionContext* scriptContext) |
{ |
WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext); |
globalScope->exceptionUnhandled(errorMessage, std::move(location)); |
} |
-void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels, InProcessWorkerObjectProxy* workerObjectProxy, ExecutionContext* scriptContext) |
+void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePortChannelArray> channels, InProcessWorkerObjectProxy* workerObjectProxy, ExecutionContext* scriptContext) |
{ |
WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext); |
MessagePortArray* ports = MessagePort::entanglePorts(*scriptContext, std::move(channels)); |
@@ -118,7 +117,7 @@ void InProcessWorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL |
DCHECK(csp); |
WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(document); |
- std::unique_ptr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(scriptURL, userAgent, sourceCode, nullptr, startMode, csp->headers().get(), starterOrigin, m_workerClients.release(), document->addressSpace(), OriginTrialContext::getTokens(document).get()); |
+ OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(scriptURL, userAgent, sourceCode, nullptr, startMode, csp->headers().get(), starterOrigin, m_workerClients.release(), document->addressSpace(), OriginTrialContext::getTokens(document).get()); |
double originTime = document->loader() ? document->loader()->timing().referenceMonotonicTime() : monotonicallyIncreasingTime(); |
m_loaderProxy = WorkerLoaderProxy::create(this); |
@@ -128,7 +127,7 @@ void InProcessWorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL |
m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); |
} |
-void InProcessWorkerMessagingProxy::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels) |
+void InProcessWorkerMessagingProxy::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePortChannelArray> channels) |
{ |
DCHECK(isParentContextThread()); |
if (!m_workerObject || m_askedToTerminate) |
@@ -138,7 +137,7 @@ void InProcessWorkerMessagingProxy::postMessageToWorkerObject(PassRefPtr<Seriali |
m_workerObject->dispatchEvent(MessageEvent::create(ports, message)); |
} |
-void InProcessWorkerMessagingProxy::postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels) |
+void InProcessWorkerMessagingProxy::postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePortChannelArray> channels) |
{ |
DCHECK(isParentContextThread()); |
if (m_askedToTerminate) |
@@ -169,7 +168,7 @@ void InProcessWorkerMessagingProxy::postTaskToLoader(std::unique_ptr<ExecutionCo |
getExecutionContext()->postTask(BLINK_FROM_HERE, std::move(task)); |
} |
-void InProcessWorkerMessagingProxy::reportException(const String& errorMessage, std::unique_ptr<SourceLocation> location) |
+void InProcessWorkerMessagingProxy::reportException(const String& errorMessage, PassOwnPtr<SourceLocation> location) |
{ |
DCHECK(isParentContextThread()); |
if (!m_workerObject) |
@@ -186,7 +185,7 @@ void InProcessWorkerMessagingProxy::reportException(const String& errorMessage, |
postTaskToWorkerGlobalScope(createCrossThreadTask(&processUnhandledExceptionOnWorkerGlobalScope, errorMessage, passed(std::move(location)))); |
} |
-void InProcessWorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLevel level, const String& message, std::unique_ptr<SourceLocation> location) |
+void InProcessWorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLevel level, const String& message, PassOwnPtr<SourceLocation> location) |
{ |
DCHECK(isParentContextThread()); |
if (m_askedToTerminate) |