Index: Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp |
index f42f49f4232a23a15a6111713127fb6fe0680579..ca664be8e0917f94630d2d405bf61a6929e3e5dd 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp |
@@ -43,7 +43,10 @@ const char* ServiceWorkerGlobalScopeClient::supplementName() |
ServiceWorkerGlobalScopeClient* ServiceWorkerGlobalScopeClient::from(ExecutionContext* context) |
{ |
- return static_cast<ServiceWorkerGlobalScopeClient*>(WillBeHeapSupplement<WorkerClients>::from(toWorkerGlobalScope(context)->clients(), supplementName())); |
+ ASSERT(context->isWorkerGlobalScope()); |
haraken
2015/06/07 23:37:11
You can remove this. This check is already done in
sof
2015/06/08 08:18:16
Removed (here&elsewhere.)
|
+ WorkerClients* clients = toWorkerGlobalScope(context)->clients(); |
+ ASSERT(clients); |
kinuko
2015/06/08 04:36:59
Should these rather return nullptr here if we allo
sof
2015/06/08 08:18:16
But ServiceWorkerGlobalScopeClient isn't exposed t
|
+ return static_cast<ServiceWorkerGlobalScopeClient*>(WillBeHeapSupplement<WorkerClients>::from(clients, supplementName())); |
} |
void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients* clients, PassOwnPtrWillBeRawPtr<ServiceWorkerGlobalScopeClient> client) |