Title: [242003] releases/WebKitGTK/webkit-2.22/Source/WebCore
Revision
242003
Author
ape...@igalia.com
Date
2019-02-23 17:06:41 -0800 (Sat, 23 Feb 2019)

Log Message

Merged r227934 - Add a release assertion to ensure timers are deleted in the right thread
https://bugs.webkit.org/show_bug.cgi?id=182351

Reviewed by David Kilzer.

Added a relese assertion in ~TimerBase that the current thread is the one in which the timer was created.

We use canAccessThreadLocalDataForThread for this purpose since the condition is more complicated
when WebThread is being used.

* platform/Timer.cpp:
(WebCore::TimerBase::~TimerBase): Added the assertion.
* platform/Timer.h:
(WebCore::TimerBase::m_thread): Always store the current thread in a timer.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (242002 => 242003)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2019-02-24 01:06:34 UTC (rev 242002)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2019-02-24 01:06:41 UTC (rev 242003)
@@ -1,3 +1,20 @@
+2018-01-31  Ryosuke Niwa  <rn...@webkit.org>
+
+        Add a release assertion to ensure timers are deleted in the right thread
+        https://bugs.webkit.org/show_bug.cgi?id=182351
+
+        Reviewed by David Kilzer.
+
+        Added a relese assertion in ~TimerBase that the current thread is the one in which the timer was created.
+
+        We use canAccessThreadLocalDataForThread for this purpose since the condition is more complicated
+        when WebThread is being used.
+
+        * platform/Timer.cpp:
+        (WebCore::TimerBase::~TimerBase): Added the assertion.
+        * platform/Timer.h:
+        (WebCore::TimerBase::m_thread): Always store the current thread in a timer.
+
 2019-01-09  Ryosuke Niwa  <rn...@webkit.org>
 
         ThreadTimers should not store a raw pointer in its heap

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/Timer.cpp (242002 => 242003)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/Timer.cpp	2019-02-24 01:06:34 UTC (rev 242002)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/Timer.cpp	2019-02-24 01:06:41 UTC (rev 242003)
@@ -262,6 +262,7 @@
 {
     ASSERT(canAccessThreadLocalDataForThread(m_thread.get()));
     RELEASE_ASSERT(canAccessThreadLocalDataForThread(m_thread.get()) || shouldSuppressThreadSafetyCheck());
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(canAccessThreadLocalDataForThread(m_thread.get()));
     stop();
     ASSERT(!inHeap());
     if (m_heapItem) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to