Title: [191803] trunk/Source/WTF
Revision
191803
Author
[email protected]
Date
2015-10-30 11:55:36 -0700 (Fri, 30 Oct 2015)

Log Message

Regression(r191673): Crash in RunLoopTimer::schedule()
https://bugs.webkit.org/show_bug.cgi?id=150723

Reviewed by Anders Carlsson.

We were crashing in RunLoopTimer::schedule() when iterating over the
SchedulePairHashSet. The reason is that we were passing this
SchedulePairHashSet from the main thread to a background thread, which
was not safe because the SchedulePair objects inside the HashSet were
not ThreadSafeRefCounted. This patch makes them ThreadSafeRefCounted.

* wtf/SchedulePair.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (191802 => 191803)


--- trunk/Source/WTF/ChangeLog	2015-10-30 18:52:08 UTC (rev 191802)
+++ trunk/Source/WTF/ChangeLog	2015-10-30 18:55:36 UTC (rev 191803)
@@ -1,3 +1,18 @@
+2015-10-30  Chris Dumez  <[email protected]>
+
+        Regression(r191673): Crash in RunLoopTimer::schedule()
+        https://bugs.webkit.org/show_bug.cgi?id=150723
+
+        Reviewed by Anders Carlsson.
+
+        We were crashing in RunLoopTimer::schedule() when iterating over the
+        SchedulePairHashSet. The reason is that we were passing this
+        SchedulePairHashSet from the main thread to a background thread, which
+        was not safe because the SchedulePair objects inside the HashSet were
+        not ThreadSafeRefCounted. This patch makes them ThreadSafeRefCounted.
+
+        * wtf/SchedulePair.h:
+
 2015-10-30  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Move the socket polling off the WorkQueue

Modified: trunk/Source/WTF/wtf/SchedulePair.h (191802 => 191803)


--- trunk/Source/WTF/wtf/SchedulePair.h	2015-10-30 18:52:08 UTC (rev 191802)
+++ trunk/Source/WTF/wtf/SchedulePair.h	2015-10-30 18:55:36 UTC (rev 191803)
@@ -30,8 +30,8 @@
 #define SchedulePair_h
 
 #include <wtf/HashSet.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RetainPtr.h>
+#include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
@@ -41,7 +41,7 @@
 
 namespace WTF {
 
-class SchedulePair : public RefCounted<SchedulePair> {
+class SchedulePair : public ThreadSafeRefCounted<SchedulePair> {
 public:
     static Ref<SchedulePair> create(CFRunLoopRef runLoop, CFStringRef mode) { return adoptRef(*new SchedulePair(runLoop, mode)); }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to