Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: third_party/WebKit/Source/platform/heap/Persistent.h

Issue 2028433003: Revert of Allow CrossThreadPersistent in collections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/Persistent.h
diff --git a/third_party/WebKit/Source/platform/heap/Persistent.h b/third_party/WebKit/Source/platform/heap/Persistent.h
index 62ae0943988b600eeec328b449920b31dc98c31e..8aa3708af2df13521feaaa734413965cde3ac299 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -77,19 +77,11 @@
checkPointer();
}
- PersistentBase(WTF::HashTableDeletedValueType) : m_raw(reinterpret_cast<T*>(-1))
- {
- initialize();
- checkPointer();
- }
-
~PersistentBase()
{
uninitialize();
m_raw = nullptr;
}
-
- bool isHashTableDeletedValue() const { return m_raw == reinterpret_cast<T*>(-1); }
template<typename VisitorDispatcher>
void trace(VisitorDispatcher visitor)
@@ -192,7 +184,7 @@
void initialize()
{
ASSERT(!m_persistentNode);
- if (!m_raw || isHashTableDeletedValue())
+ if (!m_raw)
return;
TraceCallback traceCallback = TraceMethodDelegate<PersistentBase<T, weaknessConfiguration, crossThreadnessConfiguration>, &PersistentBase<T, weaknessConfiguration, crossThreadnessConfiguration>::trace>::trampoline;
@@ -229,7 +221,7 @@
void checkPointer()
{
#if ENABLE(ASSERT) && defined(ADDRESS_SANITIZER)
- if (!m_raw || isHashTableDeletedValue())
+ if (!m_raw)
return;
// ThreadHeap::isHeapObjectAlive(m_raw) checks that m_raw is a traceable
@@ -271,7 +263,6 @@
Persistent(const Persistent<U>& other) : Parent(other) { }
template<typename U>
Persistent(const Member<U>& other) : Parent(other) { }
- Persistent(WTF::HashTableDeletedValueType x) : Parent(x) { }
template<typename U>
Persistent& operator=(U* other)
@@ -381,7 +372,6 @@
CrossThreadPersistent(const CrossThreadPersistent<U>& other) : Parent(other) { }
template<typename U>
CrossThreadPersistent(const Member<U>& other) : Parent(other) { }
- CrossThreadPersistent(WTF::HashTableDeletedValueType x) : Parent(x) { }
T* atomicGet() { return Parent::atomicGet(); }
@@ -692,28 +682,6 @@
namespace WTF {
-template <typename T>
-struct PersistentHash : MemberHash<T> {
- STATIC_ONLY(PersistentHash);
-};
-
-template <typename T>
-struct CrossThreadPersistentHash : MemberHash<T> {
- STATIC_ONLY(CrossThreadPersistentHash);
-};
-
-template <typename T>
-struct DefaultHash<blink::Persistent<T>> {
- STATIC_ONLY(DefaultHash);
- using Hash = PersistentHash<T>;
-};
-
-template <typename T>
-struct DefaultHash<blink::CrossThreadPersistent<T>> {
- STATIC_ONLY(DefaultHash);
- using Hash = CrossThreadPersistentHash<T>;
-};
-
template<typename T>
struct ParamStorageTraits<blink::WeakPersistentThisPointer<T>> {
STATIC_ONLY(ParamStorageTraits);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698