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)
commit39acba80066cacb38ee88e1e26c362246a24c8fa
treea76de60c3f1e783ce5de7ef3a2a5fe6b2576158d
parent41260b4cdfbe39d5075bd98b6cb4b1382c64af3a
Use RunLoop objects through references instead of pointers
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