[webkit-changes] [WebKit/WebKit] 4590ce: REGRESSION (256863 at main): [ iOS ] imported/w3c/web...
Sihui
noreply at github.com
Mon Jan 30 10:57:27 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4590ce7d98b4a3761aba90e33a04c73fa51c37ca
https://github.com/WebKit/WebKit/commit/4590ce7d98b4a3761aba90e33a04c73fa51c37ca
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-01-30 (Mon, 30 Jan 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
Log Message:
-----------
REGRESSION (256863 at main): [ iOS ] imported/w3c/web-platform-tests/webstorage/storage_local_window_open.window.html is a consistent timeout
https://bugs.webkit.org/show_bug.cgi?id=250922
rdar://104498135
Reviewed by Chris Dumez.
Currently quota check of LocalStorage is performed in both web process (StorageAreaMap) and network process
(SQLiteStorageArea). Web process only sends a setting item request to network process when the local quota check passes.
The issue they calculate usage differently: web process calculates usage based on size of string (WebCore::StorageMap)
and network process uses database file size. Also network process stores upconverted characters in database
(SQLiteStorageArea stores value as blob and SQLiteStatement::bindBlob upconverts characters). The result is web process
may send more requests to network process than it is supposed to.
For example, in the failing test, web process can send about 5000 setItem requests to network process, and network
process will start return error after finishing about 2500 requests. Since 256863 at main, network process will include all
stored items in the request reply when a request fails, so that web process can sync its local cache and two processes
have a consistent view of data. The reason the test starts to fail is reading all items takes time, and there are too
many failed requests.
To fix this issue, this patch increases database size limit to 10MB (double of quota), which should make quota check
results in different processes to be more closer.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
(WebKit::SQLiteStorageArea::prepareDatabase):
Canonical link: https://commits.webkit.org/259571@main
More information about the webkit-changes
mailing list