Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
index 82d10cdfd6cfedacabf2f2b26f8833906ca9f331..de78c5e1d4db0e8c57182c7a2cedebdea058a474 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
@@ -62,12 +62,10 @@ |
#include "public/platform/Platform.h" |
#include "public/platform/WebURL.h" |
#include "wtf/CurrentTime.h" |
-#include "wtf/PtrUtil.h" |
-#include <memory> |
namespace blink { |
-ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create(ServiceWorkerThread* thread, std::unique_ptr<WorkerThreadStartupData> startupData) |
+ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create(ServiceWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData) |
{ |
// Note: startupData is finalized on return. After the relevant parts has been |
// passed along to the created 'context'. |
@@ -81,7 +79,7 @@ ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create(ServiceWorkerThread* |
return context; |
} |
-ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerThread* thread, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* workerClients) |
+ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* workerClients) |
: WorkerGlobalScope(url, userAgent, thread, timeOrigin, std::move(starterOriginPrivilegeData), workerClients) |
, m_didEvaluateScript(false) |
, m_hadErrorInTopLevelEventHandler(false) |
@@ -144,7 +142,7 @@ void ServiceWorkerGlobalScope::setRegistration(std::unique_ptr<WebServiceWorkerR |
{ |
if (!getExecutionContext()) |
return; |
- m_registration = ServiceWorkerRegistration::getOrCreate(getExecutionContext(), wrapUnique(handle.release())); |
+ m_registration = ServiceWorkerRegistration::getOrCreate(getExecutionContext(), adoptPtr(handle.release())); |
} |
bool ServiceWorkerGlobalScope::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptions& options) |
@@ -210,7 +208,7 @@ CachedMetadataHandler* ServiceWorkerGlobalScope::createWorkerScriptCachedMetadat |
return ServiceWorkerScriptCachedMetadataHandler::create(this, scriptURL, metaData); |
} |
-void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation> location) |
+void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, PassOwnPtr<SourceLocation> location) |
{ |
WorkerGlobalScope::logExceptionToConsole(errorMessage, location->clone()); |
ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, std::move(location)); |