| Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
|
| index 1073dbc2cab68e2b01822a5d313e1ecc33734b40..1752e275432888111066f83f4194dffd3f009461 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
|
| @@ -16,10 +16,10 @@
|
| #include "modules/serviceworkers/ServiceWorkerWindowClientCallback.h"
|
| #include "public/platform/modules/serviceworker/WebServiceWorkerClientQueryOptions.h"
|
| #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
|
| -#include "wtf/PtrUtil.h"
|
| #include "wtf/RefPtr.h"
|
| #include "wtf/Vector.h"
|
| #include <memory>
|
| +#include <utility>
|
|
|
| namespace blink {
|
|
|
| @@ -68,10 +68,8 @@ class GetCallback : public WebServiceWorkerClientCallbacks {
|
|
|
| void onSuccess(
|
| std::unique_ptr<WebServiceWorkerClientInfo> webClient) override {
|
| - std::unique_ptr<WebServiceWorkerClientInfo> client =
|
| - wrapUnique(webClient.release());
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + std::unique_ptr<WebServiceWorkerClientInfo> client = std::move(webClient);
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| if (!client) {
|
| // Resolve the promise with undefined.
|
| @@ -83,8 +81,7 @@ class GetCallback : public WebServiceWorkerClientCallbacks {
|
| }
|
|
|
| void onError(const WebServiceWorkerError& error) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| m_resolver->reject(ServiceWorkerError::take(m_resolver.get(), error));
|
| }
|
|
|