[webkit-changes] [WebKit/WebKit] 27d177: Allow truncateDatabaseFile on macOS

bnham noreply at github.com
Sun Jan 7 20:49:57 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 27d1774b44845e3de128ae7e69858aa0a03b5b39
      https://github.com/WebKit/WebKit/commit/27d1774b44845e3de128ae7e69858aa0a03b5b39
  Author: Ben Nham <nham at apple.com>
  Date:   2024-01-07 (Sun, 07 Jan 2024)

  Changed paths:
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    M Source/WebCore/PAL/pal/PlatformMac.cmake
    A Source/WebCore/PAL/pal/spi/cocoa/SQLite3SPI.h
    R Source/WebCore/PAL/pal/spi/ios/SQLite3SPI.h
    M Source/WebCore/platform/sql/SQLiteFileSystem.cpp
    M Source/WebCore/platform/sql/SQLiteFileSystem.h
    M Source/WebKitLegacy/Storage/StorageTracker.cpp

  Log Message:
  -----------
  Allow truncateDatabaseFile on macOS
https://bugs.webkit.org/show_bug.cgi?id=259113
rdar://112086693

Reviewed by Chris Dumez.

The truncateDatabaseFile SPI is only enabled on iOS right now. Recently we have been trying to
unifying our SQLite implementation across macOS and iOS to make things more maintainable
(e.g. 265918 at main and 265791 at main). We should enable this SPI on all Cocoa platforms since there's
nothing iOS-specific about it.

Originally I was going to change the the two callers of truncateDatabaseFile (in StorageTracker in
WebKitLegacy and DatabaseTracker in WebDatabase) to also call this function on all Cocoa platforms
rather than on iOS only. But it turns out that that in turn required enabling a bunch of other logic
for all Cocoa platforms (e.g. cross-process database deletion notifications). This seems like it's
not worth doing considering that the callers are deprecated anyway. So I left DatabaseTracker and
StorageTracker alone in this patch.

* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/PlatformMac.cmake:
* Source/WebCore/PAL/pal/spi/cocoa/SQLite3SPI.h: Renamed from Source/WebCore/PAL/pal/spi/ios/SQLite3SPI.h.
* Source/WebCore/platform/sql/SQLiteFileSystem.cpp:
* Source/WebCore/platform/sql/SQLiteFileSystem.h:
* Source/WebKitLegacy/Storage/StorageTracker.cpp:

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




More information about the webkit-changes mailing list