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

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

Issue 212123005: Quota: Add null check (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 | Source/modules/quota/StorageQuota.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/quota/DeprecatedStorageQuota.cpp
diff --git a/Source/modules/quota/DeprecatedStorageQuota.cpp b/Source/modules/quota/DeprecatedStorageQuota.cpp
index cb55c3c6af70eeaf7f700b7b361856ee4a922486..6bbdea7499937a3d5e9dc69e9f1cafdac147c98e 100644
--- a/Source/modules/quota/DeprecatedStorageQuota.cpp
+++ b/Source/modules/quota/DeprecatedStorageQuota.cpp
@@ -85,7 +85,13 @@ void DeprecatedStorageQuota::requestQuota(ExecutionContext* executionContext, un
return;
}
- StorageQuotaClient::from(executionContext)->requestQuota(executionContext, storageType, newQuotaInBytes, successCallback, errorCallback);
+ StorageQuotaClient* client = StorageQuotaClient::from(executionContext);
+ if (!client) {
+ executionContext->postTask(StorageErrorCallback::CallbackTask::create(errorCallback, NotSupportedError));
+ return;
+ }
+
+ client->requestQuota(executionContext, storageType, newQuotaInBytes, successCallback, errorCallback);
}
DeprecatedStorageQuota::~DeprecatedStorageQuota()
« no previous file with comments | « no previous file | Source/modules/quota/StorageQuota.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698