[webkit-changes] [WebKit/WebKit] d5346d: Restore/recreate corrupted SQLite file of local st...

Przemyslaw Gorszkowski noreply at github.com
Mon Jan 30 11:13:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d5346d022b5cd2324b2540c581baaf194712e5eb
      https://github.com/WebKit/WebKit/commit/d5346d022b5cd2324b2540c581baaf194712e5eb
  Author: Przemyslaw Gorszkowski <pgorszkowski at igalia.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
    M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.h
    M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp

  Log Message:
  -----------
  Restore/recreate corrupted SQLite file of local storage
https://bugs.webkit.org/show_bug.cgi?id=250470

Reviewed by Sihui Liu.

The current implementation in case of corrupted database file of the
localstorage requires few restart to make it works again.
This fix solves it and if the database file of the localstorage is
currupted it deletes broken file.

* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
(WebKit::SQLiteStorageArea::prepareDatabase):
(WebKit::SQLiteStorageArea::getItemFromDatabase):
(WebKit::SQLiteStorageArea::allItems):
(WebKit::SQLiteStorageArea::setItem):
(WebKit::SQLiteStorageArea::removeItem):
(WebKit::SQLiteStorageArea::clear):
(WebKit::SQLiteStorageArea::handleDatabaseCorruption):
* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.h:

Canonical link: https://commits.webkit.org/259573@main




More information about the webkit-changes mailing list