Skip to content

Commit

Permalink
Remove WTF::LegacyIdentified now that it is no longer used
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270766

Reviewed by Darin Adler.

* Source/WTF/wtf/Identified.h:
(WTF::LegacyIdentified::LegacyIdentified): Deleted.
(WTF::LegacyIdentified::generateIdentifier): Deleted.

Canonical link: https://commits.webkit.org/275900@main
  • Loading branch information
cdumez committed Mar 11, 2024
1 parent 711120e commit ad04066
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions Source/WTF/wtf/Identified.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
* Copyright (C) 2017-2024 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand All @@ -25,11 +25,6 @@

#pragma once

#include <atomic>
#include <type_traits>
#include <wtf/NeverDestroyed.h>
#include <wtf/ObjectIdentifier.h>
#include <wtf/ThreadAssertions.h>
#include <wtf/UUID.h>

namespace WTF {
Expand Down Expand Up @@ -65,33 +60,6 @@ class Identified : public IdentifiedBase<ObjectIdentifierType> {
Identified& operator=(const Identified&) = default;
};

template <typename T>
class LegacyIdentified : public IdentifiedBase<uint64_t> {
protected:
LegacyIdentified()
: IdentifiedBase<uint64_t>(generateIdentifier())
{
}

LegacyIdentified(const LegacyIdentified&) = default;
LegacyIdentified& operator=(const LegacyIdentified&) = default;

explicit LegacyIdentified(uint64_t identifier)
: IdentifiedBase<uint64_t>(identifier)
{
}

private:
static uint64_t generateIdentifier()
{
static NeverDestroyed<ThreadLikeAssertion> initializationThread;
assertIsCurrent(initializationThread); // You should be using ThreadSafeIdentified if you hit this assertion.

static uint64_t currentIdentifier;
return ++currentIdentifier;
}
};

template <typename T>
class UUIDIdentified : public IdentifiedBase<UUID> {
protected:
Expand All @@ -106,5 +74,4 @@ class UUIDIdentified : public IdentifiedBase<UUID> {
} // namespace WTF

using WTF::Identified;
using WTF::LegacyIdentified;
using WTF::UUIDIdentified;

0 comments on commit ad04066

Please sign in to comment.