Chromium Code Reviews| Index: Source/modules/serviceworkers/ServiceWorker.cpp |
| diff --git a/Source/modules/serviceworkers/ServiceWorker.cpp b/Source/modules/serviceworkers/ServiceWorker.cpp |
| index c944cdff485c6e1a8aa7b955fba7c318f80c372d..abc05d27ede16de02d11fa71d3c98e37299ebcfe 100644 |
| --- a/Source/modules/serviceworkers/ServiceWorker.cpp |
| +++ b/Source/modules/serviceworkers/ServiceWorker.cpp |
| @@ -101,13 +101,12 @@ String ServiceWorker::state() const |
| } |
| } |
| -PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* executionContext, WebServiceWorker* worker) |
| +ServiceWorker* ServiceWorker::from(ExecutionContext* executionContext, WebServiceWorker* worker) |
| { |
| if (!worker) |
|
sof
2015/08/14 06:17:55
nit: this null check is redundant.
peria
2015/08/14 07:36:14
Done.
|
| return nullptr; |
| - RefPtrWillBeRawPtr<ServiceWorker> serviceWorker = getOrCreate(executionContext, worker); |
| - return serviceWorker.release(); |
| + return getOrCreate(executionContext, worker); |
| } |
| bool ServiceWorker::hasPendingActivity() const |
| @@ -124,7 +123,7 @@ void ServiceWorker::stop() |
| m_wasStopped = true; |
| } |
| -PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::getOrCreate(ExecutionContext* executionContext, WebServiceWorker* outerWorker) |
| +ServiceWorker* ServiceWorker::getOrCreate(ExecutionContext* executionContext, WebServiceWorker* outerWorker) |
| { |
| if (!outerWorker) |
| return nullptr; |
| @@ -135,9 +134,9 @@ PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::getOrCreate(ExecutionContex |
| return existingServiceWorker; |
| } |
| - RefPtrWillBeRawPtr<ServiceWorker> worker = adoptRefWillBeNoop(new ServiceWorker(executionContext, adoptPtr(outerWorker))); |
| + ServiceWorker* worker = new ServiceWorker(executionContext, adoptPtr(outerWorker)); |
| worker->suspendIfNeeded(); |
| - return worker.release(); |
| + return worker; |
| } |
| ServiceWorker::ServiceWorker(ExecutionContext* executionContext, PassOwnPtr<WebServiceWorker> worker) |