Use RunLoop objects through references instead of pointers
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 18:47:33 +0000 (18:47 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 18:47:33 +0000 (18:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130313

Reviewed by Andreas Kling.

Source/WebKit2:

Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
return RunLoop reference instead of a pointer.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didClose):
(WebKit::DatabaseProcess::didReceiveInvalidMessage):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::postMainThreadTask):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::getOrCreate):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::~SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::stopRunLoop):
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::NP_Deallocate):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::tryPreexistingProcess):
(WebKit::createProcess):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getOrigins):
(WebKit::StorageManager::getStorageDetailsByOrigin):
* UIProcess/Storage/StorageManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::unprotectPluginFromDestruction):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):

Source/WTF:

Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead
of a pointer. RunLoop::Holder now uses a Ref<RunLoop> member. Timer and TimerBase
constructors take in a RunLoop reference, with TimerBase now storing a RunLoop
reference member instead of a pointer. Platform-specific bits of the RunLoop
class are updated accordingly.

* wtf/RunLoop.cpp:
(WTF::RunLoop::Holder::Holder):
(WTF::RunLoop::Holder::runLoop):
(WTF::RunLoop::initializeMainRunLoop):
(WTF::RunLoop::current):
(WTF::RunLoop::main):
(WTF::RunLoop::isMain):
* wtf/RunLoop.h:
(WTF::RunLoop::Timer::Timer):
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/win/RunLoopWin.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):

Tools:

Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
return RunLoop reference instead of a pointer.

* TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp:
(loadedCallback):
(clickedCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165746 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/RunLoop.cpp
Source/WTF/wtf/RunLoop.h
Source/WTF/wtf/cf/RunLoopCF.cpp
Source/WTF/wtf/efl/RunLoopEfl.cpp
Source/WTF/wtf/gtk/RunLoopGtk.cpp
Source/WTF/wtf/win/RunLoopWin.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/Platform/IPC/Connection.cpp
Source/WebKit2/Platform/IPC/Connection.h
Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp
Source/WebKit2/Shared/ChildProcess.cpp
Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp
Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit2/UIProcess/Storage/StorageManager.cpp
Source/WebKit2/UIProcess/Storage/StorageManager.h
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp

index 463278c..7032d56 100644 (file)
@@ -1,3 +1,41 @@
+2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        Use RunLoop objects through references instead of pointers
+        https://bugs.webkit.org/show_bug.cgi?id=130313
+
+        Reviewed by Andreas Kling.
+
+        Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead
+        of a pointer. RunLoop::Holder now uses a Ref<RunLoop> member. Timer and TimerBase
+        constructors take in a RunLoop reference, with TimerBase now storing a RunLoop
+        reference member instead of a pointer. Platform-specific bits of the RunLoop
+        class are updated accordingly.
+
+        * wtf/RunLoop.cpp:
+        (WTF::RunLoop::Holder::Holder):
+        (WTF::RunLoop::Holder::runLoop):
+        (WTF::RunLoop::initializeMainRunLoop):
+        (WTF::RunLoop::current):
+        (WTF::RunLoop::main):
+        (WTF::RunLoop::isMain):
+        * wtf/RunLoop.h:
+        (WTF::RunLoop::Timer::Timer):
+        * wtf/cf/RunLoopCF.cpp:
+        (WTF::RunLoop::run):
+        (WTF::RunLoop::TimerBase::TimerBase):
+        (WTF::RunLoop::TimerBase::start):
+        * wtf/efl/RunLoopEfl.cpp:
+        (WTF::RunLoop::TimerBase::TimerBase):
+        * wtf/gtk/RunLoopGtk.cpp:
+        (WTF::RunLoop::run):
+        (WTF::RunLoop::TimerBase::TimerBase):
+        (WTF::RunLoop::TimerBase::start):
+        * wtf/win/RunLoopWin.cpp:
+        (WTF::RunLoop::TimerBase::TimerBase):
+        (WTF::RunLoop::TimerBase::start):
+        (WTF::RunLoop::TimerBase::stop):
+        (WTF::RunLoop::TimerBase::isActive):
+
 2014-03-17  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
 
         One more fix after r165725.
index f0feb47..ba0e04e 100644 (file)
@@ -37,39 +37,39 @@ static RunLoop* s_mainRunLoop;
 class RunLoop::Holder {
 public:
     Holder()
-        : m_runLoop(adoptRef(new RunLoop))
+        : m_runLoop(adoptRef(*new RunLoop))
     {
     }
 
-    RunLoop* runLoop() const { return m_runLoop.get(); }
+    RunLoop& runLoop() { return m_runLoop.get(); }
 
 private:
-    RefPtr<RunLoop> m_runLoop;
+    Ref<RunLoop> m_runLoop;
 };
 
 void RunLoop::initializeMainRunLoop()
 {
     if (s_mainRunLoop)
         return;
-    s_mainRunLoop = RunLoop::current();
+    s_mainRunLoop = &RunLoop::current();
 }
 
-RunLoop* RunLoop::current()
+RunLoop& RunLoop::current()
 {
     DEPRECATED_DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop::Holder>, runLoopHolder, ());
     return runLoopHolder->runLoop();
 }
 
