[webkit-changes] [WebKit/WebKit] 96ca30: Introduce MallocSpan, which is similar to MallocPt...

Chris Dumez noreply at github.com
Wed Oct 30 17:10:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 96ca30d7d7d9fe84af045d94ce4b1a4482a36c69
      https://github.com/WebKit/WebKit/commit/96ca30d7d7d9fe84af045d94ce4b1a4482a36c69
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    A Source/WTF/wtf/MallocSpan.h
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WTF/wtf/text/StringBuilder.h
    M Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp

  Log Message:
  -----------
  Introduce MallocSpan, which is similar to MallocPtr but also keeps track of the size
https://bugs.webkit.org/show_bug.cgi?id=282341

Reviewed by Geoffrey Garen, Michael Catanzaro, and Adrian Perez de Castro.

Introduce MallocSpan, which is similar to MallocPtr but also keeps track of the size,
for extra safety.

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/MallocSpan.h: Added.
(WTF::MallocSpan::MallocSpan):
(WTF::MallocSpan::~MallocSpan):
(WTF::MallocSpan::operator=):
(WTF::MallocSpan::swap):
(WTF::MallocSpan::span const):
(WTF::MallocSpan::mutableSpan):
(WTF::MallocSpan::leakSpan):
(WTF::MallocSpan::malloc):
(WTF::MallocSpan::zeroedMalloc):
(WTF::MallocSpan::tryMalloc):
(WTF::MallocSpan::tryZeroedMalloc):
(WTF::MallocSpan::realloc):
(WTF::adoptMallocSpan):
* Source/WTF/wtf/StdLibExtras.h:
(WTF::spanConstCast):
* Source/WTF/wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
* Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::HistoryEntryDataEncoder::growCapacity):
(WebKit::HistoryEntryDataEncoder::capacity const):
(WebKit::HistoryEntryDataEncoder::mutableBuffer):
(WebKit::HistoryEntryDataEncoder::buffer const):
(WebKit::encodeSessionHistoryEntryData):

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



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


More information about the webkit-changes mailing list