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) |