-RunLoop* RunLoop::main()
+RunLoop& RunLoop::main()
 {
     ASSERT(s_mainRunLoop);
-    return s_mainRunLoop;
+    return *s_mainRunLoop;
 }
 
 bool RunLoop::isMain()
 {
     ASSERT(s_mainRunLoop);
-    return s_mainRunLoop == RunLoop::current();
+    return s_mainRunLoop == &RunLoop::current();
 }
 
 void RunLoop::performWork()
index 5ed6ad1..02a70ca 100644 (file)
 namespace WTF {
 
 class RunLoop : public FunctionDispatcher {
+    WTF_MAKE_NONCOPYABLE(RunLoop);
 public:
     // Must be called from the main thread (except for the Mac platform, where it
     // can be called from any thread).
     WTF_EXPORT_PRIVATE static void initializeMainRunLoop();
 
-    WTF_EXPORT_PRIVATE static RunLoop* current();
-    WTF_EXPORT_PRIVATE static RunLoop* main();
+    WTF_EXPORT_PRIVATE static RunLoop& current();
+    WTF_EXPORT_PRIVATE static RunLoop& main();
     WTF_EXPORT_PRIVATE static bool isMain();
     ~RunLoop();
 
@@ -70,7 +71,7 @@ public:
     class TimerBase {
         friend class RunLoop;
     public:
-        WTF_EXPORT_PRIVATE explicit TimerBase(RunLoop*);
+        WTF_EXPORT_PRIVATE explicit TimerBase(RunLoop&);
         WTF_EXPORT_PRIVATE virtual ~TimerBase();
 
         void startRepeating(double repeatInterval) { start(repeatInterval, true); }
@@ -84,7 +85,7 @@ public:
     private:
         WTF_EXPORT_PRIVATE void start(double nextFireInterval, bool repeat);
 
-        RunLoop* m_runLoop;
+        RunLoop& m_runLoop;
 
 #if PLATFORM(WIN)
         static void timerFired(RunLoop*, uint64_t ID);
@@ -111,7 +112,7 @@ public:
     public:
         typedef void (TimerFiredClass::*TimerFiredFunction)();
 
-        Timer(RunLoop* runLoop, TimerFiredClass* o, TimerFiredFunction f)
+        Timer(RunLoop& runLoop, TimerFiredClass* o, TimerFiredFunction f)
             : TimerBase(runLoop)
             , m_object(o)
             , m_function(f)
index 9675867..7e840dd 100644 (file)
@@ -65,14 +65,14 @@ void RunLoop::wakeUp()
 
 void RunLoop::run()
 {
-    current()->m_nestingLevel++;
+    current().m_nestingLevel++;
     
     {
         AutodrainedPool pool;
         CFRunLoopRun();
     }
     
-    current()->m_nestingLevel--;
+    current().m_nestingLevel--;
 }
 
 void RunLoop::stop()
@@ -91,7 +91,7 @@ void RunLoop::TimerBase::timerFired(CFRunLoopTimerRef, void* context)
     timer->fired();
 }
 
-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
+RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
     : m_runLoop(runLoop)
 {
 }
@@ -109,7 +109,7 @@ void RunLoop::TimerBase::start(double nextFireInterval, bool repeat)
     CFRunLoopTimerContext context = { 0, this, 0, 0, 0 };
     CFTimeInterval repeatInterval = repeat ? nextFireInterval : 0;
     m_timer = adoptCF(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + nextFireInterval, repeatInterval, 0, 0, timerFired, &context));
-    CFRunLoopAddTimer(m_runLoop->m_runLoop.get(), m_timer.get(), kCFRunLoopCommonModes);
+    CFRunLoopAddTimer(m_runLoop.m_runLoop.get(), m_timer.get(), kCFRunLoopCommonModes);
 }
 
 void RunLoop::TimerBase::stop()
index 02dcc62..050d9cf 100644 (file)
@@ -83,8 +83,9 @@ void RunLoop::wakeUp()
     }
 }
 
-RunLoop::TimerBase::TimerBase(RunLoop*)
-    : m_timer(0)
+RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
+    : m_runLoop(runLoop)
+    , m_timer(0)
     , m_isRepeating(false)
 {
 }
index 8a2ea22..a6fb2f2 100644 (file)
@@ -53,8 +53,8 @@ RunLoop::~RunLoop()
 
 void RunLoop::run()
 {
-    RunLoop* mainRunLoop = RunLoop::current();
-    GMainLoop* innermostLoop = mainRunLoop->innermostLoop();
+    RunLoop& mainRunLoop = RunLoop::current();
+    GMainLoop* innermostLoop = mainRunLoop.innermostLoop();
     if (!g_main_loop_is_running(innermostLoop)) {
         g_main_loop_run(innermostLoop);
         return;
@@ -62,9 +62,9 @@ void RunLoop::run()
 
     // Create and run a nested loop if the innermost one was already running.
     GMainLoop* nestedMainLoop = g_main_loop_new(0, FALSE);
-    mainRunLoop->pushNestedMainLoop(nestedMainLoop);
+    mainRunLoop.pushNestedMainLoop(nestedMainLoop);
     g_main_loop_run(nestedMainLoop);
-    mainRunLoop->popNestedMainLoop();
+    mainRunLoop.popNestedMainLoop();
 }
 
 GMainLoop* RunLoop::innermostLoop()
@@ -113,7 +113,7 @@ void RunLoop::wakeUp()
     g_main_context_wakeup(m_runLoopContext.get());
 }
 
