Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 45d559f9b97534475612b4737a25d972ef167098
https://github.com/WebKit/WebKit/commit/45d559f9b97534475612b4737a25d972ef167098
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-11-27 (Thu, 27 Nov 2025)
Changed paths:
M Source/WebCore/platform/SharedMemory.cpp
M Source/WebCore/platform/SharedMemory.h
M Source/WebCore/platform/cocoa/SharedMemoryCocoa.mm
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebCore/SharedMemoryTests.cpp
Log Message:
-----------
SharedMemory does not support creating a VM copy
https://bugs.webkit.org/show_bug.cgi?id=257957
rdar://problem/110644611
Reviewed by Mike Wyrzykowski and Ben Nham.
Add SharedMemoryHandle::createCopy() which creates a SharedMemoryHandle
out of an existing VM region.
Also add SharedMemoryHandle::create() which shares the VM region itself.
These will be used in use-cases where large immutable strings are
passed across processes and to replace memory copies for sharing
large bitmaps.
Tests: Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebCore/SharedMemoryTests.cpp
* Source/WebCore/platform/SharedMemory.cpp:
(WebCore::SharedMemoryHandle::createCopy):
* Source/WebCore/platform/SharedMemory.h:
* Source/WebCore/platform/cocoa/SharedMemoryCocoa.mm:
(WebCore::SharedMemoryHandle::create):
(WebCore::SharedMemoryHandle::createCopy):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/SharedMemoryTests.cpp: Added.
(WebCore::PrintTo):
(TestWebKitAPI::PrintTo):
(TestWebKitAPI::fillTestPattern):
(TestWebKitAPI::expectTestPattern):
(TestWebKitAPI::SharedMemoryFromMemoryTest::memorySize const):
(TestWebKitAPI::SharedMemoryFromMemoryTest::offset const):
(TestWebKitAPI::SharedMemoryFromMemoryTest::memorySource const):
(TestWebKitAPI::SharedMemoryFromMemoryTest::protection const):
(TestWebKitAPI::SharedMemoryFromMemoryTest::allocate):
(TestWebKitAPI::TEST_P):
Canonical link: https://commits.webkit.org/303597@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications