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

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

Issue 2433773006: Remove ExecutionContext::activeDOMObjectsAreStopped()
Patch Set: Created 4 years, 2 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/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));
}

Powered by Google App Engine
This is Rietveld 408576698