0
Files
src/tools
Sylvain Defresne 44c6829e85 [ios] Gracefully handle missing WebState's data
Remove the check of whether all the WebState's data file are present
when loading the metadata for a session. This performed poorly for
users with thousands of tabs, and is not enough to ensure that the
data could be loaded (e.g. loading can fail even if the file exists
if the data is corrupt, or it could be removed by the time the code
tries to load it).

Change the prototype of WebStateStorageLoader to propagate failing
to load the WebStateStorage (by returning std::nullopt) and create
a default storage from the metadata if possible. This ensure that
the tab will at least navigate to the last visible URL even if the
navigation history was lost.

This should improve the startup time by removing disk access from
the hot path and should reduce the risk of losing tabs because it
will only happen if the metadata themselves are invalid, not if a
few tabs data has disappeared.

Bug: none
Change-Id: I3c088368039472209be9eb75c28b49c0dc9d34bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6377364
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1435626}
2025-03-20 12:53:05 -07:00
..
2025-02-27 13:38:48 -08:00
2025-02-25 11:01:39 -08:00
2025-03-18 14:09:17 -07:00
2025-03-12 11:02:15 -07:00

Tools used during the build or running tests or sometimes just things that people have found useful while working on Chromium.