-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
+RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
     : m_runLoop(runLoop)
     , m_timerSource(0)
 {
@@ -149,7 +149,7 @@ void RunLoop::TimerBase::start(double fireInterval, bool repeat)
     m_timerSource = adoptGRef(g_timeout_source_new(static_cast<guint>(fireInterval * 1000)));
     m_isRepeating = repeat;
     g_source_set_callback(m_timerSource.get(), reinterpret_cast<GSourceFunc>(&RunLoop::TimerBase::timerFiredCallback), this, 0);
-    g_source_attach(m_timerSource.get(), m_runLoop->m_runLoopContext.get());
+    g_source_attach(m_timerSource.get(), m_runLoop.m_runLoopContext.get());
 }
 
 void RunLoop::TimerBase::stop()
index 17bee6f..4b45ad4 100644 (file)
@@ -139,7 +139,7 @@ static uint64_t generateTimerID()
     return uniqueTimerID++;
 }
 
-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
+RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
     : m_runLoop(runLoop)
     , m_ID(generateTimerID())
     , m_isRepeating(false)
@@ -154,23 +154,23 @@ RunLoop::TimerBase::~TimerBase()
 void RunLoop::TimerBase::start(double nextFireInterval, bool repeat)
 {
     m_isRepeating = repeat;
-    m_runLoop->m_activeTimers.set(m_ID, this);
-    ::SetTimer(m_runLoop->m_runLoopMessageWindow, m_ID, nextFireInterval * 1000, 0);
+    m_runLoop.m_activeTimers.set(m_ID, this);
+    ::SetTimer(m_runLoop.m_runLoopMessageWindow, m_ID, nextFireInterval * 1000, 0);
 }
 
 void RunLoop::TimerBase::stop()
 {
-    TimerMap::iterator it = m_runLoop->m_activeTimers.find(m_ID);
-    if (it == m_runLoop->m_activeTimers.end())
+    TimerMap::iterator it = m_runLoop.m_activeTimers.find(m_ID);
+    if (it == m_runLoop.m_activeTimers.end())
         return;
 
-    m_runLoop->m_activeTimers.remove(it);
-    ::KillTimer(m_runLoop->m_runLoopMessageWindow, m_ID);
+    m_runLoop.m_activeTimers.remove(it);
+    ::KillTimer(m_runLoop.m_runLoopMessageWindow, m_ID);
 }
 
 bool RunLoop::TimerBase::isActive() const
 {
-    return m_runLoop->m_activeTimers.contains(m_ID);
+    return m_runLoop.m_activeTimers.contains(m_ID);
 }
 
 } // namespace WTF
index 8ec62a9..83c9b0b 100644 (file)
@@ -1,3 +1,72 @@
+2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        Use RunLoop objects through references instead of pointers
+        https://bugs.webkit.org/show_bug.cgi?id=130313
+
+        Reviewed by Andreas Kling.
+
+        Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
+        return RunLoop reference instead of a pointer.
+
+        * DatabaseProcess/DatabaseProcess.cpp:
+        (WebKit::DatabaseProcess::didClose):
+        (WebKit::DatabaseProcess::didReceiveInvalidMessage):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::postMainThreadTask):
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::didClose):
+        (WebKit::NetworkProcess::didReceiveInvalidMessage):
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::continueWillSendRequest):
+        * Platform/IPC/Connection.cpp:
+        (IPC::Connection::SyncMessageState::getOrCreate):
+        (IPC::Connection::SyncMessageState::SyncMessageState):
+        (IPC::Connection::SyncMessageState::~SyncMessageState):
+        (IPC::Connection::SyncMessageState::processIncomingMessage):
+        (IPC::Connection::SyncMessageState::dispatchMessages):
+        (IPC::Connection::createServerConnection):
+        (IPC::Connection::createClientConnection):
+        (IPC::Connection::Connection):
+        (IPC::Connection::addWorkQueueMessageReceiver):
+        (IPC::Connection::removeWorkQueueMessageReceiver):
+        (IPC::Connection::sendSyncMessage):
+        (IPC::Connection::sendSyncMessageFromSecondaryThread):
+        (IPC::Connection::waitForSyncReply):
+        (IPC::Connection::processIncomingMessage):
+        (IPC::Connection::connectionDidClose):
+        (IPC::Connection::dispatchDidReceiveInvalidMessage):
+        (IPC::Connection::enqueueIncomingMessage):
+        (IPC::Connection::wakeUpRunLoop):
+        * Platform/IPC/Connection.h:
+        * Platform/IPC/mac/ConnectionMac.cpp:
+        (IPC::Connection::receiveSourceEventHandler):
+        * Shared/ChildProcess.cpp:
+        (WebKit::ChildProcess::stopRunLoop):
+        * Shared/Plugins/NPObjectProxy.cpp:
+        (WebKit::NPObjectProxy::NP_Deallocate):
+        * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
+        (WebKit::ProcessLauncher::launchProcess):
+        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
+        (WebKit::ProcessLauncher::launchProcess):
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::connectToService):
+        (WebKit::tryPreexistingProcess):
+        (WebKit::createProcess):
+        * UIProcess/Storage/StorageManager.cpp:
+        (WebKit::StorageManager::getOrigins):
+        (WebKit::StorageManager::getStorageDetailsByOrigin):
+        * UIProcess/Storage/StorageManager.h:
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::unprotectPluginFromDestruction):
+        * WebProcess/WebPage/EventDispatcher.cpp:
+        (WebKit::EventDispatcher::wheelEvent):
+        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
+        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::close):
+
 2014-03-17  Giovanni Campagna  <gcampagna@src.gnome.org>
 
         [GTK] Don't busy loop when the socket is full
