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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 1865913005: Nuke WebPassOwnPtr<T> and replace it with std::unique_ptr<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/modules/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index 9044c03682b4404705ce304f669a51713567cd64..f0490d96d5efd72e428b1c0e662cab5ca536fd0e 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -28,25 +28,25 @@ void ServiceWorkerRegistration::dispatchUpdateFoundEvent()
dispatchEvent(Event::create(EventTypeNames::updatefound));
}
-void ServiceWorkerRegistration::setInstalling(WebPassOwnPtr<WebServiceWorker::Handle> handle)
+void ServiceWorkerRegistration::setInstalling(std::unique_ptr<WebServiceWorker::Handle> handle)
{
if (!getExecutionContext())
return;
- m_installing = ServiceWorker::from(getExecutionContext(), handle.release());
+ m_installing = ServiceWorker::from(getExecutionContext(), adoptPtr(handle.release()));
}
-void ServiceWorkerRegistration::setWaiting(WebPassOwnPtr<WebServiceWorker::Handle> handle)
+void ServiceWorkerRegistration::setWaiting(std::unique_ptr<WebServiceWorker::Handle> handle)
{
if (!getExecutionContext())
return;
- m_waiting = ServiceWorker::from(getExecutionContext(), handle.release());
+ m_waiting = ServiceWorker::from(getExecutionContext(), adoptPtr(handle.release()));
}
-void ServiceWorkerRegistration::setActive(WebPassOwnPtr<WebServiceWorker::Handle> handle)
+void ServiceWorkerRegistration::setActive(std::unique_ptr<WebServiceWorker::Handle> handle)
{
if (!getExecutionContext())
return;
- m_active = ServiceWorker::from(getExecutionContext(), handle.release());
+ m_active = ServiceWorker::from(getExecutionContext(), adoptPtr(handle.release()));
}
ServiceWorkerRegistration* ServiceWorkerRegistration::getOrCreate(ExecutionContext* executionContext, PassOwnPtr<WebServiceWorkerRegistration::Handle> handle)

Powered by Google App Engine
This is Rietveld 408576698