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

Unified Diff: third_party/WebKit/Source/platform/Supplementable.h

Issue 2406333002: Remove CrossThreadPersistent::release (Closed)
Patch Set: added comment Created 4 years, 2 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/Supplementable.h
diff --git a/third_party/WebKit/Source/platform/Supplementable.h b/third_party/WebKit/Source/platform/Supplementable.h
index 89ec8b17ae08731c17a76e8ef382e231ef8e6241..de85ea740c560c57a332b4532a98d10595bd7316 100644
--- a/third_party/WebKit/Source/platform/Supplementable.h
+++ b/third_party/WebKit/Source/platform/Supplementable.h
@@ -120,28 +120,28 @@ class Supplementable : public virtual GarbageCollectedMixin {
public:
void provideSupplement(const char* key, Supplement<T>* supplement) {
#if DCHECK_IS_ON()
- DCHECK_EQ(m_threadId, currentThread());
+ DCHECK_EQ(m_creationThreadId, currentThread());
#endif
this->m_supplements.set(key, supplement);
}
void removeSupplement(const char* key) {
#if DCHECK_IS_ON()
- DCHECK_EQ(m_threadId, currentThread());
+ DCHECK_EQ(m_creationThreadId, currentThread());
#endif
this->m_supplements.remove(key);
}
Supplement<T>* requireSupplement(const char* key) {
#if DCHECK_IS_ON()
- DCHECK_EQ(m_threadId, currentThread());
+ DCHECK_EQ(m_attachedThreadId, currentThread());
#endif
return this->m_supplements.get(key);
}
void reattachThread() {
#if DCHECK_IS_ON()
- m_threadId = currentThread();
+ m_attachedThreadId = currentThread();
#endif
}
@@ -154,14 +154,16 @@ class Supplementable : public virtual GarbageCollectedMixin {
Supplementable()
#if DCHECK_IS_ON()
- : m_threadId(currentThread())
+ : m_attachedThreadId(currentThread()),
+ m_creationThreadId(currentThread())
#endif
{
}
#if DCHECK_IS_ON()
private:
- ThreadIdentifier m_threadId;
+ ThreadIdentifier m_attachedThreadId;
+ ThreadIdentifier m_creationThreadId;
#endif
};

Powered by Google App Engine
This is Rietveld 408576698