Index: Source/web/LocalFileSystemClient.cpp |
diff --git a/Source/web/LocalFileSystemClient.cpp b/Source/web/LocalFileSystemClient.cpp |
index 3280435a5089ebbea7db674f5bae5f87b8d25d6d..ccf07207046b2295f9f78ff04f470ad6710d4058 100644 |
--- a/Source/web/LocalFileSystemClient.cpp |
+++ b/Source/web/LocalFileSystemClient.cpp |
@@ -54,13 +54,14 @@ LocalFileSystemClient::~LocalFileSystemClient() |
bool LocalFileSystemClient::allowFileSystem(ExecutionContext* context) |
{ |
+ ASSERT(context); |
if (context->isDocument()) { |
Document* document = toDocument(context); |
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); |
return !webFrame->permissionClient() || webFrame->permissionClient()->allowFileSystem(webFrame); |
} |
ASSERT(context->isWorkerGlobalScope()); |
- return WorkerPermissionClient::from(toWorkerGlobalScope(context))->allowFileSystem(); |
+ return WorkerPermissionClient::from(*toWorkerGlobalScope(context))->allowFileSystem(); |
} |
LocalFileSystemClient::LocalFileSystemClient() |