Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d8d038849797ffa70e6614b51dba9e6ca42b7c6c
      
https://github.com/WebKit/WebKit/commit/d8d038849797ffa70e6614b51dba9e6ca42b7c6c
  Author: Chris Dumez <cdu...@apple.com>
  Date:   2025-03-20 (Thu, 20 Mar 2025)

  Changed paths:
    M Source/JavaScriptCore/API/JSScript.mm
    M Source/JavaScriptCore/jsc.cpp
    M Source/JavaScriptCore/runtime/CachePayload.h
    M Source/JavaScriptCore/runtime/CachedTypes.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/wasm/WasmStreamingParser.cpp
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/FileHandle.cpp
    M Source/WTF/wtf/FileHandle.h
    A Source/WTF/wtf/FileLockMode.h
    M Source/WTF/wtf/FileSystem.cpp
    M Source/WTF/wtf/FileSystem.h
    A Source/WTF/wtf/MappedFileData.h
    M Source/WTF/wtf/PlatformGTK.cmake
    M Source/WTF/wtf/PlatformJSCOnly.cmake
    M Source/WTF/wtf/PlatformMac.cmake
    M Source/WTF/wtf/PlatformPlayStation.cmake
    M Source/WTF/wtf/PlatformWPE.cmake
    M Source/WTF/wtf/PlatformWin.cmake
    M Source/WTF/wtf/cocoa/FileSystemCocoa.mm
    M Source/WTF/wtf/posix/FileHandlePOSIX.cpp
    M Source/WTF/wtf/posix/FileSystemPOSIX.cpp
    A Source/WTF/wtf/posix/MappedFileDataPOSIX.cpp
    M Source/WTF/wtf/win/FileHandleWin.cpp
    M Source/WTF/wtf/win/FileSystemWin.cpp
    A Source/WTF/wtf/win/MappedFileDataWin.cpp
    M Source/WebCore/Modules/model-element/scenekit/SceneKitModelLoaderUSD.mm
    M Source/WebCore/Modules/webdatabase/OriginLock.cpp
    M Source/WebCore/Modules/webdatabase/OriginLock.h
    M Source/WebCore/bindings/js/GCController.cpp
    M Source/WebCore/contentextensions/SerializedNFA.cpp
    M Source/WebCore/contentextensions/SerializedNFA.h
    M Source/WebCore/html/FileInputType.cpp
    M Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
    M Source/WebCore/platform/FileStream.cpp
    M Source/WebCore/platform/FileStream.h
    M Source/WebCore/platform/SharedBuffer.cpp
    M Source/WebCore/platform/SharedBuffer.h
    M Source/WebCore/platform/cocoa/FileMonitorCocoa.mm
    M Source/WebCore/platform/graphics/GraphicsLayer.cpp
    M Source/WebCore/platform/graphics/cg/ImageUtilitiesCG.cpp
    M Source/WebCore/platform/network/BlobRegistryImpl.cpp
    M Source/WebCore/platform/network/curl/CookieJarDB.cpp
    M Source/WebCore/platform/network/curl/CurlFormDataStream.h
    M Source/WebCore/storage/StorageUtilities.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/workers/service/server/SWScriptStorage.cpp
    M Source/WebKit/NetworkProcess/NetworkDataTaskBlob.h
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.h
    M Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCacheData.h
    M Source/WebKit/NetworkProcess/cache/NetworkCacheDataCocoa.mm
    M Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h
    M Source/WebKit/NetworkProcess/storage/BackgroundFetchStoreManager.cpp
    M Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp
    M Source/WebKit/Platform/IPC/SharedFileHandle.h
    M Source/WebKit/Shared/PersistencyUtils.cpp
    M Source/WebKit/Shared/WebMemorySampler.h
    M Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
    M Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
    M Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtension.cpp
    M 
Source/WebKit/UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp
    M Source/WebKit/UIProcess/Inspector/win/WebInspectorUIProxyWin.cpp
    M Source/WebKit/UIProcess/ios/WKModelView.mm
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Source/WebKit/WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm
    M Source/WebKitLegacy/mac/WebView/WebPDFView.mm
    M Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GstElementHarness.cpp

  Log Message:
  -----------
  Move API for file mapping to the new FileHandle class
