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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp

Issue 1164753004: Tidy up CompositorWorkerManager unit tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 6 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: Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
index 5b917184e0caf8986ab78ef5c9f07df73de66fd0..27481cfdf65ef737a0ca1416e2b7933aad66a055 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
@@ -44,14 +44,9 @@ ServiceWorkerContainerClient* ServiceWorkerContainerClient::from(ExecutionContex
return static_cast<ServiceWorkerContainerClient*>(WillBeHeapSupplement<Document>::from(document, supplementName()));
}
- if (context->isServiceWorkerGlobalScope()) {
- ServiceWorkerContainerClient* client = static_cast<ServiceWorkerContainerClient*>(WillBeHeapSupplement<WorkerClients>::from(toWorkerGlobalScope(context)->clients(), supplementName()));
- ASSERT(client);
- return client;
- }
-
- ASSERT(context->isWorkerGlobalScope());
- return static_cast<ServiceWorkerContainerClient*>(WillBeHeapSupplement<WorkerClients>::from(toWorkerGlobalScope(context)->clients(), supplementName()));
+ WorkerClients* clients = toWorkerGlobalScope(context)->clients();
+ ASSERT(clients);
+ return static_cast<ServiceWorkerContainerClient*>(WillBeHeapSupplement<WorkerClients>::from(clients, supplementName()));
}
ServiceWorkerContainerClient::ServiceWorkerContainerClient(PassOwnPtr<WebServiceWorkerProvider> provider)
« no previous file with comments | « Source/modules/filesystem/LocalFileSystem.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698