From 16a7f29cda0ab61632d05a82f65fd058c151423b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 17 Oct 2026 23:22:44 -0700 Subject: [PATCH] Annotate more WTF functions as NODELETE https://bugs.webkit.org/show_bug.cgi?id=327963 Reviewed by Richard Robinson. Added LEGACY_NODELETE annotation to various functions in Source/WTF. No new tests since there should be no behavioral changes. * Source/WTF/wtf/BitVector.h: * Source/WTF/wtf/ConcurrentPtrHashSet.h: * Source/WTF/wtf/CurrentThread.h: * Source/WTF/wtf/Int128.h: * Source/WTF/wtf/JSONValues.h: * Source/WTF/wtf/LogChannels.h: * Source/WTF/wtf/MediaTime.h: * Source/WTF/wtf/ParallelHelperPool.h: * Source/WTF/wtf/ParkingLot.cpp: * Source/WTF/wtf/PlainGregorianDateTime.h: * Source/WTF/wtf/Seconds.h: * Source/WTF/wtf/SuspendableWorkQueue.h: * Source/WTF/wtf/Threading.h: * Source/WTF/wtf/TimeWithDynamicClockType.h: * Source/WTF/wtf/TimeZone.h: * Source/WTF/wtf/URL.h: * Source/WTF/wtf/URLHelpers.h: * Source/WTF/wtf/URLParser.cpp: (WTF::isInQueryEncodeSet): * Source/WTF/wtf/URLParser.h: * Source/WTF/wtf/WallTime.h: * Source/WTF/wtf/WorkQueue.h: * Source/WTF/wtf/WorkerPool.h: * Source/WTF/wtf/dragonbox/dragonbox_to_chars.h: * Source/WTF/wtf/dtoa.cpp: (WTF::truncateTrailingZeros): * Source/WTF/wtf/dtoa/double-conversion.h: * Source/WTF/wtf/dtoa/fixed-dtoa.cc: * Source/WTF/wtf/dtoa/strtod.cc: * Source/WTF/wtf/persistence/PersistentDecoder.h: * Source/WTF/wtf/text/AtomStringImpl.cpp: (WTF::UTF16BufferTranslator::equal): (WTF::SubstringTranslator8::equal): (WTF::SubstringTranslator16::equal): (WTF::Latin1BufferTranslator::equal): (WTF::BufferFromStaticDataTranslator::equal): (WTF::StaticStringAtomTranslator::equal): (WTF::StaticStringAtomTranslator::translate): (WTF::AtomStringTableRemovalHashTranslator::equal): * Source/WTF/wtf/text/Base64.h: * Source/WTF/wtf/text/StringBuilder.h: * Source/WTF/wtf/text/StringImpl.h: * Source/WTF/wtf/text/StringView.cpp: (WTF::StringView::GraphemeClusters::Iterator::Impl::operator* const): (WTF::StringView::GraphemeClusters::Iterator::Impl::operator== const): * Source/WTF/wtf/text/StringView.h: * Source/WTF/wtf/text/SymbolImpl.h: * Source/WTF/wtf/text/WTFString.cpp: (WTF::doubleToFloatCheckingOverflow): * Source/WTF/wtf/text/WTFString.h: * Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp: (WTF::textLatin1ContextAwareMoveInPriorContext): (WTF::textLatin1ContextAwareSwitchToPriorContext): * Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp: (WTF::textUTF16ContextAwareMoveInPrimaryContext): (WTF::textUTF16ContextAwareSwitchToPrimaryContext): (WTF::textUTF16ContextAwareMoveInPriorContext): (WTF::textUTF16ContextAwareSwitchToPriorContext): (WTF::uTextUTF16ContextAwareAccess): * Source/WTF/wtf/threads/Signals.cpp: (WTF::toSystemSignal): Canonical link: https://commits.webkit.org/324077@main --- Source/WTF/wtf/BitVector.h | 4 +-- Source/WTF/wtf/ConcurrentPtrHashSet.h | 4 +-- Source/WTF/wtf/CurrentThread.h | 2 +- Source/WTF/wtf/Int128.h | 8 +++--- Source/WTF/wtf/JSONValues.h | 28 +++++++++---------- Source/WTF/wtf/LogChannels.h | 6 ++-- Source/WTF/wtf/MediaTime.h | 6 ++-- Source/WTF/wtf/ParallelHelperPool.h | 2 +- Source/WTF/wtf/ParkingLot.cpp | 2 +- Source/WTF/wtf/PlainGregorianDateTime.h | 2 +- Source/WTF/wtf/Seconds.h | 22 +++++++-------- Source/WTF/wtf/SuspendableWorkQueue.h | 4 +-- Source/WTF/wtf/Threading.h | 8 +++--- Source/WTF/wtf/TimeWithDynamicClockType.h | 4 +-- Source/WTF/wtf/TimeZone.h | 4 +-- Source/WTF/wtf/URL.h | 2 +- Source/WTF/wtf/URLHelpers.h | 2 +- Source/WTF/wtf/URLParser.cpp | 2 +- Source/WTF/wtf/URLParser.h | 4 +-- Source/WTF/wtf/WallTime.h | 4 +-- Source/WTF/wtf/WorkQueue.h | 4 +-- Source/WTF/wtf/WorkerPool.h | 2 +- Source/WTF/wtf/dragonbox/dragonbox_to_chars.h | 2 +- Source/WTF/wtf/dtoa.cpp | 2 +- Source/WTF/wtf/dtoa/double-conversion.h | 4 +-- Source/WTF/wtf/dtoa/fixed-dtoa.cc | 2 +- Source/WTF/wtf/dtoa/strtod.cc | 2 +- .../WTF/wtf/persistence/PersistentDecoder.h | 4 +-- Source/WTF/wtf/text/AtomStringImpl.cpp | 16 +++++------ Source/WTF/wtf/text/Base64.h | 2 +- Source/WTF/wtf/text/StringBuilder.h | 2 +- Source/WTF/wtf/text/StringImpl.h | 4 +-- Source/WTF/wtf/text/StringView.cpp | 4 +-- Source/WTF/wtf/text/StringView.h | 4 +-- Source/WTF/wtf/text/SymbolImpl.h | 2 +- Source/WTF/wtf/text/WTFString.cpp | 2 +- Source/WTF/wtf/text/WTFString.h | 8 +++--- .../WTF/wtf/text/icu/UTextProviderLatin1.cpp | 4 +-- .../WTF/wtf/text/icu/UTextProviderUTF16.cpp | 10 +++---- Source/WTF/wtf/threads/Signals.cpp | 2 +- 40 files changed, 101 insertions(+), 101 deletions(-) diff --git a/Source/WTF/wtf/BitVector.h b/Source/WTF/wtf/BitVector.h index 6de190af8ce25..3184e249a06e3 100644 --- a/Source/WTF/wtf/BitVector.h +++ b/Source/WTF/wtf/BitVector.h @@ -506,14 +506,14 @@ class BitVector final { WTF_EXPORT_PRIVATE void mergeSlow(const BitVector& other); WTF_EXPORT_PRIVATE void filterSlow(const BitVector& other); - WTF_EXPORT_PRIVATE void excludeSlow(const BitVector& other); + WTF_EXPORT_PRIVATE void LEGACY_NODELETE excludeSlow(const BitVector& other); WTF_EXPORT_PRIVATE size_t LEGACY_NODELETE bitCountSlow() const; WTF_EXPORT_PRIVATE bool isEmptySlow() const; WTF_EXPORT_PRIVATE bool equalsSlowCase(const BitVector& other) const; bool equalsSlowCaseFast(const BitVector& other) const; - bool equalsSlowCaseSimple(const BitVector& other) const; + bool LEGACY_NODELETE equalsSlowCaseSimple(const BitVector& other) const; WTF_EXPORT_PRIVATE uintptr_t LEGACY_NODELETE hashSlowCase() const; std::span words() LIFETIME_BOUND diff --git a/Source/WTF/wtf/ConcurrentPtrHashSet.h b/Source/WTF/wtf/ConcurrentPtrHashSet.h index 726478ea4014e..b9ab0a10d8103 100644 --- a/Source/WTF/wtf/ConcurrentPtrHashSet.h +++ b/Source/WTF/wtf/ConcurrentPtrHashSet.h @@ -173,8 +173,8 @@ class ConcurrentPtrHashSet final { } WTF_EXPORT_PRIVATE bool addSlow(Table* table, unsigned mask, unsigned startIndex, unsigned index, void* ptr); - WTF_EXPORT_PRIVATE bool containsImplSlow(void* ptr) const; - WTF_EXPORT_PRIVATE size_t sizeSlow() const; + WTF_EXPORT_PRIVATE bool LEGACY_NODELETE containsImplSlow(void* ptr) const; + WTF_EXPORT_PRIVATE size_t LEGACY_NODELETE sizeSlow() const; void resizeIfNecessary(); bool resizeAndAdd(void* ptr); diff --git a/Source/WTF/wtf/CurrentThread.h b/Source/WTF/wtf/CurrentThread.h index 11d9fbef5ec8a..fb635a8a20724 100644 --- a/Source/WTF/wtf/CurrentThread.h +++ b/Source/WTF/wtf/CurrentThread.h @@ -31,7 +31,7 @@ namespace WTF { WTF_EXPORT_PRIVATE uint32_t currentThreadID(); -WTF_EXPORT_PRIVATE bool currentThreadMayBeGCThread(); +WTF_EXPORT_PRIVATE bool LEGACY_NODELETE currentThreadMayBeGCThread(); } // namespace WTF diff --git a/Source/WTF/wtf/Int128.h b/Source/WTF/wtf/Int128.h index 744aca97a4351..231a862bf6517 100644 --- a/Source/WTF/wtf/Int128.h +++ b/Source/WTF/wtf/Int128.h @@ -494,8 +494,8 @@ constexpr UInt128Impl operator>>(UInt128Impl lhs, int amount); constexpr UInt128Impl operator+(UInt128Impl lhs, UInt128Impl rhs); constexpr UInt128Impl operator-(UInt128Impl lhs, UInt128Impl rhs); constexpr UInt128Impl operator*(UInt128Impl lhs, UInt128Impl rhs); -WTF_EXPORT_PRIVATE UInt128Impl operator/(UInt128Impl lhs, UInt128Impl rhs); -WTF_EXPORT_PRIVATE UInt128Impl operator%(UInt128Impl lhs, UInt128Impl rhs); +WTF_EXPORT_PRIVATE UInt128Impl LEGACY_NODELETE operator/(UInt128Impl lhs, UInt128Impl rhs); +WTF_EXPORT_PRIVATE UInt128Impl LEGACY_NODELETE operator%(UInt128Impl lhs, UInt128Impl rhs); inline UInt128Impl& UInt128Impl::operator<<=(int amount) { *this = *this << amount; @@ -830,8 +830,8 @@ constexpr Int128Impl operator-(Int128Impl v); constexpr Int128Impl operator+(Int128Impl lhs, Int128Impl rhs); constexpr Int128Impl operator-(Int128Impl lhs, Int128Impl rhs); constexpr Int128Impl operator*(Int128Impl lhs, Int128Impl rhs); -WTF_EXPORT_PRIVATE Int128Impl operator/(Int128Impl lhs, Int128Impl rhs); -WTF_EXPORT_PRIVATE Int128Impl operator%(Int128Impl lhs, Int128Impl rhs); +WTF_EXPORT_PRIVATE Int128Impl LEGACY_NODELETE operator/(Int128Impl lhs, Int128Impl rhs); +WTF_EXPORT_PRIVATE Int128Impl LEGACY_NODELETE operator%(Int128Impl lhs, Int128Impl rhs); constexpr Int128Impl operator|(Int128Impl lhs, Int128Impl rhs); constexpr Int128Impl operator&(Int128Impl lhs, Int128Impl rhs); constexpr Int128Impl operator^(Int128Impl lhs, Int128Impl rhs); diff --git a/Source/WTF/wtf/JSONValues.h b/Source/WTF/wtf/JSONValues.h index 357d7911f99c1..d836911abee75 100644 --- a/Source/WTF/wtf/JSONValues.h +++ b/Source/WTF/wtf/JSONValues.h @@ -62,11 +62,11 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted, public NoVirtualDestr void operator delete(Value*, std::destroying_delete_t); bool operator!() const; - static Ref null(); - static Ref create(bool); - static Ref create(int); - static Ref create(double); - static Ref create(const String&); + static Ref LEGACY_NODELETE null(); + static Ref LEGACY_NODELETE create(bool); + static Ref LEGACY_NODELETE create(int); + static Ref LEGACY_NODELETE create(double); + static Ref LEGACY_NODELETE create(const String&); template static Ref create(T) = delete; @@ -96,10 +96,10 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted, public NoVirtualDestr } bool isNull() const { return std::holds_alternative(m_value); } - std::optional asBoolean() const; - std::optional asInteger() const; - std::optional asDouble() const; - const String& asString() const; + std::optional LEGACY_NODELETE asBoolean() const; + std::optional LEGACY_NODELETE asInteger() const; + std::optional LEGACY_NODELETE asDouble() const; + const String& LEGACY_NODELETE asString() const; RefPtr asValue(); RefPtr asObject(); RefPtr asObject() const; @@ -116,8 +116,8 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted, public NoVirtualDestr void dump(PrintStream&) const; // FIXME: remove these functions when legacy InspectorObject symbols are no longer needed. - bool asDouble(double&) const; - bool asInteger(int&) const; + bool LEGACY_NODELETE asDouble(double&) const; + bool LEGACY_NODELETE asInteger(int&) const; bool asString(String&) const; size_t memoryCost() const; @@ -158,7 +158,7 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted, public NoVirtualDestr template constexpr decltype(auto) visitDerived(NOESCAPE const Visitor&); template constexpr decltype(auto) visitDerived(NOESCAPE const Visitor&) const; - size_t memoryCostImpl() const; + size_t LEGACY_NODELETE memoryCostImpl() const; void writeJSONImpl(StringBuilder& output) const; private: @@ -229,7 +229,7 @@ class ObjectBase : public Value { class Object : public ObjectBase { public: - static WTF_EXPORT_PRIVATE Ref create(); + static WTF_EXPORT_PRIVATE Ref LEGACY_NODELETE create(); // This class expected non-cyclic values, as we cannot serialize cycles in JSON. using ObjectBase::setBoolean; @@ -309,7 +309,7 @@ class WTF_EXPORT_PRIVATE ArrayBase : public Value { class Array final : public ArrayBase { public: - static WTF_EXPORT_PRIVATE Ref create(); + static WTF_EXPORT_PRIVATE Ref LEGACY_NODELETE create(); // This class expected non-cyclic values, as we cannot serialize cycles in JSON. using ArrayBase::pushBoolean; diff --git a/Source/WTF/wtf/LogChannels.h b/Source/WTF/wtf/LogChannels.h index cecd88494841b..95cacf8276f25 100644 --- a/Source/WTF/wtf/LogChannels.h +++ b/Source/WTF/wtf/LogChannels.h @@ -39,11 +39,11 @@ class LogChannels { virtual ~LogChannels() = default; virtual String logLevelString() = 0; - WTF_EXPORT_PRIVATE bool isLogChannelEnabled(const String& name); - WTF_EXPORT_PRIVATE void setLogChannelToAccumulate(const String& name); + WTF_EXPORT_PRIVATE bool LEGACY_NODELETE isLogChannelEnabled(const String& name); + WTF_EXPORT_PRIVATE void LEGACY_NODELETE setLogChannelToAccumulate(const String& name); WTF_EXPORT_PRIVATE void clearAllLogChannelsToAccumulate(); WTF_EXPORT_PRIVATE void initializeLogChannelsIfNecessary(std::optional = std::nullopt); - WTF_EXPORT_PRIVATE WTFLogChannel* getLogChannel(const String& name); + WTF_EXPORT_PRIVATE WTFLogChannel* LEGACY_NODELETE getLogChannel(const String& name); protected: Vector m_logChannels; diff --git a/Source/WTF/wtf/MediaTime.h b/Source/WTF/wtf/MediaTime.h index e6d948b7d10bd..295eedfa2039f 100644 --- a/Source/WTF/wtf/MediaTime.h +++ b/Source/WTF/wtf/MediaTime.h @@ -59,7 +59,7 @@ class WTF_EXPORT_PRIVATE MediaTime final { MediaTime(const MediaTime&) = default; static MediaTime LEGACY_NODELETE createWithFloat(float floatTime); - static MediaTime createWithFloat(float floatTime, uint32_t timeScale); + static MediaTime LEGACY_NODELETE createWithFloat(float floatTime, uint32_t timeScale); static MediaTime LEGACY_NODELETE createWithDouble(double doubleTime); static MediaTime createWithDouble(double doubleTime, uint32_t timeScale); static MediaTime createWithSeconds(Seconds seconds) { return createWithDouble(seconds.value()); } @@ -76,9 +76,9 @@ class WTF_EXPORT_PRIVATE MediaTime final { MediaTime LEGACY_NODELETE operator-() const; MediaTime operator*(int32_t) const; bool LEGACY_NODELETE operator!() const; - explicit operator bool() const; + explicit LEGACY_NODELETE operator bool() const; - WTF_EXPORT_PRIVATE friend std::partial_ordering operator<=>(const MediaTime&, const MediaTime&); + WTF_EXPORT_PRIVATE friend std::partial_ordering LEGACY_NODELETE operator<=>(const MediaTime&, const MediaTime&); friend bool operator==(const MediaTime& a, const MediaTime& b) { return is_eq(a <=> b); } bool LEGACY_NODELETE isBetween(const MediaTime&, const MediaTime&) const; diff --git a/Source/WTF/wtf/ParallelHelperPool.h b/Source/WTF/wtf/ParallelHelperPool.h index 62edc8ab34d5f..949b61b2d5e5a 100644 --- a/Source/WTF/wtf/ParallelHelperPool.h +++ b/Source/WTF/wtf/ParallelHelperPool.h @@ -69,7 +69,7 @@ class ParallelHelperPool final : public ThreadSafeRefCounted WTF_MAKE_TZONE_ALLOCATED(ParallelHelperPool); WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(ParallelHelperPool); public: - WTF_EXPORT_PRIVATE static Ref create(ASCIILiteral threadName); + WTF_EXPORT_PRIVATE static Ref LEGACY_NODELETE create(ASCIILiteral threadName); WTF_EXPORT_PRIVATE ~ParallelHelperPool(); WTF_EXPORT_PRIVATE void ensureThreads(unsigned numThreads); diff --git a/Source/WTF/wtf/ParkingLot.cpp b/Source/WTF/wtf/ParkingLot.cpp index d452904991565..fde199d900051 100644 --- a/Source/WTF/wtf/ParkingLot.cpp +++ b/Source/WTF/wtf/ParkingLot.cpp @@ -327,7 +327,7 @@ IGNORE_CLANG_WARNINGS_END } } -void unlockHashtable(const Vector& buckets) +void LEGACY_NODELETE unlockHashtable(const Vector& buckets) { IGNORE_CLANG_WARNINGS_BEGIN("thread-safety") for (Bucket* bucket : buckets) diff --git a/Source/WTF/wtf/PlainGregorianDateTime.h b/Source/WTF/wtf/PlainGregorianDateTime.h index 7773644e97bf5..9409d78b306df 100644 --- a/Source/WTF/wtf/PlainGregorianDateTime.h +++ b/Source/WTF/wtf/PlainGregorianDateTime.h @@ -122,7 +122,7 @@ class PlainGregorianDateTime { // Decomposes a time value that the caller has already shifted into the zone the fields should // read in, which is why there is no offset to pass: utcOffsetInMinute and isDST come out zero. // Returns a value that converts to false for input outside the representable range. - WTF_EXPORT_PRIVATE static PlainGregorianDateTime fromMilliseconds(double millisecondsFromEpoch); + WTF_EXPORT_PRIVATE static PlainGregorianDateTime LEGACY_NODELETE fromMilliseconds(double millisecondsFromEpoch); WTF_EXPORT_PRIVATE static PlainGregorianDateTime currentLocalTime(); diff --git a/Source/WTF/wtf/Seconds.h b/Source/WTF/wtf/Seconds.h index adca150811ef4..79e65498a8b41 100644 --- a/Source/WTF/wtf/Seconds.h +++ b/Source/WTF/wtf/Seconds.h @@ -190,19 +190,19 @@ class Seconds final { return *this = *this % other; } - WTF_EXPORT_PRIVATE WallTime operator+(WallTime) const; - WTF_EXPORT_PRIVATE MonotonicTime operator+(MonotonicTime) const; - WTF_EXPORT_PRIVATE ApproximateTime operator+(ApproximateTime) const; - WTF_EXPORT_PRIVATE ContinuousTime operator+(ContinuousTime) const; - WTF_EXPORT_PRIVATE ContinuousApproximateTime operator+(ContinuousApproximateTime) const; - WTF_EXPORT_PRIVATE TimeWithDynamicClockType operator+(const TimeWithDynamicClockType&) const; + WTF_EXPORT_PRIVATE WallTime LEGACY_NODELETE operator+(WallTime) const; + WTF_EXPORT_PRIVATE MonotonicTime LEGACY_NODELETE operator+(MonotonicTime) const; + WTF_EXPORT_PRIVATE ApproximateTime LEGACY_NODELETE operator+(ApproximateTime) const; + WTF_EXPORT_PRIVATE ContinuousTime LEGACY_NODELETE operator+(ContinuousTime) const; + WTF_EXPORT_PRIVATE ContinuousApproximateTime LEGACY_NODELETE operator+(ContinuousApproximateTime) const; + WTF_EXPORT_PRIVATE TimeWithDynamicClockType LEGACY_NODELETE operator+(const TimeWithDynamicClockType&) const; WTF_EXPORT_PRIVATE WallTime operator-(WallTime) const; - WTF_EXPORT_PRIVATE MonotonicTime operator-(MonotonicTime) const; - WTF_EXPORT_PRIVATE ApproximateTime operator-(ApproximateTime) const; - WTF_EXPORT_PRIVATE ContinuousTime operator-(ContinuousTime) const; - WTF_EXPORT_PRIVATE ContinuousApproximateTime operator-(ContinuousApproximateTime) const; - WTF_EXPORT_PRIVATE TimeWithDynamicClockType operator-(const TimeWithDynamicClockType&) const; + WTF_EXPORT_PRIVATE MonotonicTime LEGACY_NODELETE operator-(MonotonicTime) const; + WTF_EXPORT_PRIVATE ApproximateTime LEGACY_NODELETE operator-(ApproximateTime) const; + WTF_EXPORT_PRIVATE ContinuousTime LEGACY_NODELETE operator-(ContinuousTime) const; + WTF_EXPORT_PRIVATE ContinuousApproximateTime LEGACY_NODELETE operator-(ContinuousApproximateTime) const; + WTF_EXPORT_PRIVATE TimeWithDynamicClockType LEGACY_NODELETE operator-(const TimeWithDynamicClockType&) const; // FIXME: Remove this suppression once rdar://190195764 is fixed. SUPPRESS_MEMORY_UNSAFE_CAST friend constexpr auto operator<=>(Seconds, Seconds) = default; diff --git a/Source/WTF/wtf/SuspendableWorkQueue.h b/Source/WTF/wtf/SuspendableWorkQueue.h index 2f93763f33a3b..5876d601c7cdd 100644 --- a/Source/WTF/wtf/SuspendableWorkQueue.h +++ b/Source/WTF/wtf/SuspendableWorkQueue.h @@ -37,14 +37,14 @@ class WTF_EXPORT_PRIVATE SuspendableWorkQueue final : public WorkQueue { public: using QOS = WorkQueue::QOS; enum class ShouldLog : bool { No, Yes }; - static Ref create(ASCIILiteral name, QOS = QOS::Default, ShouldLog = ShouldLog::No); + static Ref LEGACY_NODELETE create(ASCIILiteral name, QOS = QOS::Default, ShouldLog = ShouldLog::No); void suspend(Function&& suspendFunction, CompletionHandler&& suspensionCompletionHandler); void resume(); void dispatch(Function&&) final; void dispatchWithQOS(Function&&, QOS); void dispatchAfter(Seconds, Function&&) final; void dispatchSync(Function&&) final; - bool isSuspended() const; + bool LEGACY_NODELETE isSuspended() const; private: SuspendableWorkQueue(ASCIILiteral name, QOS, ShouldLog); diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h index bc0987089e378..dabc1831264b5 100644 --- a/Source/WTF/wtf/Threading.h +++ b/Source/WTF/wtf/Threading.h @@ -86,7 +86,7 @@ class PrintStream; WTF_EXPORT_PRIVATE void initialize(); -WTF_EXPORT_PRIVATE bool processIsShuttingDown(); +WTF_EXPORT_PRIVATE bool LEGACY_NODELETE processIsShuttingDown(); class ThreadSuspendLocker { WTF_MAKE_NONCOPYABLE(ThreadSuspendLocker); @@ -306,9 +306,9 @@ class WTF_CAPABILITY("is current") Thread : public ThreadSafeRefCountedAndCanMak #endif private: - void updateSchedulingAttributes(SchedulingState) const; + void LEGACY_NODELETE updateSchedulingAttributes(SchedulingState) const; // updateSchedulingAttributes for the first time + initialization bookkeeping - void initializeSchedulingAttributes(); + void LEGACY_NODELETE initializeSchedulingAttributes(); static void setCurrentThreadQOS(QOS); @@ -338,7 +338,7 @@ class WTF_CAPABILITY("is current") Thread : public ThreadSafeRefCountedAndCanMak #endif #if HAVE(QOS_CLASSES) - static qos_class_t adjustedQOSClass(qos_class_t); + static qos_class_t LEGACY_NODELETE adjustedQOSClass(qos_class_t); #endif static const char* LEGACY_NODELETE normalizeThreadName(const char* threadName); diff --git a/Source/WTF/wtf/TimeWithDynamicClockType.h b/Source/WTF/wtf/TimeWithDynamicClockType.h index 84d492c70f4e7..4e536e36b8845 100644 --- a/Source/WTF/wtf/TimeWithDynamicClockType.h +++ b/Source/WTF/wtf/TimeWithDynamicClockType.h @@ -142,12 +142,12 @@ class TimeWithDynamicClockType final { return *this = *this - other; } - WTF_EXPORT_PRIVATE Seconds operator-(const TimeWithDynamicClockType&) const; + WTF_EXPORT_PRIVATE Seconds LEGACY_NODELETE operator-(const TimeWithDynamicClockType&) const; friend bool operator==(const TimeWithDynamicClockType&, const TimeWithDynamicClockType&) = default; // To do relative comparisons, you must be using times with the same clock type. - WTF_EXPORT_PRIVATE friend std::partial_ordering operator<=>(const TimeWithDynamicClockType&, const TimeWithDynamicClockType&); + WTF_EXPORT_PRIVATE friend std::partial_ordering LEGACY_NODELETE operator<=>(const TimeWithDynamicClockType&, const TimeWithDynamicClockType&); WTF_EXPORT_PRIVATE void dump(PrintStream&) const; diff --git a/Source/WTF/wtf/TimeZone.h b/Source/WTF/wtf/TimeZone.h index 4cc5315138518..fda973f4b6dfd 100644 --- a/Source/WTF/wtf/TimeZone.h +++ b/Source/WTF/wtf/TimeZone.h @@ -33,11 +33,11 @@ namespace WTF { // Process-global, monotonically increasing counter. It is bumped whenever the // host time zone might have changed. -WTF_EXPORT_PRIVATE uint64_t lastTimeZoneID(); +WTF_EXPORT_PRIVATE uint64_t LEGACY_NODELETE lastTimeZoneID(); // Bumps lastTimeZoneID(). Call after any time-zone change that the platform // notifier does not observe, such as a process-local override. -WTF_EXPORT_PRIVATE void timeZoneDidChange(); +WTF_EXPORT_PRIVATE void LEGACY_NODELETE timeZoneDidChange(); WTF_EXPORT_PRIVATE void listenForTimeZoneChangeNotifications(); WTF_EXPORT_PRIVATE bool setHostTimeZoneForTesting(const String&); diff --git a/Source/WTF/wtf/URL.h b/Source/WTF/wtf/URL.h index 8d84d37d8f291..bf0b2a698d964 100644 --- a/Source/WTF/wtf/URL.h +++ b/Source/WTF/wtf/URL.h @@ -318,7 +318,7 @@ WTF_EXPORT_PRIVATE bool isValidJavaScriptURL(StringView url); // These are operations that aren't faster on a parsed URL. // These are also different from the WTF::URL functions in that they don't require the string to be a valid and parsable URL. -WTF_EXPORT_PRIVATE bool protocolIs(StringView url, ASCIILiteral protocol); +WTF_EXPORT_PRIVATE bool LEGACY_NODELETE protocolIs(StringView url, ASCIILiteral protocol); WTF_EXPORT_PRIVATE bool LEGACY_NODELETE protocolIsInHTTPFamily(StringView url); WTF_EXPORT_PRIVATE std::optional defaultPortForProtocol(StringView protocol); diff --git a/Source/WTF/wtf/URLHelpers.h b/Source/WTF/wtf/URLHelpers.h index 4e7cd6bdf6c45..363fb9e76864a 100644 --- a/Source/WTF/wtf/URLHelpers.h +++ b/Source/WTF/wtf/URLHelpers.h @@ -43,7 +43,7 @@ using URLDecodeFunction = String(*)(const String&); WTF_EXPORT_PRIVATE String userVisibleURL(std::span URL); void loadIDNAllowedScriptList(); void addScriptToIDNAllowedScriptList(const char* scriptName); -void initializeDefaultIDNAllowedScriptList(); +void LEGACY_NODELETE initializeDefaultIDNAllowedScriptList(); std::optional mapHostName(const String&, URLDecodeFunction); String mapHostNames(const String&, URLDecodeFunction); diff --git a/Source/WTF/wtf/URLParser.cpp b/Source/WTF/wtf/URLParser.cpp index 8f464c8fdcbdb..bbbdffc883f71 100644 --- a/Source/WTF/wtf/URLParser.cpp +++ b/Source/WTF/wtf/URLParser.cpp @@ -431,7 +431,7 @@ ALWAYS_INLINE void URLParser::appendToASCIIBuffer(std::span char copyElements(m_asciiBuffer.mutableSpan().subspan(offset), characters); } -template static constexpr bool isInQueryEncodeSet(Latin1Character character) { return shouldPercentEncodeQueryByte(character, special); } +template static constexpr bool LEGACY_NODELETE isInQueryEncodeSet(Latin1Character character) { return shouldPercentEncodeQueryByte(character, special); } template static consteval bool stopCharactersCoverEncodeSet() diff --git a/Source/WTF/wtf/URLParser.h b/Source/WTF/wtf/URLParser.h index 8ca4975544ad7..45e25087aeb70 100644 --- a/Source/WTF/wtf/URLParser.h +++ b/Source/WTF/wtf/URLParser.h @@ -139,7 +139,7 @@ class URLParser { enum class IPv4ParsingError; enum class IPv4PieceParsingError; template std::expected parseIPv4Host(const CodePointIterator&, CodePointIterator); - template std::expected parseIPv4Piece(CodePointIterator&, bool& syntaxViolation); + template std::expected LEGACY_NODELETE parseIPv4Piece(CodePointIterator&, bool& syntaxViolation); using IPv6Address = std::array; template std::optional parseIPv6Host(CodePointIterator); template std::optional LEGACY_NODELETE parseIPv4PieceInsideIPv6(CodePointIterator&); @@ -156,6 +156,6 @@ class URLParser { bool LEGACY_NODELETE shouldPopPath(unsigned); }; -WTF_EXPORT_PRIVATE bool isForbiddenHostCodePoint(char16_t); +WTF_EXPORT_PRIVATE bool LEGACY_NODELETE isForbiddenHostCodePoint(char16_t); } diff --git a/Source/WTF/wtf/WallTime.h b/Source/WTF/wtf/WallTime.h index 0aab5988cc52a..a6fbba62babb5 100644 --- a/Source/WTF/wtf/WallTime.h +++ b/Source/WTF/wtf/WallTime.h @@ -52,8 +52,8 @@ class WallTime final : public GenericTimeMixin { WTF_EXPORT_PRIVATE static WallTime now(); - WTF_EXPORT_PRIVATE static WallTime fromSecondsSinceEpoch(Seconds); - WTF_EXPORT_PRIVATE Seconds secondsSinceEpoch() const; + WTF_EXPORT_PRIVATE static WallTime LEGACY_NODELETE fromSecondsSinceEpoch(Seconds); + WTF_EXPORT_PRIVATE Seconds LEGACY_NODELETE secondsSinceEpoch() const; WTF_EXPORT_PRIVATE void dump(PrintStream&) const; diff --git a/Source/WTF/wtf/WorkQueue.h b/Source/WTF/wtf/WorkQueue.h index 944a2b96cce60..8f1ee965d5a86 100644 --- a/Source/WTF/wtf/WorkQueue.h +++ b/Source/WTF/wtf/WorkQueue.h @@ -93,7 +93,7 @@ class WorkQueueBase : protected ThreadLike { class WTF_CAPABILITY("is current") WTF_EXPORT_PRIVATE WorkQueue : public WorkQueueBase, public GuaranteedSerialFunctionDispatcher { public: static WorkQueue& mainSingleton(); - static Ref create(ASCIILiteral name, QOS = QOS::Default); + static Ref LEGACY_NODELETE create(ASCIILiteral name, QOS = QOS::Default); // WorkQueueBase @@ -122,7 +122,7 @@ class WTF_CAPABILITY("is current") WTF_EXPORT_PRIVATE WorkQueue : public WorkQue */ class WTF_EXPORT_PRIVATE ConcurrentWorkQueue final : public WorkQueueBase, public FunctionDispatcher, public ThreadSafeRefCounted { public: - static Ref create(ASCIILiteral name, QOS = QOS::Default); + static Ref LEGACY_NODELETE create(ASCIILiteral name, QOS = QOS::Default); static void apply(size_t iterations, WTF::Function&&); void dispatch(Function&&) override; diff --git a/Source/WTF/wtf/WorkerPool.h b/Source/WTF/wtf/WorkerPool.h index fd6d31ee4c7a2..98e9f0c2ff0ad 100644 --- a/Source/WTF/wtf/WorkerPool.h +++ b/Source/WTF/wtf/WorkerPool.h @@ -53,7 +53,7 @@ class WorkerPool final : public ThreadSafeRefCounted, public CanMake ASCIILiteral name() const { return m_name; } - WTF_EXPORT_PRIVATE unsigned numberOfTasks() const; + WTF_EXPORT_PRIVATE unsigned LEGACY_NODELETE numberOfTasks() const; private: class Worker; diff --git a/Source/WTF/wtf/dragonbox/dragonbox_to_chars.h b/Source/WTF/wtf/dragonbox/dragonbox_to_chars.h index a4a334bda3aaf..e6584b8fcbc6a 100644 --- a/Source/WTF/wtf/dragonbox/dragonbox_to_chars.h +++ b/Source/WTF/wtf/dragonbox/dragonbox_to_chars.h @@ -44,7 +44,7 @@ namespace detail { template WTF_EXPORT_PRIVATE extern std::span to_chars_impl(typename FloatTraits::carrier_uint significand, int32_t exponent, std::span buffer); -WTF_EXPORT_PRIVATE extern std::span to_shortest(const uint64_t significand, int32_t exponent, std::span buffer); +WTF_EXPORT_PRIVATE extern std::span LEGACY_NODELETE to_shortest(const uint64_t significand, int32_t exponent, std::span buffer); template <> WTF_EXPORT_PRIVATE std::span to_chars_impl, Mode::ToExponential, PrintTrailingZero::No>(uint64_t significand, int32_t exponent, std::span buffer); diff --git a/Source/WTF/wtf/dtoa.cpp b/Source/WTF/wtf/dtoa.cpp index bd46c6d688c07..28b78fc23b8c3 100644 --- a/Source/WTF/wtf/dtoa.cpp +++ b/Source/WTF/wtf/dtoa.cpp @@ -46,7 +46,7 @@ NumberToStringSpan numberToStringWithTrailingPoint(double d, NumberToStringBuffe return builder.Finalize(); } -static inline void truncateTrailingZeros(std::span buffer, double_conversion::StringBuilder& builder) +static inline void LEGACY_NODELETE truncateTrailingZeros(std::span buffer, double_conversion::StringBuilder& builder) { size_t length = builder.position(); size_t decimalPointPosition = 0; diff --git a/Source/WTF/wtf/dtoa/double-conversion.h b/Source/WTF/wtf/dtoa/double-conversion.h index d3eb7b33adfd0..04c94b54b927f 100644 --- a/Source/WTF/wtf/dtoa/double-conversion.h +++ b/Source/WTF/wtf/dtoa/double-conversion.h @@ -367,11 +367,11 @@ class DoubleToStringConverter { bool HandleSpecialValues(double value, StringBuilder* result_builder) const; // Constructs an exponential representation (i.e. 1.234e56). // The given exponent assumes a decimal point after the first decimal digit. - void CreateExponentialRepresentation(std::span decimal_digits, + void LEGACY_NODELETE CreateExponentialRepresentation(std::span decimal_digits, int exponent, StringBuilder* result_builder) const; // Creates a decimal representation (i.e 1234.5678). - void CreateDecimalRepresentation(std::span decimal_digits, + void LEGACY_NODELETE CreateDecimalRepresentation(std::span decimal_digits, int decimal_point, int digits_after_point, StringBuilder* result_builder) const; diff --git a/Source/WTF/wtf/dtoa/fixed-dtoa.cc b/Source/WTF/wtf/dtoa/fixed-dtoa.cc index f4cba65a893ca..96e4a9a422ee4 100644 --- a/Source/WTF/wtf/dtoa/fixed-dtoa.cc +++ b/Source/WTF/wtf/dtoa/fixed-dtoa.cc @@ -307,7 +307,7 @@ static void LEGACY_NODELETE TrimZeros(BufferReference buffer, int& length, } -bool FastFixedDtoa(double v, +bool LEGACY_NODELETE FastFixedDtoa(double v, int fractional_count, BufferReference buffer, int& length, diff --git a/Source/WTF/wtf/dtoa/strtod.cc b/Source/WTF/wtf/dtoa/strtod.cc index 7d1a9b299d5f8..591a3205bf53c 100644 --- a/Source/WTF/wtf/dtoa/strtod.cc +++ b/Source/WTF/wtf/dtoa/strtod.cc @@ -476,7 +476,7 @@ double Strtod(BufferReference buffer, int exponent) { } } -static float SanitizedDoubletof(double d) { +static float LEGACY_NODELETE SanitizedDoubletof(double d) { ASSERT(d >= 0.0); // ASAN has a sanitize check that disallows casting doubles to floats if // they are too big. diff --git a/Source/WTF/wtf/persistence/PersistentDecoder.h b/Source/WTF/wtf/persistence/PersistentDecoder.h index 01805fc4c4aad..a64b9a8eab339 100644 --- a/Source/WTF/wtf/persistence/PersistentDecoder.h +++ b/Source/WTF/wtf/persistence/PersistentDecoder.h @@ -43,7 +43,7 @@ class Decoder { size_t length() const { return m_buffer.size(); } size_t currentOffset() const { return static_cast(std::distance(m_buffer.begin(), m_bufferPosition)); } - [[nodiscard]] WTF_EXPORT_PRIVATE bool rewind(size_t); + [[nodiscard]] WTF_EXPORT_PRIVATE bool LEGACY_NODELETE rewind(size_t); [[nodiscard]] WTF_EXPORT_PRIVATE bool verifyChecksum(); @@ -93,7 +93,7 @@ class Decoder { [[nodiscard]] WTF_EXPORT_PRIVATE std::span bufferPointerForDirectRead(size_t numBytes); private: - [[nodiscard]] WTF_EXPORT_PRIVATE bool bufferIsLargeEnoughToContain(size_t) const; + [[nodiscard]] WTF_EXPORT_PRIVATE bool LEGACY_NODELETE bufferIsLargeEnoughToContain(size_t) const; template Decoder& decodeNumber(std::optional&); const std::span m_buffer; diff --git a/Source/WTF/wtf/text/AtomStringImpl.cpp b/Source/WTF/wtf/text/AtomStringImpl.cpp index 03eeffdb4e291..2ee52c0f83814 100644 --- a/Source/WTF/wtf/text/AtomStringImpl.cpp +++ b/Source/WTF/wtf/text/AtomStringImpl.cpp @@ -103,7 +103,7 @@ struct UTF16BufferTranslator { return buf.hash; } - static bool equal(AtomStringTable::StringEntry const& str, const UTF16Buffer& buf) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& str, const UTF16Buffer& buf) { return WTF::equal(str.get(), buf.characters); } @@ -162,7 +162,7 @@ struct SubstringTranslator8 : SubstringTranslator { return StringHasher::computeHashAndMaskTop8Bits(buffer.baseString->span8().subspan(buffer.start, buffer.length)); } - static bool equal(AtomStringTable::StringEntry const& string, const SubstringLocation& buffer) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& string, const SubstringLocation& buffer) { return WTF::equal(string.get(), buffer.baseString->span8().subspan(buffer.start, buffer.length)); } @@ -174,7 +174,7 @@ struct SubstringTranslator16 : SubstringTranslator { return StringHasher::computeHashAndMaskTop8Bits(buffer.baseString->span16().subspan(buffer.start, buffer.length)); } - static bool equal(AtomStringTable::StringEntry const& string, const SubstringLocation& buffer) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& string, const SubstringLocation& buffer) { return WTF::equal(string.get(), buffer.baseString->span16().subspan(buffer.start, buffer.length)); } @@ -208,7 +208,7 @@ struct Latin1BufferTranslator { return buf.hash; } - static bool equal(AtomStringTable::StringEntry const& str, const Latin1Buffer& buf) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& str, const Latin1Buffer& buf) { return WTF::equal(str.get(), buf.characters); } @@ -230,7 +230,7 @@ struct BufferFromStaticDataTranslator { return buf.hash; } - static bool equal(AtomStringTable::StringEntry const& str, const Buffer& buf) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& str, const Buffer& buf) { return WTF::equal(str.get(), buf.characters); } @@ -264,12 +264,12 @@ struct StaticStringAtomTranslator { return buf.hash; } - static bool equal(AtomStringTable::StringEntry const& str, const Buffer& buf) + static bool LEGACY_NODELETE equal(AtomStringTable::StringEntry const& str, const Buffer& buf) { return WTF::equal(str.get(), buf.characters); } - static void translate(AtomStringTable::StringEntry& location, const Buffer& buf, unsigned) + static void LEGACY_NODELETE translate(AtomStringTable::StringEntry& location, const Buffer& buf, unsigned) { location = const_cast(&buf.staticImpl); } @@ -449,7 +449,7 @@ Ref AtomStringImpl::addSlowCase(AtomStringTable& stringTable, St // When removing a string from the table, we know it's already the one in the table, so no need for a string equality check. struct AtomStringTableRemovalHashTranslator { static unsigned hash(const AtomStringImpl* string) { return string->hash(); } - static bool equal(const AtomStringTable::StringEntry& a, const AtomStringImpl* b) { return a == b; } + static bool LEGACY_NODELETE equal(const AtomStringTable::StringEntry& a, const AtomStringImpl* b) { return a == b; } }; void AtomStringImpl::remove(AtomStringImpl* string) diff --git a/Source/WTF/wtf/text/Base64.h b/Source/WTF/wtf/text/Base64.h index 83765c176b33f..7fc48339d4af2 100644 --- a/Source/WTF/wtf/text/Base64.h +++ b/Source/WTF/wtf/text/Base64.h @@ -53,7 +53,7 @@ struct Base64Specification { // Rather than being perfectly precise, this is a bit conservative. static constexpr unsigned maximumBase64EncoderInputBufferSize = std::numeric_limits::max() / 77 * 76 / 4 * 3 - 2; -WTF_EXPORT_PRIVATE unsigned calculateBase64EncodedSize(size_t inputLength, OptionSet); +WTF_EXPORT_PRIVATE unsigned LEGACY_NODELETE calculateBase64EncodedSize(size_t inputLength, OptionSet); template bool isBase64OrBase64URLCharacter(CharacterType); diff --git a/Source/WTF/wtf/text/StringBuilder.h b/Source/WTF/wtf/text/StringBuilder.h index d13f527adccf5..2d999298584eb 100644 --- a/Source/WTF/wtf/text/StringBuilder.h +++ b/Source/WTF/wtf/text/StringBuilder.h @@ -103,7 +103,7 @@ class StringBuilder { WTF_EXPORT_PRIVATE bool LEGACY_NODELETE containsOnlyASCII() const; private: - static unsigned expandedCapacity(unsigned capacity, unsigned requiredCapacity); + static unsigned LEGACY_NODELETE expandedCapacity(unsigned capacity, unsigned requiredCapacity); template void allocateBuffer(std::span currentCharacters, unsigned requiredCapacity); template void reallocateBuffer(unsigned requiredCapacity); diff --git a/Source/WTF/wtf/text/StringImpl.h b/Source/WTF/wtf/text/StringImpl.h index 83b58a05da9b3..9710c38a90bd0 100644 --- a/Source/WTF/wtf/text/StringImpl.h +++ b/Source/WTF/wtf/text/StringImpl.h @@ -566,8 +566,8 @@ class StringImpl : private StringImplShape, public NoVirtualDestructorBase { enum class CaseConvertType { Upper, Lower }; template static Ref convertASCIICase(StringImpl&, std::span); - WTF_EXPORT_PRIVATE static Ref createWithoutCopyingNonEmpty(std::span); - WTF_EXPORT_PRIVATE static Ref createWithoutCopyingNonEmpty(std::span); + WTF_EXPORT_PRIVATE static Ref LEGACY_NODELETE createWithoutCopyingNonEmpty(std::span); + WTF_EXPORT_PRIVATE static Ref LEGACY_NODELETE createWithoutCopyingNonEmpty(std::span); template Ref trimMatchedCharacters(CodeUnitPredicate); template ALWAYS_INLINE Ref removeCharactersImpl(std::span characters, NOESCAPE const Predicate&); diff --git a/Source/WTF/wtf/text/StringView.cpp b/Source/WTF/wtf/text/StringView.cpp index 99402f0d77427..6bb6a10878e33 100644 --- a/Source/WTF/wtf/text/StringView.cpp +++ b/Source/WTF/wtf/text/StringView.cpp @@ -233,12 +233,12 @@ class StringView::GraphemeClusters::Iterator::Impl { m_indexEnd = computeIndexEnd(); } - StringView operator*() const + StringView LEGACY_NODELETE operator*() const { return m_stringView.substring(m_index, m_indexEnd - m_index); } - bool operator==(const Impl& other) const + bool LEGACY_NODELETE operator==(const Impl& other) const { ASSERT(m_stringView.m_characters == other.m_stringView.m_characters); ASSERT(m_stringView.m_length == other.m_stringView.m_length); diff --git a/Source/WTF/wtf/text/StringView.h b/Source/WTF/wtf/text/StringView.h index 647a2264eb335..e5d315c48ee17 100644 --- a/Source/WTF/wtf/text/StringView.h +++ b/Source/WTF/wtf/text/StringView.h @@ -960,10 +960,10 @@ class StringView::GraphemeClusters::Iterator { Iterator& operator=(const Iterator&) = delete; Iterator& operator=(Iterator&&) = delete; - WTF_EXPORT_PRIVATE StringView operator*() const; + WTF_EXPORT_PRIVATE StringView LEGACY_NODELETE operator*() const; WTF_EXPORT_PRIVATE Iterator& operator++(); - WTF_EXPORT_PRIVATE bool operator==(const Iterator&) const; + WTF_EXPORT_PRIVATE bool LEGACY_NODELETE operator==(const Iterator&) const; private: class Impl; diff --git a/Source/WTF/wtf/text/SymbolImpl.h b/Source/WTF/wtf/text/SymbolImpl.h index 1cef0c8a43aad..46cc60a29de01 100644 --- a/Source/WTF/wtf/text/SymbolImpl.h +++ b/Source/WTF/wtf/text/SymbolImpl.h @@ -52,7 +52,7 @@ class SymbolImpl : public UniquedStringImpl { RegisteredSymbolImpl* asRegisteredSymbolImpl(); - WTF_EXPORT_PRIVATE static Ref createNullSymbol(); + WTF_EXPORT_PRIVATE static Ref LEGACY_NODELETE createNullSymbol(); WTF_EXPORT_PRIVATE static Ref create(StringImpl& rep); class StaticSymbolImpl final : private StringImplShape { diff --git a/Source/WTF/wtf/text/WTFString.cpp b/Source/WTF/wtf/text/WTFString.cpp index 010819503444c..e57095e346982 100644 --- a/Source/WTF/wtf/text/WTFString.cpp +++ b/Source/WTF/wtf/text/WTFString.cpp @@ -553,7 +553,7 @@ double charactersToFixedDouble(std::span data, bool* ok) return toDoubleType(data, ok, parsedLength); } -static inline float doubleToFloatCheckingOverflow(double number, bool* isValid) +static inline float LEGACY_NODELETE doubleToFloatCheckingOverflow(double number, bool* isValid) { float result = static_cast(number); if (isValid && *isValid && std::isfinite(number) && !std::isfinite(result)) diff --git a/Source/WTF/wtf/text/WTFString.h b/Source/WTF/wtf/text/WTFString.h index ef0fc45abecd0..d86ea1bb04e70 100644 --- a/Source/WTF/wtf/text/WTFString.h +++ b/Source/WTF/wtf/text/WTFString.h @@ -141,10 +141,10 @@ class String final { WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(int); WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(unsigned); - WTF_EXPORT_PRIVATE static String number(long); - WTF_EXPORT_PRIVATE static String number(unsigned long); - WTF_EXPORT_PRIVATE static String number(long long); - WTF_EXPORT_PRIVATE static String number(unsigned long long); + WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(long); + WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(unsigned long); + WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(long long); + WTF_EXPORT_PRIVATE static String LEGACY_NODELETE number(unsigned long long); WTF_EXPORT_PRIVATE static String number(float); WTF_EXPORT_PRIVATE static String number(double); diff --git a/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp b/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp index b026ecd19bbb2..c53e8b22d482e 100644 --- a/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp +++ b/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp @@ -317,7 +317,7 @@ static void textLatin1ContextAwareSwitchToPrimaryContext(UText* text, int64_t na textLatin1ContextAwareMoveInPrimaryContext(text, nativeIndex, nativeLength, forward); } -static void textLatin1ContextAwareMoveInPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textLatin1ContextAwareMoveInPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(text->chunkContents == text->q); ASSERT_UNUSED(forward, forward ? nativeIndex < text->b : nativeIndex <= text->b); @@ -332,7 +332,7 @@ static void textLatin1ContextAwareMoveInPriorContext(UText* text, int64_t native text->chunkOffset = std::min(offset < std::numeric_limits::max() ? static_cast(offset) : 0, text->chunkLength); } -static void textLatin1ContextAwareSwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textLatin1ContextAwareSwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(!text->chunkContents || text->chunkContents == text->pExtra); text->chunkContents = static_cast(text->q); diff --git a/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp b/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp index c39a065605d0e..cb81eb94b5975 100644 --- a/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp +++ b/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp @@ -65,7 +65,7 @@ static inline UTextProviderContext LEGACY_NODELETE textUTF16ContextAwareGetCurre return text->chunkContents == text->p ? UTextProviderContext::PrimaryContext : UTextProviderContext::PriorContext; } -static void textUTF16ContextAwareMoveInPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textUTF16ContextAwareMoveInPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(text->chunkContents == text->p); ASSERT_UNUSED(forward, forward ? nativeIndex >= text->b : nativeIndex > text->b); @@ -83,14 +83,14 @@ static void textUTF16ContextAwareMoveInPrimaryContext(UText* text, int64_t nativ text->chunkOffset = std::min(offset < std::numeric_limits::max() ? static_cast(offset) : 0, text->chunkLength); } -static void textUTF16ContextAwareSwitchToPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textUTF16ContextAwareSwitchToPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(!text->chunkContents || text->chunkContents == text->q); text->chunkContents = static_cast(text->p); textUTF16ContextAwareMoveInPrimaryContext(text, nativeIndex, nativeLength, forward); } -static void textUTF16ContextAwareMoveInPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textUTF16ContextAwareMoveInPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(text->chunkContents == text->q); ASSERT_UNUSED(forward, forward ? nativeIndex < text->b : nativeIndex <= text->b); @@ -105,7 +105,7 @@ static void textUTF16ContextAwareMoveInPriorContext(UText* text, int64_t nativeI text->chunkOffset = std::min(offset < std::numeric_limits::max() ? static_cast(offset) : 0, text->chunkLength); } -static void textUTF16ContextAwareSwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) +static void LEGACY_NODELETE textUTF16ContextAwareSwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward) { ASSERT(!text->chunkContents || text->chunkContents == text->p); text->chunkContents = static_cast(text->q); @@ -122,7 +122,7 @@ static inline int64_t LEGACY_NODELETE uTextUTF16ContextAwareNativeLength(UText* return text->a + text->b; } -static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) +static UBool LEGACY_NODELETE uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) { if (!text->context) return false; diff --git a/Source/WTF/wtf/threads/Signals.cpp b/Source/WTF/wtf/threads/Signals.cpp index d43943e315b72..7d91e27bce18b 100644 --- a/Source/WTF/wtf/threads/Signals.cpp +++ b/Source/WTF/wtf/threads/Signals.cpp @@ -407,7 +407,7 @@ void registerThreadForMachExceptionHandling(Thread& thread) #endif // HAVE(MACH_EXCEPTIONS) -inline std::tuple> toSystemSignal(Signal signal) +inline std::tuple> LEGACY_NODELETE toSystemSignal(Signal signal) { switch (signal) { case Signal::AccessFault: return std::make_tuple(SIGSEGV, SIGBUS);