https://bugs.webkit.org/show_bug.cgi?id=290022

Reviewed by Darin Adler.

Move API for file mapping to the new FileHandle class since the new main entry 
point
to deal with file descriptors.

It used to be constructors and create() functions on the MappedFileData class, 
taking
a FileHandle as parameter. It's easier to just call `map()` on the FileHandle 
directly
and is more consistent with how other FileSystem APIs currently work.

* Source/JavaScriptCore/API/JSScript.mm:
(+[JSScript 
scriptOfType:memoryMappedFromASCIIFile:withSourceURL:andBytecodeCache:inVirtualMachine:error:]):
(-[JSScript readCache]):
* Source/JavaScriptCore/jsc.cpp:
* Source/JavaScriptCore/runtime/CachedTypes.cpp:
(JSC::Encoder::releaseMapped):
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/FileHandle.h:
* Source/WTF/wtf/FileSystem.cpp:
(WTF::FileSystemImpl::mapFile):
(WTF::FileSystemImpl::createMappedFileData):
(WTF::FileSystemImpl::MappedFileData::MappedFileData): Deleted.
(WTF::FileSystemImpl::MappedFileData::mapFileHandle): Deleted.
* Source/WTF/wtf/FileSystem.h:
(WTF::FileSystemImpl::MappedFileData::leakHandle): Deleted.
(WTF::FileSystemImpl::MappedFileData::operator bool const): Deleted.
(WTF::FileSystemImpl::MappedFileData::size const): Deleted.
(): Deleted.
(WTF::FileSystemImpl::MappedFileData::fileMapping const): Deleted.
(WTF::FileSystemImpl::MappedFileData::span const): Deleted.
(WTF::FileSystemImpl::MappedFileData::mutableSpan): Deleted.
(WTF::FileSystemImpl::MappedFileData::create): Deleted.
(WTF::FileSystemImpl::MappedFileData::MappedFileData): Deleted.
(WTF::FileSystemImpl::m_fileMapping): Deleted.
(WTF::FileSystemImpl::MappedFileData::operator=): Deleted.
* Source/WTF/wtf/MappedFileData.h: Added.
(WTF::FileSystemImpl::MappedFileData::leakHandle):
(WTF::FileSystemImpl::MappedFileData::operator bool const):
(WTF::FileSystemImpl::MappedFileData::size const):
(WTF::FileSystemImpl::MappedFileData::fileMapping const):
(WTF::FileSystemImpl::MappedFileData::span const):
(WTF::FileSystemImpl::MappedFileData::mutableSpan):
* Source/WTF/wtf/PlatformJSCOnly.cmake:
* Source/WTF/wtf/PlatformWin.cmake:
* Source/WTF/wtf/posix/FileHandlePOSIX.cpp:
(WTF::FileSystemImpl::FileHandle::lock):
(WTF::FileSystemImpl::FileHandle::map):
* Source/WTF/wtf/posix/MappedFileDataPOSIX.cpp: Added.
(WTF::FileSystemImpl::MappedFileData::MappedFileData):
* Source/WTF/wtf/win/FileHandleWin.cpp:
(WTF::FileSystemImpl::FileHandle::map):
* Source/WTF/wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::MappedFileData::~MappedFileData): Deleted.
(WTF::FileSystemImpl::MappedFileData::mapFileHandle): Deleted.
* Source/WTF/wtf/win/MappedFileDataWin.cpp: Added.
(WTF::FileSystemImpl::MappedFileData):
(WTF::FileSystemImpl::MappedFileData::~MappedFileData):
* Source/WebCore/contentextensions/SerializedNFA.cpp:
(WebCore::ContentExtensions::SerializedNFA::serialize):
* Source/WebCore/platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::adoptAndMapFile):
* Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp:
(WebKit::CacheStorageDiskStore::readAllRecordInfosInternal):
(WebKit::CacheStorageDiskStore::readRecordsInternal):
* Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F(FileSystemTest, MappingMissingFile)):
(TestWebKitAPI::TEST_F(FileSystemTest, MappingExistingFile)):
(TestWebKitAPI::TEST_F(FileSystemTest, MappingExistingEmptyFile)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to