Index: Source/modules/quota/StorageQuota.cpp |
diff --git a/Source/modules/quota/StorageQuota.cpp b/Source/modules/quota/StorageQuota.cpp |
index 7c98ac84b65119b10483d08ae4fdeaa2fd11cf38..2907adf684c02dc62bb6af53ae1eefb576d15c92 100644 |
--- a/Source/modules/quota/StorageQuota.cpp |
+++ b/Source/modules/quota/StorageQuota.cpp |
@@ -99,6 +99,19 @@ ScriptPromise StorageQuota::queryInfo(ScriptState* scriptState, String type) |
return promise; |
} |
+ScriptPromise StorageQuota::requestDurability(ScriptState* scriptState) |
+{ |
+ StorageQuotaClient* client = StorageQuotaClient::from(scriptState->executionContext()); |
+ if (!client) { |
+ RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
+ ScriptPromise promise = resolver->promise(); |
+ resolver->reject(DOMError::create(NotSupportedError)); |
+ return promise; |
+ } |
+ |
+ return client->requestDurability(scriptState); |
+} |
+ |
ScriptPromise StorageQuota::requestPersistentQuota(ScriptState* scriptState, unsigned long long newQuota) |
{ |
StorageQuotaClient* client = StorageQuotaClient::from(scriptState->executionContext()); |