Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eb34217e404e09d292f0932dcc884e37fa2a28fd
      
https://github.com/WebKit/WebKit/commit/eb34217e404e09d292f0932dcc884e37fa2a28fd
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2025-11-27 (Thu, 27 Nov 2025)

  Changed paths:
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    A Source/WTF/wtf/AllocSpanMixin.h
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/MallocSpan.h
    M Source/WTF/wtf/MappedFileData.h
    R Source/WTF/wtf/Mmap.h
    A Source/WTF/wtf/MmapSpan.h
    M Source/WTF/wtf/posix/FileHandlePOSIX.cpp
    M Source/WTF/wtf/posix/MappedFileDataPOSIX.cpp
    M Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp
    M Source/WebKit/Platform/IPC/Encoder.cpp
    M Source/WebKit/Platform/IPC/Encoder.h

  Log Message:
  -----------
  Rename MallocSpan<..., Mmap> to MmapSpan
https://bugs.webkit.org/show_bug.cgi?id=303091
rdar://165397945

Reviewed by Ben Nham.

MallocSpan<..., Mmap> doesn't support the interface exposed by
MallocSpan. To fix this, extract the common functionality between
MallocSpan<..., XXX> for any XXX to AllocSpanMixin<T>.

Add explicit MmapSpan to that has unambiguous mmap-related constructors.

The common AllocSpanMixin<T> will be used to implement Cocoa-specific
VMAllocSpan in the future. The upcoming VMAllocSpan will be used in
SharedMemory. This feature is needed to hold memory-owning spans that
originate from IPC or files but do not reserve handles.

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/MallocSpan.h:
(WTF::MallocSpan::MallocSpan):
(WTF::MallocSpan::requires):
(WTF::MallocSpan::~MallocSpan):
(WTF::MallocSpan::operator=):
(WTF::MallocSpan::malloc):
(WTF::MallocSpan::zeroedMalloc):
(WTF::MallocSpan::alignedMalloc):
(WTF::MallocSpan::tryMalloc):
(WTF::MallocSpan::tryZeroedMalloc):
(WTF::MallocSpan::tryAlignedMalloc):
(WTF::MallocSpan::realloc):
(WTF::MallocSpan::swap): Deleted.
(WTF::MallocSpan::sizeInBytes const): Deleted.
(WTF::MallocSpan::operator bool const): Deleted.
(WTF::MallocSpan::operator! const): Deleted.
(WTF::MallocSpan::mmap): Deleted.
* Source/WTF/wtf/MappedFileData.h:
* Source/WTF/wtf/Mmap.h: Removed.
* Source/WTF/wtf/posix/FileHandlePOSIX.cpp:
(WTF::FileSystemImpl::FileHandle::map):
* Source/WTF/wtf/posix/MappedFileDataPOSIX.cpp:
(WTF::FileSystemImpl::MappedFileData::MappedFileData):
* Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp:
(WTF::OSAllocator::tryReserveAndCommit):
* Source/WebKit/Platform/IPC/Encoder.cpp:
(IPC::Encoder::reserve):
(IPC::allocateBuffer): Deleted.
* Source/WebKit/Platform/IPC/Encoder.h:

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



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

Reply via email to