Skip to content

Commit 16a7f29

Browse files
committed
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
1 parent ae5d190 commit 16a7f29

40 files changed

Lines changed: 101 additions & 101 deletions

‎Source/WTF/wtf/BitVector.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,14 +506,14 @@ class BitVector final {
506506

507507
WTF_EXPORT_PRIVATE void mergeSlow(const BitVector& other);
508508
WTF_EXPORT_PRIVATE void filterSlow(const BitVector& other);
509-
WTF_EXPORT_PRIVATE void excludeSlow(const BitVector& other);
509+
WTF_EXPORT_PRIVATE void LEGACY_NODELETE excludeSlow(const BitVector& other);
510510

511511
WTF_EXPORT_PRIVATE size_t LEGACY_NODELETE bitCountSlow() const;
512512
WTF_EXPORT_PRIVATE bool isEmptySlow() const;
513513

514514
WTF_EXPORT_PRIVATE bool equalsSlowCase(const BitVector& other) const;
515515
bool equalsSlowCaseFast(const BitVector& other) const;
516-
bool equalsSlowCaseSimple(const BitVector& other) const;
516+
bool LEGACY_NODELETE equalsSlowCaseSimple(const BitVector& other) const;
517517
WTF_EXPORT_PRIVATE uintptr_t LEGACY_NODELETE hashSlowCase() const;
518518

519519
std::span<uintptr_t> words() LIFETIME_BOUND

‎Source/WTF/wtf/ConcurrentPtrHashSet.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ class ConcurrentPtrHashSet final {
173173
}
174174

175175
WTF_EXPORT_PRIVATE bool addSlow(Table* table, unsigned mask, unsigned startIndex, unsigned index, void* ptr);
176-
WTF_EXPORT_PRIVATE bool containsImplSlow(void* ptr) const;
177-
WTF_EXPORT_PRIVATE size_t sizeSlow() const;
176+
WTF_EXPORT_PRIVATE bool LEGACY_NODELETE containsImplSlow(void* ptr) const;
177+
WTF_EXPORT_PRIVATE size_t LEGACY_NODELETE sizeSlow() const;
178178

179179
void resizeIfNecessary();
180180
bool resizeAndAdd(void* ptr);

‎Source/WTF/wtf/CurrentThread.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
namespace WTF {
3232

3333
WTF_EXPORT_PRIVATE uint32_t currentThreadID();
34-
WTF_EXPORT_PRIVATE bool currentThreadMayBeGCThread();
34+
WTF_EXPORT_PRIVATE bool LEGACY_NODELETE currentThreadMayBeGCThread();
3535

3636
} // namespace WTF
3737

‎Source/WTF/wtf/Int128.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ constexpr UInt128Impl operator>>(UInt128Impl lhs, int amount);
494494
constexpr UInt128Impl operator+(UInt128Impl lhs, UInt128Impl rhs);
495495
constexpr UInt128Impl operator-(UInt128Impl lhs, UInt128Impl rhs);
496496
constexpr UInt128Impl operator*(UInt128Impl lhs, UInt128Impl rhs);
497-
WTF_EXPORT_PRIVATE UInt128Impl operator/(UInt128Impl lhs, UInt128Impl rhs);
498-
WTF_EXPORT_PRIVATE UInt128Impl operator%(UInt128Impl lhs, UInt128Impl rhs);
497+
WTF_EXPORT_PRIVATE UInt128Impl LEGACY_NODELETE operator/(UInt128Impl lhs, UInt128Impl rhs);
498+
WTF_EXPORT_PRIVATE UInt128Impl LEGACY_NODELETE operator%(UInt128Impl lhs, UInt128Impl rhs);
499499

500500
inline UInt128Impl& UInt128Impl::operator<<=(int amount) {
501501
*this = *this << amount;
@@ -830,8 +830,8 @@ constexpr Int128Impl operator-(Int128Impl v);
830830
constexpr Int128Impl operator+(Int128Impl lhs, Int128Impl rhs);
831831
constexpr Int128Impl operator-(Int128Impl lhs, Int128Impl rhs);
832832
constexpr Int128Impl operator*(Int128Impl lhs, Int128Impl rhs);
833-
WTF_EXPORT_PRIVATE Int128Impl operator/(Int128Impl lhs, Int128Impl rhs);
834-
WTF_EXPORT_PRIVATE Int128Impl operator%(Int128Impl lhs, Int128Impl rhs);
833+
WTF_EXPORT_PRIVATE Int128Impl LEGACY_NODELETE operator/(Int128Impl lhs, Int128Impl rhs);
834+
WTF_EXPORT_PRIVATE Int128Impl LEGACY_NODELETE operator%(Int128Impl lhs, Int128Impl rhs);
835835
constexpr Int128Impl operator|(Int128Impl lhs, Int128Impl rhs);
836836
constexpr Int128Impl operator&(Int128Impl lhs, Int128Impl rhs);
837837
constexpr Int128Impl operator^(Int128Impl lhs, Int128Impl rhs);

‎Source/WTF/wtf/JSONValues.h‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted<Value>, public NoVirtualDestr
6262
void operator delete(Value*, std::destroying_delete_t);
6363
bool operator!() const;
6464

65-
static Ref<Value> null();
66-
static Ref<Value> create(bool);
67-
static Ref<Value> create(int);
68-
static Ref<Value> create(double);
69-
static Ref<Value> create(const String&);
65+
static Ref<Value> LEGACY_NODELETE null();
66+
static Ref<Value> LEGACY_NODELETE create(bool);
67+
static Ref<Value> LEGACY_NODELETE create(int);
68+
static Ref<Value> LEGACY_NODELETE create(double);
69+
static Ref<Value> LEGACY_NODELETE create(const String&);
7070
template<class T>
7171
static Ref<Value> create(T) = delete;
7272

@@ -96,10 +96,10 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted<Value>, public NoVirtualDestr
9696
}
9797
bool isNull() const { return std::holds_alternative<std::monostate>(m_value); }
9898

99-
std::optional<bool> asBoolean() const;
100-
std::optional<int> asInteger() const;
101-
std::optional<double> asDouble() const;
102-
const String& asString() const;
99+
std::optional<bool> LEGACY_NODELETE asBoolean() const;
100+
std::optional<int> LEGACY_NODELETE asInteger() const;
101+
std::optional<double> LEGACY_NODELETE asDouble() const;
102+
const String& LEGACY_NODELETE asString() const;
103103
RefPtr<Value> asValue();
104104
RefPtr<Object> asObject();
105105
RefPtr<const Object> asObject() const;
@@ -116,8 +116,8 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted<Value>, public NoVirtualDestr
116116
void dump(PrintStream&) const;
117117

118118
// FIXME: <http://webkit.org/b/179847> remove these functions when legacy InspectorObject symbols are no longer needed.
119-
bool asDouble(double&) const;
120-
bool asInteger(int&) const;
119+
bool LEGACY_NODELETE asDouble(double&) const;
120+
bool LEGACY_NODELETE asInteger(int&) const;
121121
bool asString(String&) const;
122122

123123
size_t memoryCost() const;
@@ -158,7 +158,7 @@ class WTF_EXPORT_PRIVATE Value : public RefCounted<Value>, public NoVirtualDestr
158158

159159
template<typename Visitor> constexpr decltype(auto) visitDerived(NOESCAPE const Visitor&);
160160
template<typename Visitor> constexpr decltype(auto) visitDerived(NOESCAPE const Visitor&) const;
161-
size_t memoryCostImpl() const;
161+
size_t LEGACY_NODELETE memoryCostImpl() const;
162162
void writeJSONImpl(StringBuilder& output) const;
163163

164164
private:
@@ -229,7 +229,7 @@ class ObjectBase : public Value {
229229

230230
class Object : public ObjectBase {
231231
public:
232-
static WTF_EXPORT_PRIVATE Ref<Object> create();
232+
static WTF_EXPORT_PRIVATE Ref<Object> LEGACY_NODELETE create();
233233

234234
// This class expected non-cyclic values, as we cannot serialize cycles in JSON.
235235
using ObjectBase::setBoolean;
@@ -309,7 +309,7 @@ class WTF_EXPORT_PRIVATE ArrayBase : public Value {
309309

310310
class Array final : public ArrayBase {
311311
public:
312-
static WTF_EXPORT_PRIVATE Ref<Array> create();
312+
static WTF_EXPORT_PRIVATE Ref<Array> LEGACY_NODELETE create();
313313

314314
// This class expected non-cyclic values, as we cannot serialize cycles in JSON.
315315
using ArrayBase::pushBoolean;

‎Source/WTF/wtf/LogChannels.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class LogChannels {
3939
virtual ~LogChannels() = default;
4040
virtual String logLevelString() = 0;
4141

42-
WTF_EXPORT_PRIVATE bool isLogChannelEnabled(const String& name);
43-
WTF_EXPORT_PRIVATE void setLogChannelToAccumulate(const String& name);
42+
WTF_EXPORT_PRIVATE bool LEGACY_NODELETE isLogChannelEnabled(const String& name);
43+
WTF_EXPORT_PRIVATE void LEGACY_NODELETE setLogChannelToAccumulate(const String& name);
4444
WTF_EXPORT_PRIVATE void clearAllLogChannelsToAccumulate();
4545
WTF_EXPORT_PRIVATE void initializeLogChannelsIfNecessary(std::optional<String> = std::nullopt);
46-
WTF_EXPORT_PRIVATE WTFLogChannel* getLogChannel(const String& name);
46+
WTF_EXPORT_PRIVATE WTFLogChannel* LEGACY_NODELETE getLogChannel(const String& name);
4747

4848
protected:
4949
Vector<WTFLogChannel*> m_logChannels;

‎Source/WTF/wtf/MediaTime.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class WTF_EXPORT_PRIVATE MediaTime final {
5959
MediaTime(const MediaTime&) = default;
6060

6161
static MediaTime LEGACY_NODELETE createWithFloat(float floatTime);
62-
static MediaTime createWithFloat(float floatTime, uint32_t timeScale);
62+
static MediaTime LEGACY_NODELETE createWithFloat(float floatTime, uint32_t timeScale);
6363
static MediaTime LEGACY_NODELETE createWithDouble(double doubleTime);
6464
static MediaTime createWithDouble(double doubleTime, uint32_t timeScale);
6565
static MediaTime createWithSeconds(Seconds seconds) { return createWithDouble(seconds.value()); }
@@ -76,9 +76,9 @@ class WTF_EXPORT_PRIVATE MediaTime final {
7676
MediaTime LEGACY_NODELETE operator-() const;
7777
MediaTime operator*(int32_t) const;
7878
bool LEGACY_NODELETE operator!() const;
79-
explicit operator bool() const;
79+
explicit LEGACY_NODELETE operator bool() const;
8080

81-
WTF_EXPORT_PRIVATE friend std::partial_ordering operator<=>(const MediaTime&, const MediaTime&);
81+
WTF_EXPORT_PRIVATE friend std::partial_ordering LEGACY_NODELETE operator<=>(const MediaTime&, const MediaTime&);
8282
friend bool operator==(const MediaTime& a, const MediaTime& b) { return is_eq(a <=> b); }
8383
bool LEGACY_NODELETE isBetween(const MediaTime&, const MediaTime&) const;
8484

‎Source/WTF/wtf/ParallelHelperPool.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class ParallelHelperPool final : public ThreadSafeRefCounted<ParallelHelperPool>
6969
WTF_MAKE_TZONE_ALLOCATED(ParallelHelperPool);
7070
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(ParallelHelperPool);
7171
public:
72-
WTF_EXPORT_PRIVATE static Ref<ParallelHelperPool> create(ASCIILiteral threadName);
72+
WTF_EXPORT_PRIVATE static Ref<ParallelHelperPool> LEGACY_NODELETE create(ASCIILiteral threadName);
7373
WTF_EXPORT_PRIVATE ~ParallelHelperPool();
7474

7575
WTF_EXPORT_PRIVATE void ensureThreads(unsigned numThreads);

‎Source/WTF/wtf/ParkingLot.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ IGNORE_CLANG_WARNINGS_END
327327
}
328328
}
329329

330-
void unlockHashtable(const Vector<Bucket*>& buckets)
330+
void LEGACY_NODELETE unlockHashtable(const Vector<Bucket*>& buckets)
331331
{
332332
IGNORE_CLANG_WARNINGS_BEGIN("thread-safety")
333333
for (Bucket* bucket : buckets)

‎Source/WTF/wtf/PlainGregorianDateTime.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class PlainGregorianDateTime {
122122
// Decomposes a time value that the caller has already shifted into the zone the fields should
123123
// read in, which is why there is no offset to pass: utcOffsetInMinute and isDST come out zero.
124124
// Returns a value that converts to false for input outside the representable range.
125-
WTF_EXPORT_PRIVATE static PlainGregorianDateTime fromMilliseconds(double millisecondsFromEpoch);
125+
WTF_EXPORT_PRIVATE static PlainGregorianDateTime LEGACY_NODELETE fromMilliseconds(double millisecondsFromEpoch);
126126

127127
WTF_EXPORT_PRIVATE static PlainGregorianDateTime currentLocalTime();
128128

0 commit comments

Comments
 (0)