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

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

Issue 1164753004: Tidy up CompositorWorkerManager unit tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: compile fix 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/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)

Powered by Google App Engine
This is Rietveld 408576698