Index: Source/modules/filesystem/LocalFileSystem.cpp |
diff --git a/Source/modules/filesystem/LocalFileSystem.cpp b/Source/modules/filesystem/LocalFileSystem.cpp |
index 010f9e42af69b7395e6ae28ad77dbb5e741e9928..5661c9bdf90be67f6443de29f79b850beeab25d3 100644 |
--- a/Source/modules/filesystem/LocalFileSystem.cpp |
+++ b/Source/modules/filesystem/LocalFileSystem.cpp |
@@ -204,11 +204,12 @@ const char* LocalFileSystem::supplementName() |
LocalFileSystem* LocalFileSystem::from(ExecutionContext& context) |
{ |
- if (context.isDocument()) { |
+ if (context.isDocument()) |
return static_cast<LocalFileSystem*>(WillBeHeapSupplement<LocalFrame>::from(toDocument(context).frame(), supplementName())); |
- } |
- ASSERT(context.isWorkerGlobalScope()); |
- return static_cast<LocalFileSystem*>(WillBeHeapSupplement<WorkerClients>::from(toWorkerGlobalScope(context).clients(), supplementName())); |
+ |
+ WorkerClients* clients = toWorkerGlobalScope(context).clients(); |
+ ASSERT(clients); |
+ return static_cast<LocalFileSystem*>(WillBeHeapSupplement<WorkerClients>::from(clients, supplementName())); |
} |
void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> client) |