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

Unified Diff: Source/modules/quota/StorageQuotaClient.cpp

Issue 319053003: [Quota] Disable requestQuota operation on non-Document context (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/quota/StorageQuotaClient.cpp
diff --git a/Source/modules/quota/StorageQuotaClient.cpp b/Source/modules/quota/StorageQuotaClient.cpp
index 475be84d55d66f6261443cdba53abe7e0db124ee..bc178cd2ff801b3dfe296cee2a27e9c4d1758045 100644
--- a/Source/modules/quota/StorageQuotaClient.cpp
+++ b/Source/modules/quota/StorageQuotaClient.cpp
@@ -43,6 +43,8 @@ const char* StorageQuotaClient::supplementName()
StorageQuotaClient* StorageQuotaClient::from(ExecutionContext* context)
{
+ if (!context->isDocument())
+ return 0;
return static_cast<StorageQuotaClient*>(WillBeHeapSupplement<Page>::from(toDocument(context)->page(), supplementName()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698