http://trac.webkit.org/changeset/149338
https://bugs.webkit.org/show_bug.cgi?id=115409
Broke layout/perf/API tests on non-Mac:
ThreadSpecific<RefPtr<RunLoop>> does not initialize RunLoop
(Requested by rakuco on #webkit).
* platform/RunLoop.cpp:
(WebCore::RunLoop::current):
* platform/RunLoop.h:
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::initializeMainRunLoop):
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/gtk/RunLoopGtk.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/win/RunLoopWin.cpp:
(WebCore::RunLoop::~RunLoop):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149358
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-04-30 Commit Queue <rniwa@webkit.org>
+
+ Unreviewed, rolling out r149338.
+ http://trac.webkit.org/changeset/149338
+ https://bugs.webkit.org/show_bug.cgi?id=115409
+
+ Broke layout/perf/API tests on non-Mac:
+ ThreadSpecific<RefPtr<RunLoop>> does not initialize RunLoop
+ (Requested by rakuco on #webkit).
+
+ * platform/RunLoop.cpp:
+ (WebCore::RunLoop::current):
+ * platform/RunLoop.h:
+ (RunLoop):
+ * platform/cf/RunLoopCF.cpp:
+ (WebCore::RunLoop::initializeMainRunLoop):
+ (WebCore::RunLoop::current):
+ (WebCore::RunLoop::~RunLoop):
+ * platform/efl/RunLoopEfl.cpp:
+ (WebCore::RunLoop::~RunLoop):
+ * platform/gtk/RunLoopGtk.cpp:
+ (WebCore::RunLoop::~RunLoop):
+ * platform/win/RunLoopWin.cpp:
+ (WebCore::RunLoop::~RunLoop):
+
2013-04-30 Alberto Garcia <agarcia@igalia.com>
ImageBufferData: add BlackBerry header
RunLoop* RunLoop::current()
{
- DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RefPtr<RunLoop> >, runLoopData, ());
- return runLoopData->get();
+ DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop>, runLoopData, ());
+ return &*runLoopData;
}
RunLoop* RunLoop::main()
namespace WebCore {
-class RunLoop : public ThreadSafeRefCounted<RunLoop> {
+class RunLoop {
public:
// Must be called from the main thread (except for the Mac platform, where it
// can be called from any thread).
static RunLoop* current();
static RunLoop* main();
- ~RunLoop();
void dispatch(const Function<void()>&);
friend class WTF::ThreadSpecific<RunLoop>;
RunLoop();
+ ~RunLoop();
void performWork();
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
- s_mainRunLoop = adoptRef(new RunLoop(CFRunLoopGetMain())).leakRef();
+ s_mainRunLoop = new RunLoop(CFRunLoopGetMain());
});
}
if (pthread_main_np())
return RunLoop::main();
- DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RefPtr<RunLoop> >, runLoopData, ());
- return runLoopData->get();
+ DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop>, runLoopData, ());
+ return &*runLoopData;
}
RunLoop* RunLoop::main()
RunLoop::~RunLoop()
{
- ASSERT(this != main());
-
+ // FIXME: Tear down the work item queue here.
CFRunLoopSourceInvalidate(m_runLoopSource);
CFRelease(m_runLoopSource);
}
RunLoop::~RunLoop()
{
- ASSERT(this != main());
}
void RunLoop::run()
RunLoop::~RunLoop()
{
- ASSERT(this != main());
-
for (int i = m_runLoopMainLoops.size() - 1; i >= 0; --i) {
if (!g_main_loop_is_running(m_runLoopMainLoops[i].get()))
continue;
RunLoop::~RunLoop()
{
// FIXME: Tear down the work item queue here.
- ASSERT(this != main());
}
void RunLoop::wakeUp()