Changeset 227934 in webkit
- Timestamp:
- Jan 31, 2018 3:08:44 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r227932 r227934 1 2018-01-31 Ryosuke Niwa <rniwa@webkit.org> 2 3 Add a release assertion to ensure timers are deleted in the right thread 4 https://bugs.webkit.org/show_bug.cgi?id=182351 5 6 Reviewed by David Kilzer. 7 8 Added a relese assertion in ~TimerBase that the current thread is the one in which the timer was created. 9 10 We use canAccessThreadLocalDataForThread for this purpose since the condition is more complicated 11 when WebThread is being used. 12 13 * platform/Timer.cpp: 14 (WebCore::TimerBase::~TimerBase): Added the assertion. 15 * platform/Timer.h: 16 (WebCore::TimerBase::m_thread): Always store the current thread in a timer. 17 1 18 2018-01-31 Youenn Fablet <youenn@apple.com> 2 19 -
trunk/Source/WebCore/platform/Timer.cpp
r225985 r227934 192 192 TimerBase::~TimerBase() 193 193 { 194 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(canAccessThreadLocalDataForThread(m_thread.get())); 194 195 stop(); 195 196 ASSERT(!inHeap()); -
trunk/Source/WebCore/platform/Timer.h
r225985 r227934 104 104 Vector<TimerBase*>* m_cachedThreadGlobalTimerHeap { nullptr }; 105 105 106 #ifndef NDEBUG107 106 Ref<Thread> m_thread { Thread::current() }; 108 #endif109 107 110 108 friend class ThreadTimers;
Note: See TracChangeset
for help on using the changeset viewer.