index a4cbcfa..a6b9520 100644 (file)
@@ -67,12 +67,12 @@ bool DatabaseProcess::shouldTerminate()
 
 void DatabaseProcess::didClose(IPC::Connection*)
 {
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 }
 
 void DatabaseProcess::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference, IPC::StringReference)
 {
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 }
 
 PassRefPtr<UniqueIDBDatabase> DatabaseProcess::getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier& identifier)
index bc231d0..f72b94e 100644 (file)
@@ -1085,7 +1085,7 @@ void UniqueIDBDatabase::postMainThreadTask(std::unique_ptr<AsyncTask> task, Data
 
     // Balanced by an adoptRef() in ::performNextMainThreadTask
     ref();
-    RunLoop::main()->dispatch(bind(&UniqueIDBDatabase::performNextMainThreadTask, this));
+    RunLoop::main().dispatch(bind(&UniqueIDBDatabase::performNextMainThreadTask, this));
 }
 
 void UniqueIDBDatabase::performNextMainThreadTask()
index 4b840f4..ed8332a 100644 (file)
@@ -125,12 +125,12 @@ void NetworkProcess::didReceiveSyncMessage(IPC::Connection* connection, IPC::Mes
 void NetworkProcess::didClose(IPC::Connection*)
 {
     // The UIProcess just exited.
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 }
 
 void NetworkProcess::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference, IPC::StringReference)
 {
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 }
 
 void NetworkProcess::didCreateDownload()
