breautek commented on code in PR #1951:
URL: https://github.com/apache/cordova-android/pull/1951#discussion_r3390618664
##########
framework/src/org/apache/cordova/engine/SystemWebChromeClient.java:
##########
@@ -173,6 +160,7 @@ public void onExceededDatabaseQuota(String url, String
databaseIdentifier, long
long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
{
LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d
currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota,
totalUsedQuota);
+ long MAX_QUOTA = 100 * 1024 * 1024;
quotaUpdater.updateQuota(MAX_QUOTA);
Review Comment:
> Why is 100 MB the max quota?
That part is obviously subjective.
> What will happen if this function is called again, after 100 MB was set?
This on the on exceed hook, which means the user has already exceeded the
previously set quota, whatever what that might have been. I think the default
is ~5 megabytes, but that's a webview implementation detail that's not
documented.
If the user exceeds the quota and the quota is not expandable then they'll
hit the standard
[QuotaExceededError](https://developer.mozilla.org/en-US/docs/Web/API/QuotaExceededError).
Also worth noting that this whole system is deprecated and apparently no
longer used since API 19 (according to
https://developer.android.com/reference/android/webkit/WebChromeClient#onExceededDatabaseQuota(java.lang.String,%20java.lang.String,%20long,%20long,%20long,%20android.webkit.WebStorage.QuotaUpdater))
and the HTML5 quota system is used instead. So I probably wouldn't fret over
this -- perhaps we can remove the hook and leave the implementation as default
in our next major.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]