Index: Source/web/WorkerPermissionClient.cpp |
diff --git a/Source/web/WorkerPermissionClient.cpp b/Source/web/WorkerPermissionClient.cpp |
index 61cefced0692757a2cd684aab1e650f4a0333376..45a169a3639d7124832026694a486bb162130f70 100644 |
--- a/Source/web/WorkerPermissionClient.cpp |
+++ b/Source/web/WorkerPermissionClient.cpp |
@@ -75,9 +75,11 @@ const char* WorkerPermissionClient::supplementName() |
return "WorkerPermissionClient"; |
} |
-WorkerPermissionClient* WorkerPermissionClient::from(ExecutionContext* context) |
+WorkerPermissionClient* WorkerPermissionClient::from(ExecutionContext& context) |
{ |
- return static_cast<WorkerPermissionClient*>(Supplement<WorkerClients>::from(toWorkerGlobalScope(context)->clients(), supplementName())); |
+ WorkerClients* clients = toWorkerGlobalScope(context).clients(); |
+ ASSERT(clients); |
+ return static_cast<WorkerPermissionClient*>(Supplement<WorkerClients>::from(*clients, supplementName())); |
} |
WorkerPermissionClient::WorkerPermissionClient(PassOwnPtr<WebWorkerPermissionClientProxy> proxy) |
@@ -87,7 +89,8 @@ WorkerPermissionClient::WorkerPermissionClient(PassOwnPtr<WebWorkerPermissionCli |
void providePermissionClientToWorker(WorkerClients* clients, PassOwnPtr<WebWorkerPermissionClientProxy> proxy) |
{ |
- WorkerPermissionClient::provideTo(clients, WorkerPermissionClient::supplementName(), WorkerPermissionClient::create(proxy)); |
+ ASSERT(clients); |
+ WorkerPermissionClient::provideTo(*clients, WorkerPermissionClient::supplementName(), WorkerPermissionClient::create(proxy)); |
} |
} // namespace blink |