index 7dfb06c..c661700 100644 (file)
@@ -250,7 +250,7 @@ void NetworkResourceLoader::continueWillSendRequest(const ResourceRequest& newRe
     m_suggestedRequestForWillSendRequest.updateFromDelegatePreservingOldHTTPBody(newRequest);
 #endif
 
-    RunLoop::main()->dispatch(bind(&NetworkResourceLoadScheduler::receivedRedirect, &NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
+    RunLoop::main().dispatch(bind(&NetworkResourceLoadScheduler::receivedRedirect, &NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
 
     m_request = m_suggestedRequestForWillSendRequest;
     m_suggestedRequestForWillSendRequest = ResourceRequest();
index 4c93361..e3bded6 100644 (file)
@@ -37,7 +37,7 @@ namespace IPC {
 
 class Connection::SyncMessageState : public ThreadSafeRefCounted<Connection::SyncMessageState> {
 public:
-    static PassRefPtr<SyncMessageState> getOrCreate(RunLoop*);
+    static PassRefPtr<SyncMessageState> getOrCreate(RunLoop&);
     ~SyncMessageState();
 
     void wakeUpClientRunLoop()
@@ -59,7 +59,7 @@ public:
     void dispatchMessages(Connection* allowedConnection);
 
 private:
-    explicit SyncMessageState(RunLoop*);
+    explicit SyncMessageState(RunLoop&);
 
     typedef HashMap<RunLoop*, SyncMessageState*> SyncMessageStateMap;
     static SyncMessageStateMap& syncMessageStateMap()
@@ -76,7 +76,7 @@ private:
 
     void dispatchMessageAndResetDidScheduleDispatchMessagesForConnection(Connection*);
 
-    RunLoop* m_runLoop;
+    RunLoop& m_runLoop;
     BinarySemaphore m_waitForSyncReplySemaphore;
 
     // Protects m_didScheduleDispatchMessagesWorkSet and m_messagesToDispatchWhileWaitingForSyncReply.
@@ -101,10 +101,10 @@ public:
 };
 
 
-PassRefPtr<Connection::SyncMessageState> Connection::SyncMessageState::getOrCreate(RunLoop* runLoop)
+PassRefPtr<Connection::SyncMessageState> Connection::SyncMessageState::getOrCreate(RunLoop& runLoop)
 {
     MutexLocker locker(syncMessageStateMapMutex());
-    SyncMessageStateMap::AddResult result = syncMessageStateMap().add(runLoop, nullptr);
+    SyncMessageStateMap::AddResult result = syncMessageStateMap().add(&runLoop, nullptr);
 
     if (!result.isNewEntry) {
         ASSERT(result.iterator->value);
@@ -117,7 +117,7 @@ PassRefPtr<Connection::SyncMessageState> Connection::SyncMessageState::getOrCrea
     return syncMessageState.release();
 }
 
-Connection::SyncMessageState::SyncMessageState(RunLoop* runLoop)
+Connection::SyncMessageState::SyncMessageState(RunLoop& runLoop)
     : m_runLoop(runLoop)
 {
 }
@@ -126,8 +126,8 @@ Connection::SyncMessageState::~SyncMessageState()
 {
     MutexLocker locker(syncMessageStateMapMutex());
     
-    ASSERT(syncMessageStateMap().contains(m_runLoop));
-    syncMessageStateMap().remove(m_runLoop);
+    ASSERT(syncMessageStateMap().contains(&m_runLoop));
+    syncMessageStateMap().remove(&m_runLoop);
 
     ASSERT(m_messagesToDispatchWhileWaitingForSyncReply.isEmpty());
 }
@@ -145,7 +145,7 @@ bool Connection::SyncMessageState::processIncomingMessage(Connection* connection
         MutexLocker locker(m_mutex);
         
         if (m_didScheduleDispatchMessagesWorkSet.add(connection).isNewEntry)
-            m_runLoop->dispatch(bind(&SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection, this, RefPtr<Connection>(connection)));
+            m_runLoop.dispatch(bind(&SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection, this, RefPtr<Connection>(connection)));
 
         m_messagesToDispatchWhileWaitingForSyncReply.append(std::move(connectionAndIncomingMessage));
     }
@@ -157,7 +157,7 @@ bool Connection::SyncMessageState::processIncomingMessage(Connection* connection
 
 void Connection::SyncMessageState::dispatchMessages(Connection* allowedConnection)
 {
-    ASSERT(m_runLoop == RunLoop::current());
+    ASSERT(&m_runLoop == &RunLoop::current());
 
     Vector<ConnectionAndIncomingMessage> messagesToDispatchWhileWaitingForSyncReply;
 
@@ -200,17 +200,17 @@ void Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMes
     dispatchMessages(connection);
 }
 
-PassRefPtr<Connection> Connection::createServerConnection(Identifier identifier, Client* client, RunLoop* clientRunLoop)
+PassRefPtr<Connection> Connection::createServerConnection(Identifier identifier, Client* client, RunLoop& clientRunLoop)
 {
     return adoptRef(new Connection(identifier, true, client, clientRunLoop));
 }
 
-PassRefPtr<Connection> Connection::createClientConnection(Identifier identifier, Client* client, RunLoop* clientRunLoop)
+PassRefPtr<Connection> Connection::createClientConnection(Identifier identifier, Client* client, RunLoop& clientRunLoop)
 {
     return adoptRef(new Connection(identifier, false, client, clientRunLoop));
 }
 
-Connection::Connection(Identifier identifier, bool isServer, Client* client, RunLoop* clientRunLoop)
+Connection::Connection(Identifier identifier, bool isServer, Client* client, RunLoop& clientRunLoop)
     : m_client(client)
     , m_isServer(isServer)
     , m_syncRequestID(0)
@@ -253,7 +253,7 @@ void Connection::setShouldExitOnSyncMessageSendFailure(bool shouldExitOnSyncMess
 
 void Connection::addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue* workQueue, WorkQueueMessageReceiver* workQueueMessageReceiver)
 {
-    ASSERT(RunLoop::current() == m_clientRunLoop);
+    ASSERT(&RunLoop::current() == &m_clientRunLoop);
     ASSERT(!m_isConnected);
 
     m_connectionQueue->dispatch(bind(&Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue, this, messageReceiverName, RefPtr<WorkQueue>(workQueue), RefPtr<WorkQueueMessageReceiver>(workQueueMessageReceiver)));
@@ -261,7 +261,7 @@ void Connection::addWorkQueueMessageReceiver(StringReference messageReceiverName
 
 void Connection::removeWorkQueueMessageReceiver(StringReference messageReceiverName)
 {
-    ASSERT(RunLoop::current() == m_clientRunLoop);
+    ASSERT(&RunLoop::current() == &m_clientRunLoop);
 
     m_connectionQueue->dispatch(bind(&Connection::removeWorkQueueMessageReceiverOnConnectionWorkQueue, this, messageReceiverName));
 }
@@ -431,7 +431,7 @@ std::unique_ptr<MessageDecoder> Connection::waitForMessage(StringReference messa
 
 std::unique_ptr<MessageDecoder> Connection::sendSyncMessage(uint64_t syncRequestID, std::unique_ptr<MessageEncoder> encoder, std::chrono::milliseconds timeout, unsigned syncSendFlags)
 {
-    if (RunLoop::current() != m_clientRunLoop) {
+    if (&RunLoop::current() != &m_clientRunLoop) {
         // No flags are supported for synchronous messages sent from secondary threads.
         ASSERT(!syncSendFlags);
         return sendSyncMessageFromSecondaryThread(syncRequestID, std::move(encoder), timeout);
@@ -480,7 +480,7 @@ std::unique_ptr<MessageDecoder> Connection::sendSyncMessage(uint64_t syncRequest
 
 std::unique_ptr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(uint64_t syncRequestID, std::unique_ptr<MessageEncoder> encoder, std::chrono::milliseconds timeout)
 {
-    ASSERT(RunLoop::current() != m_clientRunLoop);
+    ASSERT(&RunLoop::current() != &m_clientRunLoop);
 
     if (!isValid())
         return nullptr;
@@ -548,7 +548,7 @@ std::unique_ptr<MessageDecoder> Connection::waitForSyncReply(uint64_t syncReques
 #if PLATFORM(COCOA)
             // FIXME: Although we run forever, any events incoming will cause us to drop out and exit out. This however doesn't
             // account for a timeout value passed in. Timeout is always NoTimeout in these cases, but that could change.
-            RunLoop::current()->runForDuration(1e10);
+            RunLoop::current().runForDuration(1e10);
             timedOut = currentTime() >= absoluteTime;
 #endif
         } else
@@ -613,11 +613,11 @@ void Connection::processIncomingMessage(std::unique_ptr<MessageDecoder> message)
             CString messageReceiverName = "<unknown message>";
             CString messageName = String::format("<message length: %zu bytes>", message->length()).utf8();
 
-            m_clientRunLoop->dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, messageReceiverName, messageName));
+            m_clientRunLoop.dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, messageReceiverName, messageName));
             return;
         }
 
-        m_clientRunLoop->dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, message->messageReceiverName().toString(), message->messageName().toString()));
+        m_clientRunLoop.dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, message->messageReceiverName().toString(), message->messageName().toString()));
         return;
     }
 
@@ -676,7 +676,7 @@ void Connection::connectionDidClose()
     if (m_didCloseOnConnectionWorkQueueCallback)
         m_didCloseOnConnectionWorkQueueCallback(this);
 
-    m_clientRunLoop->dispatch(WTF::bind(&Connection::dispatchConnectionDidClose, this));
+    m_clientRunLoop.dispatch(WTF::bind(&Connection::dispatchConnectionDidClose, this));
 }
 
 void Connection::dispatchConnectionDidClose()
@@ -745,7 +745,7 @@ void Connection::dispatchSyncMessage(MessageDecoder& decoder)
 
 void Connection::dispatchDidReceiveInvalidMessage(const CString& messageReceiverNameString, const CString& messageNameString)
 {
-    ASSERT(RunLoop::current() == m_clientRunLoop);
+    ASSERT(&RunLoop::current() == &m_clientRunLoop);
 
     if (!m_client)
         return;
@@ -768,7 +768,7 @@ void Connection::enqueueIncomingMessage(std::unique_ptr<MessageDecoder> incoming
         m_incomingMessages.append(std::move(incomingMessage));
     }
 
-    m_clientRunLoop->dispatch(WTF::bind(&Connection::dispatchOneMessage, this));
+    m_clientRunLoop.dispatch(WTF::bind(&Connection::dispatchOneMessage, this));
 }
 
 void Connection::dispatchMessage(MessageDecoder& decoder)
@@ -825,7 +825,7 @@ void Connection::dispatchOneMessage()
 
 void Connection::wakeUpRunLoop()
 {
-    m_clientRunLoop->wakeUp();
+    m_clientRunLoop.wakeUp();
 }
 
 } // namespace IPC
index c054652..2866900 100644 (file)
@@ -127,8 +127,8 @@ public:
     static Connection::SocketPair createPlatformConnection();
 #endif
 
-    static PassRefPtr<Connection> createServerConnection(Identifier, Client*, WTF::RunLoop* clientRunLoop);
-    static PassRefPtr<Connection> createClientConnection(Identifier, Client*, WTF::RunLoop* clientRunLoop);
+    static PassRefPtr<Connection> createServerConnection(Identifier, Client*, WTF::RunLoop& clientRunLoop);
+    static PassRefPtr<Connection> createClientConnection(Identifier, Client*, WTF::RunLoop& clientRunLoop);
     ~Connection();
 
     Client* client() const { return m_client; }
@@ -177,7 +177,7 @@ public:
     Identifier identifier() const;
     
 private:
-    Connection(Identifier, bool isServer, Client*, WTF::RunLoop* clientRunLoop);
+    Connection(Identifier, bool isServer, Client*, WTF::RunLoop& clientRunLoop);
     void platformInitialize(Identifier);
     void platformInvalidate();
     
@@ -223,7 +223,7 @@ private:
 
     bool m_isConnected;
     RefPtr<WorkQueue> m_connectionQueue;
-    WTF::RunLoop* m_clientRunLoop;
+    WTF::RunLoop& m_clientRunLoop;
 
     HashMap<StringReference, std::pair<RefPtr<WorkQueue>, RefPtr<WorkQueueMessageReceiver>>> m_workQueueMessageReceivers;
 
index afafa2e..f6a7659 100644 (file)
@@ -444,7 +444,7 @@ void Connection::receiveSourceEventHandler()
     if (decoder->messageReceiverName() == "IPC" && decoder->messageName() == "SetExceptionPort") {
         if (m_isServer) {
             // Server connections aren't supposed to have their exception ports overriden. Treat this as an invalid message.
-            m_clientRunLoop->dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, decoder->messageReceiverName().toString(), decoder->messageName().toString()));
+            m_clientRunLoop.dispatch(bind(&Connection::dispatchDidReceiveInvalidMessage, this, decoder->messageReceiverName().toString(), decoder->messageName().toString()));
             return;
         }
         MachPort exceptionPort;
index 0ee8da8..d5693e9 100644 (file)
@@ -150,7 +150,7 @@ void ChildProcess::terminationTimerFired()
 
 void ChildProcess::stopRunLoop()
 {
-    RunLoop::main()->stop();
+    RunLoop::main().stop();
 }
 
 void ChildProcess::terminate()
index fec1f71..45594e3 100644 (file)
@@ -303,7 +303,7 @@ void NPObjectProxy::NP_Deallocate(NPObject* npObject)
     // that is known to be misused during plugin teardown, and to not be concerned about change in behavior if this
     // occured at any other time.
     if (!isMainThread()) {
-        RunLoop::main()->dispatch(bind(&NPObjectProxy::NP_Deallocate, npObject));
+        RunLoop::main().dispatch(bind(&NPObjectProxy::NP_Deallocate, npObject));
         return;
     }
     
index 69e6b83..37cb203 100644 (file)
@@ -111,7 +111,7 @@ void ProcessLauncher::launchProcess()
         close(sockets[0]);
         m_processIdentifier = pid;
         // We've finished launching the process, message back to the main run loop.
-        RunLoop::main()->dispatch(bind(&ProcessLauncher::didFinishLaunchingProcess, this, pid, sockets[1]));
+        RunLoop::main().dispatch(bind(&ProcessLauncher::didFinishLaunchingProcess, this, pid, sockets[1]));
     } else {
         ASSERT_NOT_REACHED();
         return;
index f66ebe0..554ee21 100644 (file)
@@ -132,7 +132,7 @@ void ProcessLauncher::launchProcess()
     m_processIdentifier = pid;
 
     // We've finished launching the process, message back to the main run loop.
-    RunLoop::main()->dispatch(bind(&ProcessLauncher::didFinishLaunchingProcess, this, m_processIdentifier, sockets[1]));
+    RunLoop::main().dispatch(bind(&ProcessLauncher::didFinishLaunchingProcess, this, m_processIdentifier, sockets[1]));
 }
 
 void ProcessLauncher::terminateProcess()
index 0ee887f..9144527 100644 (file)
@@ -231,7 +231,7 @@ static void connectToService(const ProcessLauncher::LaunchOptions& launchOptions
             // And the receive right.
             mach_port_mod_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_RECEIVE, -1);
 
-            RunLoop::main()->dispatch(bind(didFinishLaunchingProcessFunction, that, 0, IPC::Connection::Identifier()));
+            RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, 0, IPC::Connection::Identifier()));
         } else {
             ASSERT(type == XPC_TYPE_DICTIONARY);
             ASSERT(!strcmp(xpc_dictionary_get_string(reply, "message-name"), "process-finished-launching"));
@@ -240,7 +240,7 @@ static void connectToService(const ProcessLauncher::LaunchOptions& launchOptions
             pid_t processIdentifier = xpc_connection_get_pid(connection);
 
             // We've finished launching the process, message back to the main run loop.
-            RunLoop::main()->dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort, connection)));
+            RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort, connection)));
         }
 
         that->deref();
