Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a4e6af659505f83aa93ad7dc6f7bf390cac5f12
      
https://github.com/WebKit/WebKit/commit/0a4e6af659505f83aa93ad7dc6f7bf390cac5f12
  Author: Adrian Perez de Castro <[email protected]>
  Date:   2026-05-21 (Thu, 21 May 2026)

  Changed paths:
    M Source/WTF/wtf/FileSystem.h
    M Source/WTF/wtf/cocoa/FileSystemCocoa.mm
    M Source/WTF/wtf/posix/FileSystemPOSIX.cpp
    M Source/WTF/wtf/win/FileSystemWin.cpp
    M Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
    M Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp

  Log Message:
  -----------
  Content rule list store may end up copying compiled bytecode files
https://bugs.webkit.org/show_bug.cgi?id=315236

Reviewed by Chris Dumez and Michael Catanzaro.

Add a third parameter to WTF::openTemporaryFile() that allows overriding the
temporary directory where to create the file. Then the APIContentRuleListStore
can take advantage of this avoid hitting the case in which the temporary 
directory
is different from that of the resulting file, thus avoiding the file copy 
fallback
when calling WTF::moveFile() down the line to place the compiled bytecode file
into its final destination.

* Source/WTF/wtf/FileSystem.h:
(WTF::FileSystemImpl::openTemporaryFile):
* Source/WTF/wtf/cocoa/FileSystemCocoa.mm:
(WTF::FileSystemImpl::openTemporaryFile):
* Source/WTF/wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::openTemporaryFile):
* Source/WTF/wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::openTemporaryFile):
* Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp:
(API::compiledToFile):
* Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F(FileSystemTest, createTemporaryFileInDirectory)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to