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

Unified Diff: Source/modules/filesystem/LocalFileSystem.cpp

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

Powered by Google App Engine
This is Rietveld 408576698