@@ -358,7 +358,7 @@ static bool tryPreexistingProcess(const ProcessLauncher::LaunchOptions& launchOp
     }
     
     // We've finished launching the process, message back to the main run loop.
-    RunLoop::main()->dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
+    RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
     return true;
 }
 
@@ -498,7 +498,7 @@ static void createProcess(const ProcessLauncher::LaunchOptions& launchOptions, b
     }
 
     // We've finished launching the process, message back to the main run loop.
-    RunLoop::main()->dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
+    RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
 }
 
 void ProcessLauncher::launchProcess()
index 28ecdd4..88b5c6e 100644 (file)
@@ -421,14 +421,14 @@ void StorageManager::processWillCloseConnection(WebProcessProxy* webProcessProxy
     m_queue->dispatch(bind(&StorageManager::invalidateConnectionInternal, this, RefPtr<IPC::Connection>(webProcessProxy->connection())));
 }
 
-void StorageManager::getOrigins(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
+void StorageManager::getOrigins(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
 {
-    m_queue->dispatch(bind(&StorageManager::getOriginsInternal, this, RefPtr<FunctionDispatcher>(callbackDispatcher), context, callback));
+    m_queue->dispatch(bind(&StorageManager::getOriginsInternal, this, RefPtr<FunctionDispatcher>(&callbackDispatcher), context, callback));
 }
 
-void StorageManager::getStorageDetailsByOrigin(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector<LocalStorageDetails>& storageDetails, void* context))
+void StorageManager::getStorageDetailsByOrigin(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<LocalStorageDetails>& storageDetails, void* context))
 {
-    m_queue->dispatch(bind(&StorageManager::getStorageDetailsByOriginInternal, this, RefPtr<FunctionDispatcher>(callbackDispatcher), context, callback));
+    m_queue->dispatch(bind(&StorageManager::getStorageDetailsByOriginInternal, this, RefPtr<FunctionDispatcher>(&callbackDispatcher), context, callback));
 }
 
 void StorageManager::deleteEntriesForOrigin(SecurityOrigin* securityOrigin)
