WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
198133
Set default WebsiteDataStore storage quota based on StorageQuotaManager
https://bugs.webkit.org/show_bug.cgi?id=198133
Summary
Set default WebsiteDataStore storage quota based on StorageQuotaManager
youenn fablet
Reported
2019-05-22 10:56:26 PDT
Set default WebsiteDataStore storage quota based on StorageQuotaManager
Attachments
Patch
(1.83 KB, patch)
2019-05-22 10:59 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(6.21 KB, patch)
2019-05-22 16:23 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-05-22 10:57:27 PDT
<
rdar://problem/51031436
>
youenn fablet
Comment 2
2019-05-22 10:59:27 PDT
Created
attachment 370422
[details]
Patch
Geoffrey Garen
Comment 3
2019-05-22 11:18:06 PDT
Can you add a test case? Seems like an API test could detect whether a permission delegate message was sent or not. Or you could use an html test case, with WebKitTestRunner configured to log or fail when sent the permission delegate message.
youenn fablet
Comment 4
2019-05-22 14:09:53 PDT
(In reply to Geoffrey Garen from
comment #3
)
> Can you add a test case? Seems like an API test could detect whether a > permission delegate message was sent or not. Or you could use an html test > case, with WebKitTestRunner configured to log or fail when sent the > permission delegate message.
WebKitTestRunner is being used to test the WebsiteDataStore delegate. The UIDelegate delegate is tested through API tests in StorageQuota.mm. In both cases, we do not rely on the default quota value and set it to a lower value (400ko). We can add another test in StorageQuota.mm which would use the default quota value. This would require to write 1GB on disk to hit the limit and trigger the delegate. This seems a bit expensive to me but can write the test. wdyt?
Geoffrey Garen
Comment 5
2019-05-22 15:12:02 PDT
> We can add another test in StorageQuota.mm which would use the default quota > value.
Sounds good.
> This would require to write 1GB on disk to hit the limit and trigger the > delegate. > This seems a bit expensive to me but can write the test. wdyt?
Hmmm... As a regression test, it would be sufficient just to verify that 50MB + 1b did not trigger the delegate. Of course, 1GB is an even more valuable test. Here's a suggestion: Let's do a 1GB test (and make sure to delete afterwards!) if the test can run in less than 1s, and otherwise do a 50MB + 1b test. How does that sound?
youenn fablet
Comment 6
2019-05-22 16:23:20 PDT
Created
attachment 370464
[details]
Patch
youenn fablet
Comment 7
2019-05-22 16:24:52 PDT
> Hmmm... As a regression test, it would be sufficient just to verify that > 50MB + 1b did not trigger the delegate. Of course, 1GB is an even more > valuable test. Here's a suggestion: Let's do a 1GB test (and make sure to > delete afterwards!) if the test can run in less than 1s, and otherwise do a > 50MB + 1b test. How does that sound?
I tried the 1GB and we are far from 1s, maybe we should try to optimize. Anyway, I added a test that stores 100MB without hitting the delegate.
EWS Watchlist
Comment 8
2019-05-22 16:25:20 PDT
Attachment 370464
[details]
did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:45: Alphabetical sorting problem. [build/include_order] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:189: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:212: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 3 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 9
2019-05-23 10:26:04 PDT
Comment on
attachment 370464
[details]
Patch r=me
WebKit Commit Bot
Comment 10
2019-05-23 11:08:12 PDT
Comment on
attachment 370464
[details]
Patch Clearing flags on attachment: 370464 Committed
r245698
: <
https://trac.webkit.org/changeset/245698
>
WebKit Commit Bot
Comment 11
2019-05-23 11:08:14 PDT
All reviewed patches have been landed. Closing bug.
Valerii
Comment 12
2020-02-17 12:23:38 PST
Can anyone confirm that by applying this change the default 50Mb cacheStorage limit has been bumped to 1Gb?
youenn fablet
Comment 13
2020-02-17 12:28:05 PST
(In reply to Valerii from
comment #12
)
> Can anyone confirm that by applying this change the default 50Mb > cacheStorage limit has been bumped to 1Gb?
This is the default now for WebKit. Some WebKit applications can change this value, see for instance WKWebsiteDataStoreConfigurationSetPerOriginStorageQuota.
Valerii
Comment 14
2020-02-17 13:08:14 PST
Anyway I can figure out whether iOS Safari is one of those applications changing the value or does it rely on default?
youenn fablet
Comment 15
2020-02-17 13:16:34 PST
(In reply to Valerii from
comment #14
)
> Anyway I can figure out whether iOS Safari is one of those applications > changing the value or does it rely on default?
Nowadays, there is a unified quota for IDB and Cache. After a given threshold, user will be prompted to allow more storage or not. I believe the current threshold is indeed 1GB for MobileSafari 13. You can test this using something like
https://demo.agektmr.com/storage
.
Valerii
Comment 16
2020-02-17 13:27:41 PST
Thanks a lot for the information provided! I unfortunately was not able to find that information in any documentation I searched.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug