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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191803
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-10-30 Chris Dumez <cdumez@apple.com>
+
+ 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 <cgarcia@igalia.com>
[GTK] Move the socket polling off the WorkQueue
#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>
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)); }