index 53f3d58..8efc03b 100644 (file)
@@ -62,8 +62,8 @@ public:
 
     // FIXME: Instead of a context + C function, this should take a WTF::Function, but we currently don't
     // support arguments in functions.
-    void getOrigins(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector<RefPtr<WebCore::SecurityOrigin>>&, void* context));
-    void getStorageDetailsByOrigin(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector<LocalStorageDetails>&, void* context));
+    void getOrigins(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<RefPtr<WebCore::SecurityOrigin>>&, void* context));
+    void getStorageDetailsByOrigin(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<LocalStorageDetails>&, void* context));
     void deleteEntriesForOrigin(WebCore::SecurityOrigin*);
     void deleteAllEntries();
 
index 9c49378..cce8208 100644 (file)
@@ -304,7 +304,7 @@ void NetscapePlugin::popPopupsEnabledState()
 
 void NetscapePlugin::pluginThreadAsyncCall(void (*function)(void*), void* userData)
 {
-    RunLoop::main()->dispatch(WTF::bind(&NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
+    RunLoop::main().dispatch(WTF::bind(&NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
 }
     
 void NetscapePlugin::handlePluginThreadAsyncCall(void (*function)(void*), void* userData)
index dff815b..da84e47 100644 (file)
@@ -1573,7 +1573,7 @@ void PluginView::unprotectPluginFromDestruction()
     // the destroyed object higher on the stack. To prevent this, if the plug-in has
     // only one remaining reference, call deref() asynchronously.
     if (hasOneRef())
-        RunLoop::main()->dispatch(bind(derefPluginView, this));
+        RunLoop::main().dispatch(bind(derefPluginView, this));
     else
         deref();
 }
index fd2faf3..21a0256 100644 (file)
@@ -140,7 +140,7 @@ void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEven
     UNUSED_PARAM(canRubberBandAtBottom);
 #endif
 
-    RunLoop::main()->dispatch(bind(&EventDispatcher::dispatchWheelEvent, this, pageID, wheelEvent));
+    RunLoop::main().dispatch(bind(&EventDispatcher::dispatchWheelEvent, this, pageID, wheelEvent));
 }
 
 void EventDispatcher::dispatchWheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent)
index b028cf8..770af7a 100644 (file)
@@ -60,7 +60,7 @@ void ViewUpdateDispatcher::visibleContentRectUpdate(uint64_t pageID, const Visib
         MutexLocker locker(m_dataMutex);
         m_latestUpdate.set(pageID, visibleContentRectUpdateInfo);
     }
-    RunLoop::main()->dispatch(bind(&ViewUpdateDispatcher::dispatchVisibleContentRectUpdate, this));
+    RunLoop::main().dispatch(bind(&ViewUpdateDispatcher::dispatchVisibleContentRectUpdate, this));
 }
 
 void ViewUpdateDispatcher::dispatchVisibleContentRectUpdate()
