2017-11-03 16:37:04 +00:00
|
|
|
/*
|
2019-01-29 17:50:53 +00:00
|
|
|
* Copyright (C) 2017-2019 Apple Inc. All rights reserved.
|
2017-11-03 16:37:04 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-11-19 07:19:00 +00:00
|
|
|
#include <atomic>
|
2017-11-19 21:56:17 +00:00
|
|
|
#include <mutex>
|
2017-11-03 16:37:04 +00:00
|
|
|
#include <wtf/HashTraits.h>
|
2017-11-19 07:19:00 +00:00
|
|
|
#include <wtf/NeverDestroyed.h>
|
2019-05-27 20:30:51 +00:00
|
|
|
#include <wtf/text/TextStream.h>
|
2017-11-07 23:06:55 +00:00
|
|
|
#include <wtf/text/WTFString.h>
|
2017-11-03 16:37:04 +00:00
|
|
|
|
|
|
|
namespace WTF {
|
|
|
|
|
2019-01-29 17:50:53 +00:00
|
|
|
class ObjectIdentifierBase {
|
|
|
|
protected:
|
|
|
|
WTF_EXPORT_PRIVATE static uint64_t generateIdentifierInternal();
|
|
|
|
WTF_EXPORT_PRIVATE static uint64_t generateThreadSafeIdentifierInternal();
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T> class ObjectIdentifier : private ObjectIdentifierBase {
|
2017-11-03 16:37:04 +00:00
|
|
|
public:
|
2019-01-29 17:50:53 +00:00
|
|
|
static ObjectIdentifier generate()
|
|
|
|
{
|
2020-01-26 05:43:29 +00:00
|
|
|
RELEASE_ASSERT(!m_generationProtected);
|
2019-01-29 17:50:53 +00:00
|
|
|
return ObjectIdentifier { generateIdentifierInternal() };
|
|
|
|
}
|
|
|
|
|
|
|
|
static ObjectIdentifier generateThreadSafe()
|
|
|
|
{
|
2020-01-26 05:43:29 +00:00
|
|
|
RELEASE_ASSERT(!m_generationProtected);
|
2019-01-29 17:50:53 +00:00
|
|
|
return ObjectIdentifier { generateThreadSafeIdentifierInternal() };
|
|
|
|
}
|
|
|
|
|
2020-01-26 05:43:29 +00:00
|
|
|
static void enableGenerationProtection()
|
|
|
|
{
|
|
|
|
m_generationProtected = true;
|
|
|
|
}
|
|
|
|
|
2017-11-03 16:37:04 +00:00
|
|
|
ObjectIdentifier() = default;
|
|
|
|
|
|
|
|
ObjectIdentifier(HashTableDeletedValueType) : m_identifier(hashTableDeletedValue()) { }
|
|
|
|
bool isHashTableDeletedValue() const { return m_identifier == hashTableDeletedValue(); }
|
2021-05-18 02:33:16 +00:00
|
|
|
bool isValid() const { return isValidIdentifier(m_identifier); }
|
2017-11-03 16:37:04 +00:00
|
|
|
|
|
|
|
template<typename Encoder> void encode(Encoder& encoder) const
|
|
|
|
{
|
|
|
|
ASSERT(isValidIdentifier(m_identifier));
|
|
|
|
encoder << m_identifier;
|
|
|
|
}
|
2020-04-10 16:22:34 +00:00
|
|
|
|
2021-05-30 16:11:40 +00:00
|
|
|
template<typename Decoder> static std::optional<ObjectIdentifier> decode(Decoder& decoder)
|
2017-11-03 16:37:04 +00:00
|
|
|
{
|
2021-05-30 16:11:40 +00:00
|
|
|
std::optional<uint64_t> identifier;
|
2017-11-03 16:37:04 +00:00
|
|
|
decoder >> identifier;
|
2019-12-06 00:34:15 +00:00
|
|
|
if (!identifier || !isValidIdentifier(*identifier))
|
Next step toward using std::optional directly instead of through WTF::Optional typedef
https://bugs.webkit.org/show_bug.cgi?id=226280
Reviewed by Chris Dumez.
Source/JavaScriptCore:
* <many files>: Accept the renaming done by do-webcore-rename.
* yarr/YarrSyntaxChecker.cpp: Since the style checker complained about this file,
tweaked style to make it happy after the renaming done by do-webcore-rename, and
also hand-updated Optional to std::optional as long as we were touching it.
Source/WebCore:
* <many files>: Accept the renaming done by do-webcore-rename.
* Modules/webauthn/fido/DeviceRequestConverter.h: Since style checker complained
about the names of some arguments, fixed them, and also hand-updated Optional to
std::optional as long as we were touching it.
* loader/EmptyClients.cpp: Since style checker complained about the mix of
WEBCORE_EXPORT and inlined functions, moved them out of line, and
also hand-updated Optional to std::optional as long as we were touching it.
Also removed is<EmptyFrameLoaderClient>().
* loader/EmptyFrameLoaderClient.h: Ditto.
Source/WebCore/PAL:
* <many files>: Accept the renaming done by do-webcore-rename.
Source/WebDriver:
* <many files>: Accept the renaming done by do-webcore-rename.
Source/WebKit:
* <many files>: Accept the renaming done by do-webcore-rename.
Source/WebKitLegacy:
* Storage/StorageTracker.cpp:
(WebKit::StorageTracker::diskUsageForOrigin): Accept the renaming done by do-webcore-rename.
Source/WebKitLegacy/mac:
* <many files>: Accept the renaming done by do-webcore-rename.
Source/WebKitLegacy/win:
* <many files>: Accept the renaming done by do-webcore-rename.
Source/WTF:
* <many files>: Accept the renaming done by do-webcore-rename.
* wtf/Optional.h: Remove WTF::nullopt_t and WTF::makeOptional.
* wtf/URLHelpers.cpp:
(WTF::URLHelpers::mapHostName): Convert from nullopt to std::nullopt.
Tools:
* Scripts/do-webcore-rename: Use script to rename valueOr, WTF::nullopt, WTF::nullopt_t,
WTF::Optional, WTF::makeOptional, and makeOptional. Other renamings can't necessarily
be done by the script and so will be done in later passes.
* <many files>: Accept the renaming done by do-webcore-rename.
Canonical link: https://commits.webkit.org/238228@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-28 01:26:23 +00:00
|
|
|
return std::nullopt;
|
2017-11-03 16:37:04 +00:00
|
|
|
return ObjectIdentifier { *identifier };
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const ObjectIdentifier& other) const
|
|
|
|
{
|
|
|
|
return m_identifier == other.m_identifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const ObjectIdentifier& other) const
|
|
|
|
{
|
|
|
|
return m_identifier != other.m_identifier;
|
|
|
|
}
|
2017-11-18 02:27:13 +00:00
|
|
|
|
|
|
|
uint64_t toUInt64() const { return m_identifier; }
|
2018-03-14 22:52:09 +00:00
|
|
|
explicit operator bool() const { return m_identifier; }
|
|
|
|
|
2017-11-07 23:06:55 +00:00
|
|
|
String loggingString() const
|
|
|
|
{
|
|
|
|
return String::number(m_identifier);
|
|
|
|
}
|
2017-11-03 16:37:04 +00:00
|
|
|
|
2020-02-12 22:51:19 +00:00
|
|
|
struct MarkableTraits {
|
|
|
|
static bool isEmptyValue(ObjectIdentifier identifier)
|
|
|
|
{
|
|
|
|
return !identifier.m_identifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
static constexpr ObjectIdentifier emptyValue()
|
|
|
|
{
|
|
|
|
return ObjectIdentifier();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-11-03 16:37:04 +00:00
|
|
|
private:
|
2017-11-18 02:27:13 +00:00
|
|
|
template<typename U> friend ObjectIdentifier<U> makeObjectIdentifier(uint64_t);
|
2017-11-03 16:37:04 +00:00
|
|
|
friend struct HashTraits<ObjectIdentifier>;
|
|
|
|
template<typename U> friend struct ObjectIdentifierHash;
|
|
|
|
|
|
|
|
static uint64_t hashTableDeletedValue() { return std::numeric_limits<uint64_t>::max(); }
|
|
|
|
static bool isValidIdentifier(uint64_t identifier) { return identifier && identifier != hashTableDeletedValue(); }
|
|
|
|
|
2020-02-12 22:51:19 +00:00
|
|
|
explicit constexpr ObjectIdentifier(uint64_t identifier)
|
2017-11-03 16:37:04 +00:00
|
|
|
: m_identifier(identifier)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
uint64_t m_identifier { 0 };
|
2020-01-26 05:43:29 +00:00
|
|
|
inline static bool m_generationProtected { false };
|
2017-11-03 16:37:04 +00:00
|
|
|
};
|
|
|
|
|
2017-11-18 02:27:13 +00:00
|
|
|
template<typename T> inline ObjectIdentifier<T> makeObjectIdentifier(uint64_t identifier)
|
|
|
|
{
|
|
|
|
return ObjectIdentifier<T> { identifier };
|
|
|
|
}
|
|
|
|
|
Use Hasher more, remove IntegerHasher, fix hashing-related mistakes
https://bugs.webkit.org/show_bug.cgi?id=224138
Reviewed by Chris Dumez.
Source/JavaScriptCore:
* bytecode/BytecodeIndex.h:
(JSC::BytecodeIndex::hash const): Remove unneeded WTF prefix on call
to intHash.
* ftl/FTLAbstractHeap.h: Use HashTraits instead of WTF::GenericHashTraits.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::validateAIState): Remove unneeded WTF
prefix on call to intHash.
* wasm/WasmLLIntGenerator.cpp: Use HashTraits instead of WTF::GenericHashTraits.
Source/WebCore:
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::TriggerHash::hash): Use computeHash to
hash all the fields instead of a custom-written algorithm. The custom
algorithm had some magic numbers, repeatedly hashed hashes, and combined
hashes using exclusive or. The new one is almost certainly better.
* contentextensions/Term.h:
(WebCore::ContentExtensions::Term::CharacterSet::hash const):
Use computeHash to hash the boolean and the characters rather than
using intHash and pairIntHash.
* css/parser/CSSParserContext.cpp:
(WebCore::add): Moved the hashing here from the header. Fixed the
mistake where this was using & instead of | and so none of the booleans
were having any effect on the hash value.
* css/parser/CSSParserContext.h: Use WTF_MAKE_STRUCT_FAST_ALLOCATED so
we don't have to say public: explicitly. Also moved all the function
members to the bottom of the struct. This is typically preferred style
for structures as opposed to classes. Since the data members are the
primary interface, they are first, and all function members are secondary
and so they come after.
(WebCore::CSSParserContextHash::hash): Use convertHash instead of
a custom written hash function. The custom written function was combining
hahes using exclusive or, not a best practice, and also had a mistake
where it used & instead of | and so the "bits" local variable was always 0.
* html/FormController.cpp: Use HashTraits instead of WTF::GenericHashTraits.
* platform/encryptedmedia/CDMProxy.h: Removed unneedes includes.
* platform/graphics/Font.cpp: Changed CharacterFallbackMapKey into a
simple struct with no additional function members or static data members.
Changed CharacterFallbackMapKeyHash to use computeHash to calculate the
hash, instead of IntegerHasher. Probably better to hash the pointer of
the AtomString rather than hashing the hash, but either way, we should
have the best implementation for AtomString hashing in the Hasher class.
Added CharacterFallbackMapKeyHashTraits instead of using
SimpleClassHashTraits. Use the value U_SENTINEL for the UChar32 character,
which is the same as the -1 used before, but slightly clearer why it's OK.
(WebCore::Font::systemFallbackFontForCharacter const): Use HashMap::ensure
instead of HashMap::add to make the logic simpler.
* platform/graphics/Font.h: Use bool instead of uint8_t as the base type
for the No/Yes enumeration IsForPlatformFont.
* platform/graphics/FontCache.cpp: Removed unneeded "using namespace WTF",
which is not our best practice, especially given unified builds.
Changed FontPlatformDataCacheKey into a simple struct, removing all the
hash-related member functions. Also used struct-style naming for the
members without an "m_" prefix. Used the type FontFamilyName for the
family name, which means we will use FontCascadeDescription's system
for hashing and comparing family names for equality without having to
remember do to so explicitly. Changed FontPlatformDataCacheKeyHash to
use computeHash. The old version had unnecessarily complex logic to
handle Optional and was unnecessarily hashing hashes.
(WebCore::FontCache::cachedFontPlatformData): Renamed to remove "get"
from the function's name. Also use shorter argument and local variable
names that are single words, and updated since FontPlatformDataCacheKey
is now a struct without a constructor.
(WebCore::FontCache::fontForFamily): Use shorter names.
(WebCore::operator==): To compare two FontCascadeCacheKey objects,
use a simpler constructions, depending on the fact that Vector already
has an == operator and we are using FontFamilyName for the elements
of the vector, which has a correct == operator.
(WebCore::FontCascadeCacheKeyHash::hash): Use computeHash since
the FontFamilyName hashing is now correct, and we can rely on the
way Hasher knows how to iterate a collection.
(WebCore::FontCache::retrieveOrAddCachedFonts): Update since
FontCascadeCacheEntry is now a simple struct. Also use constexpr a bit.
(WebCore::FontCache::invalidate): Use copyToVectorOf<> to simplify the
code that calls fontCacheInvalidated on all the font selectors.
* platform/graphics/FontCache.h: Use "using" instead of "typedef".
Remove FontDescriptionKey::computeHash.
(WebCore::add): An overload of add for Hasher to include a
FontDescriptionKey in a hash, which just lists all the data members.
The old version did a hash of hashes, but that's not needed any more.
Updated FontDescriptionKeyHash to use the Hasher version of ComputeHash.
Added FontFamilyName. Change FontCascadeCacheKey to use a vector of
FontFamilyName instead of AtomString. In FontCascadeCacheEntry, use
WTF_MAKE_STRUCT_FAST_ALLOCATED instead of WTF_MAKE_FAST_ALLOCATED
and also got rid of the unneeeded constructor.
(WebCore::FontCascadeCacheKeyHashTraits::constructDeletedValue):
Use the deleted value of FontDescriptionKey.
(WebCore::FontCascadeCacheKeyHashTraits::isDeletedValue): Ditto.
Renamed getCachedFontPlatformData to just cachedFontPlatformData.
* platform/graphics/FontGenericFamilies.h: Use HashTraits instead of
WTF::GenericHashTraits.
* platform/graphics/FontSelectionAlgorithm.h:
(WebCore::FontSelectionRange::uniqueValue const): Deleted.
(WebCore::add): Add both the minimum and maximum values to the hash
separately instead of combining them. For now, this makes the way
they are hashed a bit inefficient, but that can be re-tightened up by
improving the algorithm of Hasher if we like. Should be fine for our
needs either way.
* platform/graphics/FontTaggedSettings.cpp:
(WebCore::FontFeatureSettings::hash const): Deleted.
(WebCore::FontVariationSettings::hash const): Deleted.
* platform/graphics/FontTaggedSettings.h: Added overloads of the
add(Hasher&) function for std::array<char, 4> and FontTaggedSetting<T>.
Got rid of many uses of pass by reference instead of value for FontTag,
since it fits into a 32-bit register and bth more source code and less
efficient to pass by value.
* platform/graphics/Gradient.cpp: Removed "using WTF::pairIntHash" since
that's now done in the WTF header.
* platform/graphics/cg/GraphicsContextCG.cpp: Ditto. Also removed
"using WTF::GenericHashTraits", which was unhelpful. The GenericHashTraits
template is only really needed when specializing HashTraits, which
already has to be done within the WTF namespace. In all other cases, we
should just use HashTraits instead.
* platform/graphics/cg/SubimageCacheWithTimer.h: Use HashTraits
instead of WTF::GenericHashTraits.
* platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
Move the data members to the top of the FontFamilySpecificationKey struct.
Removed unneeded computeHash function and WTF prefix from safeCFEqual.
(WebCore::FontFamilySpecificationKeyHash::hash): Call the Hasher version
of computeHash directly to hash the two items in this structure.
* platform/graphics/cocoa/SystemFontDatabaseCoreText.h:
(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):
Use computeHash instead of IntegerHasher. Also renamed the hash function
struct from CascadeListParameters::CascadeListParametersHash to
CascadeListParameters::Hash.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
Removed now-unneeded WTF prefixes from calls to safeCFEqual.
* rendering/TextAutoSizing.h: Use HashTraits instead of WTF::GenericHashTraits.
* rendering/style/RenderStyle.cpp:
(WebCore::computeFontHash): Use computeHash instead of IntegerHasher.
Still not great that we hash a hash here, but we can improve that later.
* workers/service/ServiceWorkerClientIdentifier.h:
(WebCore::ServiceWorkerClientIdentifier::decode): Removed unneeded
WTFMove on ObjectIdentifier, which are just integers, so move vs. copy
is not an important distinction.
(WebCore::ServiceWorkerClientIdentifier::hash const): Use computeHash
instead of combining intHash with StringHasher::hashMemory. This fixes
two mistakes: one is that there is no need to hash a hash. The second is
that intHash takes a 32-bit integer as its parameter, so high bits
of object identifiers were discarded unnecessarily.
* workers/service/ServiceWorkerContextData.h: Removed unneeded include.
* workers/service/ServiceWorkerGlobalScope.h: Added now-needed include
of URLHash.h, since we removed it from a widely-included header.
* workers/service/context/SWContextManager.h: Ditto.
* workers/service/server/ServiceWorkerThreadProxy.h: Ditto.
* workers/service/server/RegistrationStore.h: Ditto.
* workers/service/server/SWServer.h: Ditto.
* workers/service/server/SWServerToContextConnection.h: Ditto.
* workers/service/server/SWServerWorker.h: Ditto.
Source/WebKit:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h: Added now-needed include
of URLHash.h, since we removed it from a widely-included header.
* NetworkProcess/cache/NetworkCache.h:
(WebKit::NetworkCache::GlobalFrameID::hash const): Use computeHash
instead of combining intHash with StringHasher::hashMemory. This fixes
two mistakes: one is that there is no need to hash a hash. The second is
that intHash takes a 32-bit integer as its parameter, so high bits
of object identifiers were discarded unnecessarily.
* Scripts/webkit/messages.py: Added code so that if URL is in an argument, we include the
URLHash.h header. Would be better to just use URL.h and use URLHash.h only if it's a
HashMap<URL>, but currently the script does not distinguish those cases. This wasn't needed
before becuase a widely included header was always pulling in URLHash.h.
* Shared/API/Cocoa/WKBrowsingContextHandle.mm:
(-[WKBrowsingContextHandle hash]): Use computeHash instead of pairIntHash.
This fixes a mistake: pairIntHash takes two 32-bit integers, so high bits
of object identifiers were discarded unnecessarily.
* NetworkProcess/Storage/WebSWContextManagerConnection.h: Added now-needed include
of URLHash.h, since we removed it from a widely-included header.
Source/WebKitLegacy/mac:
* History/BinaryPropertyList.cpp: Use HashTraits instead of WTF::GenericHashTraits.
Source/WTF:
* wtf/HashFunctions.h: Export intHash and pairIntHash to the global namespace
so they can be called without an explicit WTF prefix. This follows the usual
WTF design pattern given that these functions are intended for use outside WTF.
* wtf/Hasher.h: Deleted IntegerHasher.
(WTF::add): Added overloads for String, AtomString, and URL.
* wtf/ObjectIdentifier.h:
(WTF::add): Added a Hasher overload for any ObjectIdentifier.
* wtf/RetainPtr.h: Export safeCFEqual and safeCFHash to the global namespace
so they can be called without an explicit WTF prefix. This follows the usual
WTF design pattern given that these functions are intended for use outside WTF.
* wtf/VectorHash.h: Removed the VectorHash template, instead just specializing
DefaultHash. Use computeHash to hash the contents of the vector instead of
hashing the hashes of the items in the vector. This is better in general and
better for the one case where we are currently using this, for a Vector<int>.
We want to hash all the integers rather than hashing hashes of all the integers.
In the future, this means the elements of the Vector need to be hashable using
the Hasher machinery. The old requirement was the the elements had a DefaultHash.
Canonical link: https://commits.webkit.org/236286@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-08 02:19:20 +00:00
|
|
|
template<typename T> inline void add(Hasher& hasher, ObjectIdentifier<T> identifier)
|
|
|
|
{
|
|
|
|
add(hasher, identifier.toUInt64());
|
|
|
|
}
|
|
|
|
|
2017-11-03 16:37:04 +00:00
|
|
|
template<typename T> struct ObjectIdentifierHash {
|
|
|
|
static unsigned hash(const ObjectIdentifier<T>& identifier) { return intHash(identifier.m_identifier); }
|
|
|
|
static bool equal(const ObjectIdentifier<T>& a, const ObjectIdentifier<T>& b) { return a == b; }
|
2019-09-18 00:36:19 +00:00
|
|
|
static constexpr bool safeToCompareToEmptyOrDeleted = true;
|
2017-11-03 16:37:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T> struct HashTraits<ObjectIdentifier<T>> : SimpleClassHashTraits<ObjectIdentifier<T>> { };
|
|
|
|
|
2020-07-17 00:33:37 +00:00
|
|
|
template<typename T> struct DefaultHash<ObjectIdentifier<T>> : ObjectIdentifierHash<T> { };
|
2017-11-03 16:37:04 +00:00
|
|
|
|
2019-05-27 20:30:51 +00:00
|
|
|
template<typename T>
|
|
|
|
TextStream& operator<<(TextStream& ts, const ObjectIdentifier<T>& identifier)
|
|
|
|
{
|
|
|
|
ts << identifier.toUInt64();
|
|
|
|
return ts;
|
|
|
|
}
|
|
|
|
|
2017-11-03 16:37:04 +00:00
|
|
|
} // namespace WTF
|
|
|
|
|
|
|
|
using WTF::ObjectIdentifier;
|
2017-11-18 02:27:13 +00:00
|
|
|
using WTF::makeObjectIdentifier;
|