index 119e2eb..28f4152 100644 (file)
@@ -885,7 +885,7 @@ void WebPage::close()
     WebProcess::shared().removeWebPage(m_pageID);
 
     if (isRunningModal)
-        RunLoop::main()->stop();
+        RunLoop::main().stop();
 }
 
 void WebPage::tryClose()
index 3473c4d..3d25554 100644 (file)
@@ -1,3 +1,17 @@
+2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        Use RunLoop objects through references instead of pointers
+        https://bugs.webkit.org/show_bug.cgi?id=130313
+
+        Reviewed by Andreas Kling.
+
+        Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
+        return RunLoop reference instead of a pointer.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp:
+        (loadedCallback):
+        (clickedCallback):
+
 2014-03-17  Tim Horton  <timothy_horton@apple.com>
 
         sort-export-file --help doesn't work (missing 'use')
index 7caad54..2584c20 100644 (file)
@@ -204,7 +204,7 @@ static gboolean loadedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event,
     test->notify("loaded", "");
 
     // Stop the loop and let testSignals() or testDispatchEvent() continue its course
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 
     return FALSE;
 }
@@ -215,7 +215,7 @@ static gboolean clickedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event,
     test->notify("finish", "");
 
     // Stop the loop and let testSignals() or testDispatchEvent() continue its course
-    RunLoop::current()->stop();
+    RunLoop::current().stop();
 
     return FALSE;
 }