<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165746] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165746">165746</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-03-17 11:47:33 -0700 (Mon, 17 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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&lt;RunLoop&gt; 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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRunLoopcpp">trunk/Source/WTF/wtf/RunLoop.cpp</a></li>
<li><a href="#trunkSourceWTFwtfRunLooph">trunk/Source/WTF/wtf/RunLoop.h</a></li>
<li><a href="#trunkSourceWTFwtfcfRunLoopCFcpp">trunk/Source/WTF/wtf/cf/RunLoopCF.cpp</a></li>
<li><a href="#trunkSourceWTFwtfeflRunLoopEflcpp">trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp</a></li>
<li><a href="#trunkSourceWTFwtfgtkRunLoopGtkcpp">trunk/Source/WTF/wtf/gtk/RunLoopGtk.cpp</a></li>
<li><a href="#trunkSourceWTFwtfwinRunLoopWincpp">trunk/Source/WTF/wtf/win/RunLoopWin.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp">trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectioncpp">trunk/Source/WebKit2/Platform/IPC/Connection.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectionh">trunk/Source/WebKit2/Platform/IPC/Connection.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCmacConnectionMaccpp">trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedChildProcesscpp">trunk/Source/WebKit2/Shared/ChildProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNPObjectProxycpp">trunk/Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchereflProcessLauncherEflcpp">trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp">trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm">trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageStorageManagercpp">trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessStorageStorageManagerh">trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsNetscapeNetscapePlugincpp">trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageEventDispatchercpp">trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageViewUpdateDispatchercpp">trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkDOMDOMWindowTestcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/ChangeLog        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-03-17  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        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&lt;RunLoop&gt; 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):
+
</ins><span class="cx"> 2014-03-17  Tamas Gergely  &lt;tgergely.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         One more fix after r165725.
</span></span></pre></div>
<a id="trunkSourceWTFwtfRunLoopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RunLoop.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RunLoop.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/RunLoop.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -37,39 +37,39 @@
</span><span class="cx"> class RunLoop::Holder {
</span><span class="cx"> public:
</span><span class="cx">     Holder()
</span><del>-        : m_runLoop(adoptRef(new RunLoop))
</del><ins>+        : m_runLoop(adoptRef(*new RunLoop))
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RunLoop* runLoop() const { return m_runLoop.get(); }
</del><ins>+    RunLoop&amp; runLoop() { return m_runLoop.get(); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    RefPtr&lt;RunLoop&gt; m_runLoop;
</del><ins>+    Ref&lt;RunLoop&gt; m_runLoop;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::initializeMainRunLoop()
</span><span class="cx"> {
</span><span class="cx">     if (s_mainRunLoop)
</span><span class="cx">         return;
</span><del>-    s_mainRunLoop = RunLoop::current();
</del><ins>+    s_mainRunLoop = &amp;RunLoop::current();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop* RunLoop::current()
</del><ins>+RunLoop&amp; RunLoop::current()
</ins><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(WTF::ThreadSpecific&lt;RunLoop::Holder&gt;, runLoopHolder, ());
</span><span class="cx">     return runLoopHolder-&gt;runLoop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop* RunLoop::main()
</del><ins>+RunLoop&amp; RunLoop::main()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(s_mainRunLoop);
</span><del>-    return s_mainRunLoop;
</del><ins>+    return *s_mainRunLoop;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RunLoop::isMain()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(s_mainRunLoop);
</span><del>-    return s_mainRunLoop == RunLoop::current();
</del><ins>+    return s_mainRunLoop == &amp;RunLoop::current();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::performWork()
</span></span></pre></div>
<a id="trunkSourceWTFwtfRunLooph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RunLoop.h (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RunLoop.h        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/RunLoop.h        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -47,13 +47,14 @@
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="cx"> class RunLoop : public FunctionDispatcher {
</span><ins>+    WTF_MAKE_NONCOPYABLE(RunLoop);
</ins><span class="cx"> public:
</span><span class="cx">     // Must be called from the main thread (except for the Mac platform, where it
</span><span class="cx">     // can be called from any thread).
</span><span class="cx">     WTF_EXPORT_PRIVATE static void initializeMainRunLoop();
</span><span class="cx"> 
</span><del>-    WTF_EXPORT_PRIVATE static RunLoop* current();
-    WTF_EXPORT_PRIVATE static RunLoop* main();
</del><ins>+    WTF_EXPORT_PRIVATE static RunLoop&amp; current();
+    WTF_EXPORT_PRIVATE static RunLoop&amp; main();
</ins><span class="cx">     WTF_EXPORT_PRIVATE static bool isMain();
</span><span class="cx">     ~RunLoop();
</span><span class="cx"> 
</span><span class="lines">@@ -70,7 +71,7 @@
</span><span class="cx">     class TimerBase {
</span><span class="cx">         friend class RunLoop;
</span><span class="cx">     public:
</span><del>-        WTF_EXPORT_PRIVATE explicit TimerBase(RunLoop*);
</del><ins>+        WTF_EXPORT_PRIVATE explicit TimerBase(RunLoop&amp;);
</ins><span class="cx">         WTF_EXPORT_PRIVATE virtual ~TimerBase();
</span><span class="cx"> 
</span><span class="cx">         void startRepeating(double repeatInterval) { start(repeatInterval, true); }
</span><span class="lines">@@ -84,7 +85,7 @@
</span><span class="cx">     private:
</span><span class="cx">         WTF_EXPORT_PRIVATE void start(double nextFireInterval, bool repeat);
</span><span class="cx"> 
</span><del>-        RunLoop* m_runLoop;
</del><ins>+        RunLoop&amp; m_runLoop;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">         static void timerFired(RunLoop*, uint64_t ID);
</span><span class="lines">@@ -111,7 +112,7 @@
</span><span class="cx">     public:
</span><span class="cx">         typedef void (TimerFiredClass::*TimerFiredFunction)();
</span><span class="cx"> 
</span><del>-        Timer(RunLoop* runLoop, TimerFiredClass* o, TimerFiredFunction f)
</del><ins>+        Timer(RunLoop&amp; runLoop, TimerFiredClass* o, TimerFiredFunction f)
</ins><span class="cx">             : TimerBase(runLoop)
</span><span class="cx">             , m_object(o)
</span><span class="cx">             , m_function(f)
</span></span></pre></div>
<a id="trunkSourceWTFwtfcfRunLoopCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/cf/RunLoopCF.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/cf/RunLoopCF.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/cf/RunLoopCF.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -65,14 +65,14 @@
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::run()
</span><span class="cx"> {
</span><del>-    current()-&gt;m_nestingLevel++;
</del><ins>+    current().m_nestingLevel++;
</ins><span class="cx">     
</span><span class="cx">     {
</span><span class="cx">         AutodrainedPool pool;
</span><span class="cx">         CFRunLoopRun();
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    current()-&gt;m_nestingLevel--;
</del><ins>+    current().m_nestingLevel--;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::stop()
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">     timer-&gt;fired();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
</del><ins>+RunLoop::TimerBase::TimerBase(RunLoop&amp; runLoop)
</ins><span class="cx">     : m_runLoop(runLoop)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">     CFRunLoopTimerContext context = { 0, this, 0, 0, 0 };
</span><span class="cx">     CFTimeInterval repeatInterval = repeat ? nextFireInterval : 0;
</span><span class="cx">     m_timer = adoptCF(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + nextFireInterval, repeatInterval, 0, 0, timerFired, &amp;context));
</span><del>-    CFRunLoopAddTimer(m_runLoop-&gt;m_runLoop.get(), m_timer.get(), kCFRunLoopCommonModes);
</del><ins>+    CFRunLoopAddTimer(m_runLoop.m_runLoop.get(), m_timer.get(), kCFRunLoopCommonModes);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::TimerBase::stop()
</span></span></pre></div>
<a id="trunkSourceWTFwtfeflRunLoopEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/efl/RunLoopEfl.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -83,8 +83,9 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop::TimerBase::TimerBase(RunLoop*)
-    : m_timer(0)
</del><ins>+RunLoop::TimerBase::TimerBase(RunLoop&amp; runLoop)
+    : m_runLoop(runLoop)
+    , m_timer(0)
</ins><span class="cx">     , m_isRepeating(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWTFwtfgtkRunLoopGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/gtk/RunLoopGtk.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/gtk/RunLoopGtk.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/gtk/RunLoopGtk.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::run()
</span><span class="cx"> {
</span><del>-    RunLoop* mainRunLoop = RunLoop::current();
-    GMainLoop* innermostLoop = mainRunLoop-&gt;innermostLoop();
</del><ins>+    RunLoop&amp; mainRunLoop = RunLoop::current();
+    GMainLoop* innermostLoop = mainRunLoop.innermostLoop();
</ins><span class="cx">     if (!g_main_loop_is_running(innermostLoop)) {
</span><span class="cx">         g_main_loop_run(innermostLoop);
</span><span class="cx">         return;
</span><span class="lines">@@ -62,9 +62,9 @@
</span><span class="cx"> 
</span><span class="cx">     // Create and run a nested loop if the innermost one was already running.
</span><span class="cx">     GMainLoop* nestedMainLoop = g_main_loop_new(0, FALSE);
</span><del>-    mainRunLoop-&gt;pushNestedMainLoop(nestedMainLoop);
</del><ins>+    mainRunLoop.pushNestedMainLoop(nestedMainLoop);
</ins><span class="cx">     g_main_loop_run(nestedMainLoop);
</span><del>-    mainRunLoop-&gt;popNestedMainLoop();
</del><ins>+    mainRunLoop.popNestedMainLoop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GMainLoop* RunLoop::innermostLoop()
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     g_main_context_wakeup(m_runLoopContext.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
</del><ins>+RunLoop::TimerBase::TimerBase(RunLoop&amp; runLoop)
</ins><span class="cx">     : m_runLoop(runLoop)
</span><span class="cx">     , m_timerSource(0)
</span><span class="cx"> {
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     m_timerSource = adoptGRef(g_timeout_source_new(static_cast&lt;guint&gt;(fireInterval * 1000)));
</span><span class="cx">     m_isRepeating = repeat;
</span><span class="cx">     g_source_set_callback(m_timerSource.get(), reinterpret_cast&lt;GSourceFunc&gt;(&amp;RunLoop::TimerBase::timerFiredCallback), this, 0);
</span><del>-    g_source_attach(m_timerSource.get(), m_runLoop-&gt;m_runLoopContext.get());
</del><ins>+    g_source_attach(m_timerSource.get(), m_runLoop.m_runLoopContext.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::TimerBase::stop()
</span></span></pre></div>
<a id="trunkSourceWTFwtfwinRunLoopWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/win/RunLoopWin.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/win/RunLoopWin.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WTF/wtf/win/RunLoopWin.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">     return uniqueTimerID++;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RunLoop::TimerBase::TimerBase(RunLoop* runLoop)
</del><ins>+RunLoop::TimerBase::TimerBase(RunLoop&amp; runLoop)
</ins><span class="cx">     : m_runLoop(runLoop)
</span><span class="cx">     , m_ID(generateTimerID())
</span><span class="cx">     , m_isRepeating(false)
</span><span class="lines">@@ -154,23 +154,23 @@
</span><span class="cx"> void RunLoop::TimerBase::start(double nextFireInterval, bool repeat)
</span><span class="cx"> {
</span><span class="cx">     m_isRepeating = repeat;
</span><del>-    m_runLoop-&gt;m_activeTimers.set(m_ID, this);
-    ::SetTimer(m_runLoop-&gt;m_runLoopMessageWindow, m_ID, nextFireInterval * 1000, 0);
</del><ins>+    m_runLoop.m_activeTimers.set(m_ID, this);
+    ::SetTimer(m_runLoop.m_runLoopMessageWindow, m_ID, nextFireInterval * 1000, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RunLoop::TimerBase::stop()
</span><span class="cx"> {
</span><del>-    TimerMap::iterator it = m_runLoop-&gt;m_activeTimers.find(m_ID);
-    if (it == m_runLoop-&gt;m_activeTimers.end())
</del><ins>+    TimerMap::iterator it = m_runLoop.m_activeTimers.find(m_ID);
+    if (it == m_runLoop.m_activeTimers.end())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_runLoop-&gt;m_activeTimers.remove(it);
-    ::KillTimer(m_runLoop-&gt;m_runLoopMessageWindow, m_ID);
</del><ins>+    m_runLoop.m_activeTimers.remove(it);
+    ::KillTimer(m_runLoop.m_runLoopMessageWindow, m_ID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RunLoop::TimerBase::isActive() const
</span><span class="cx"> {
</span><del>-    return m_runLoop-&gt;m_activeTimers.contains(m_ID);
</del><ins>+    return m_runLoop.m_activeTimers.contains(m_ID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/ChangeLog        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2014-03-17  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        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):
+
</ins><span class="cx"> 2014-03-17  Giovanni Campagna  &lt;gcampagna@src.gnome.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Don't busy loop when the socket is full
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -67,12 +67,12 @@
</span><span class="cx"> 
</span><span class="cx"> void DatabaseProcess::didClose(IPC::Connection*)
</span><span class="cx"> {
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DatabaseProcess::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference, IPC::StringReference)
</span><span class="cx"> {
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;UniqueIDBDatabase&gt; DatabaseProcess::getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier&amp; identifier)
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -1085,7 +1085,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Balanced by an adoptRef() in ::performNextMainThreadTask
</span><span class="cx">     ref();
</span><del>-    RunLoop::main()-&gt;dispatch(bind(&amp;UniqueIDBDatabase::performNextMainThreadTask, this));
</del><ins>+    RunLoop::main().dispatch(bind(&amp;UniqueIDBDatabase::performNextMainThreadTask, this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UniqueIDBDatabase::performNextMainThreadTask()
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -125,12 +125,12 @@
</span><span class="cx"> void NetworkProcess::didClose(IPC::Connection*)
</span><span class="cx"> {
</span><span class="cx">     // The UIProcess just exited.
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcess::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference, IPC::StringReference)
</span><span class="cx"> {
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcess::didCreateDownload()
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx">     m_suggestedRequestForWillSendRequest.updateFromDelegatePreservingOldHTTPBody(newRequest);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RunLoop::main()-&gt;dispatch(bind(&amp;NetworkResourceLoadScheduler::receivedRedirect, &amp;NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
</del><ins>+    RunLoop::main().dispatch(bind(&amp;NetworkResourceLoadScheduler::receivedRedirect, &amp;NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
</ins><span class="cx"> 
</span><span class="cx">     m_request = m_suggestedRequestForWillSendRequest;
</span><span class="cx">     m_suggestedRequestForWillSendRequest = ResourceRequest();
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Connection::SyncMessageState : public ThreadSafeRefCounted&lt;Connection::SyncMessageState&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;SyncMessageState&gt; getOrCreate(RunLoop*);
</del><ins>+    static PassRefPtr&lt;SyncMessageState&gt; getOrCreate(RunLoop&amp;);
</ins><span class="cx">     ~SyncMessageState();
</span><span class="cx"> 
</span><span class="cx">     void wakeUpClientRunLoop()
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">     void dispatchMessages(Connection* allowedConnection);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit SyncMessageState(RunLoop*);
</del><ins>+    explicit SyncMessageState(RunLoop&amp;);
</ins><span class="cx"> 
</span><span class="cx">     typedef HashMap&lt;RunLoop*, SyncMessageState*&gt; SyncMessageStateMap;
</span><span class="cx">     static SyncMessageStateMap&amp; syncMessageStateMap()
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> 
</span><span class="cx">     void dispatchMessageAndResetDidScheduleDispatchMessagesForConnection(Connection*);
</span><span class="cx"> 
</span><del>-    RunLoop* m_runLoop;
</del><ins>+    RunLoop&amp; m_runLoop;
</ins><span class="cx">     BinarySemaphore m_waitForSyncReplySemaphore;
</span><span class="cx"> 
</span><span class="cx">     // Protects m_didScheduleDispatchMessagesWorkSet and m_messagesToDispatchWhileWaitingForSyncReply.
</span><span class="lines">@@ -101,10 +101,10 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Connection::SyncMessageState&gt; Connection::SyncMessageState::getOrCreate(RunLoop* runLoop)
</del><ins>+PassRefPtr&lt;Connection::SyncMessageState&gt; Connection::SyncMessageState::getOrCreate(RunLoop&amp; runLoop)
</ins><span class="cx"> {
</span><span class="cx">     MutexLocker locker(syncMessageStateMapMutex());
</span><del>-    SyncMessageStateMap::AddResult result = syncMessageStateMap().add(runLoop, nullptr);
</del><ins>+    SyncMessageStateMap::AddResult result = syncMessageStateMap().add(&amp;runLoop, nullptr);
</ins><span class="cx"> 
</span><span class="cx">     if (!result.isNewEntry) {
</span><span class="cx">         ASSERT(result.iterator-&gt;value);
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     return syncMessageState.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Connection::SyncMessageState::SyncMessageState(RunLoop* runLoop)
</del><ins>+Connection::SyncMessageState::SyncMessageState(RunLoop&amp; runLoop)
</ins><span class="cx">     : m_runLoop(runLoop)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -126,8 +126,8 @@
</span><span class="cx"> {
</span><span class="cx">     MutexLocker locker(syncMessageStateMapMutex());
</span><span class="cx">     
</span><del>-    ASSERT(syncMessageStateMap().contains(m_runLoop));
-    syncMessageStateMap().remove(m_runLoop);
</del><ins>+    ASSERT(syncMessageStateMap().contains(&amp;m_runLoop));
+    syncMessageStateMap().remove(&amp;m_runLoop);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(m_messagesToDispatchWhileWaitingForSyncReply.isEmpty());
</span><span class="cx"> }
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         MutexLocker locker(m_mutex);
</span><span class="cx">         
</span><span class="cx">         if (m_didScheduleDispatchMessagesWorkSet.add(connection).isNewEntry)
</span><del>-            m_runLoop-&gt;dispatch(bind(&amp;SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection, this, RefPtr&lt;Connection&gt;(connection)));
</del><ins>+            m_runLoop.dispatch(bind(&amp;SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection, this, RefPtr&lt;Connection&gt;(connection)));
</ins><span class="cx"> 
</span><span class="cx">         m_messagesToDispatchWhileWaitingForSyncReply.append(std::move(connectionAndIncomingMessage));
</span><span class="cx">     }
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::SyncMessageState::dispatchMessages(Connection* allowedConnection)
</span><span class="cx"> {
</span><del>-    ASSERT(m_runLoop == RunLoop::current());
</del><ins>+    ASSERT(&amp;m_runLoop == &amp;RunLoop::current());
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;ConnectionAndIncomingMessage&gt; messagesToDispatchWhileWaitingForSyncReply;
</span><span class="cx"> 
</span><span class="lines">@@ -200,17 +200,17 @@
</span><span class="cx">     dispatchMessages(connection);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Connection&gt; Connection::createServerConnection(Identifier identifier, Client* client, RunLoop* clientRunLoop)
</del><ins>+PassRefPtr&lt;Connection&gt; Connection::createServerConnection(Identifier identifier, Client* client, RunLoop&amp; clientRunLoop)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(new Connection(identifier, true, client, clientRunLoop));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Connection&gt; Connection::createClientConnection(Identifier identifier, Client* client, RunLoop* clientRunLoop)
</del><ins>+PassRefPtr&lt;Connection&gt; Connection::createClientConnection(Identifier identifier, Client* client, RunLoop&amp; clientRunLoop)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(new Connection(identifier, false, client, clientRunLoop));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Connection::Connection(Identifier identifier, bool isServer, Client* client, RunLoop* clientRunLoop)
</del><ins>+Connection::Connection(Identifier identifier, bool isServer, Client* client, RunLoop&amp; clientRunLoop)
</ins><span class="cx">     : m_client(client)
</span><span class="cx">     , m_isServer(isServer)
</span><span class="cx">     , m_syncRequestID(0)
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue* workQueue, WorkQueueMessageReceiver* workQueueMessageReceiver)
</span><span class="cx"> {
</span><del>-    ASSERT(RunLoop::current() == m_clientRunLoop);
</del><ins>+    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</ins><span class="cx">     ASSERT(!m_isConnected);
</span><span class="cx"> 
</span><span class="cx">     m_connectionQueue-&gt;dispatch(bind(&amp;Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue, this, messageReceiverName, RefPtr&lt;WorkQueue&gt;(workQueue), RefPtr&lt;WorkQueueMessageReceiver&gt;(workQueueMessageReceiver)));
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::removeWorkQueueMessageReceiver(StringReference messageReceiverName)
</span><span class="cx"> {
</span><del>-    ASSERT(RunLoop::current() == m_clientRunLoop);
</del><ins>+    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</ins><span class="cx"> 
</span><span class="cx">     m_connectionQueue-&gt;dispatch(bind(&amp;Connection::removeWorkQueueMessageReceiverOnConnectionWorkQueue, this, messageReceiverName));
</span><span class="cx"> }
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;MessageDecoder&gt; Connection::sendSyncMessage(uint64_t syncRequestID, std::unique_ptr&lt;MessageEncoder&gt; encoder, std::chrono::milliseconds timeout, unsigned syncSendFlags)
</span><span class="cx"> {
</span><del>-    if (RunLoop::current() != m_clientRunLoop) {
</del><ins>+    if (&amp;RunLoop::current() != &amp;m_clientRunLoop) {
</ins><span class="cx">         // No flags are supported for synchronous messages sent from secondary threads.
</span><span class="cx">         ASSERT(!syncSendFlags);
</span><span class="cx">         return sendSyncMessageFromSecondaryThread(syncRequestID, std::move(encoder), timeout);
</span><span class="lines">@@ -480,7 +480,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;MessageDecoder&gt; Connection::sendSyncMessageFromSecondaryThread(uint64_t syncRequestID, std::unique_ptr&lt;MessageEncoder&gt; encoder, std::chrono::milliseconds timeout)
</span><span class="cx"> {
</span><del>-    ASSERT(RunLoop::current() != m_clientRunLoop);
</del><ins>+    ASSERT(&amp;RunLoop::current() != &amp;m_clientRunLoop);
</ins><span class="cx"> 
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">             // FIXME: Although we run forever, any events incoming will cause us to drop out and exit out. This however doesn't
</span><span class="cx">             // account for a timeout value passed in. Timeout is always NoTimeout in these cases, but that could change.
</span><del>-            RunLoop::current()-&gt;runForDuration(1e10);
</del><ins>+            RunLoop::current().runForDuration(1e10);
</ins><span class="cx">             timedOut = currentTime() &gt;= absoluteTime;
</span><span class="cx"> #endif
</span><span class="cx">         } else
</span><span class="lines">@@ -613,11 +613,11 @@
</span><span class="cx">             CString messageReceiverName = &quot;&lt;unknown message&gt;&quot;;
</span><span class="cx">             CString messageName = String::format(&quot;&lt;message length: %zu bytes&gt;&quot;, message-&gt;length()).utf8();
</span><span class="cx"> 
</span><del>-            m_clientRunLoop-&gt;dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, messageReceiverName, messageName));
</del><ins>+            m_clientRunLoop.dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, messageReceiverName, messageName));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        m_clientRunLoop-&gt;dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, message-&gt;messageReceiverName().toString(), message-&gt;messageName().toString()));
</del><ins>+        m_clientRunLoop.dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, message-&gt;messageReceiverName().toString(), message-&gt;messageName().toString()));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -676,7 +676,7 @@
</span><span class="cx">     if (m_didCloseOnConnectionWorkQueueCallback)
</span><span class="cx">         m_didCloseOnConnectionWorkQueueCallback(this);
</span><span class="cx"> 
</span><del>-    m_clientRunLoop-&gt;dispatch(WTF::bind(&amp;Connection::dispatchConnectionDidClose, this));
</del><ins>+    m_clientRunLoop.dispatch(WTF::bind(&amp;Connection::dispatchConnectionDidClose, this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Connection::dispatchConnectionDidClose()
</span><span class="lines">@@ -745,7 +745,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::dispatchDidReceiveInvalidMessage(const CString&amp; messageReceiverNameString, const CString&amp; messageNameString)
</span><span class="cx"> {
</span><del>-    ASSERT(RunLoop::current() == m_clientRunLoop);
</del><ins>+    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</ins><span class="cx"> 
</span><span class="cx">     if (!m_client)
</span><span class="cx">         return;
</span><span class="lines">@@ -768,7 +768,7 @@
</span><span class="cx">         m_incomingMessages.append(std::move(incomingMessage));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_clientRunLoop-&gt;dispatch(WTF::bind(&amp;Connection::dispatchOneMessage, this));
</del><ins>+    m_clientRunLoop.dispatch(WTF::bind(&amp;Connection::dispatchOneMessage, this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Connection::dispatchMessage(MessageDecoder&amp; decoder)
</span><span class="lines">@@ -825,7 +825,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::wakeUpRunLoop()
</span><span class="cx"> {
</span><del>-    m_clientRunLoop-&gt;wakeUp();
</del><ins>+    m_clientRunLoop.wakeUp();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.h        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -127,8 +127,8 @@
</span><span class="cx">     static Connection::SocketPair createPlatformConnection();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;Connection&gt; createServerConnection(Identifier, Client*, WTF::RunLoop* clientRunLoop);
-    static PassRefPtr&lt;Connection&gt; createClientConnection(Identifier, Client*, WTF::RunLoop* clientRunLoop);
</del><ins>+    static PassRefPtr&lt;Connection&gt; createServerConnection(Identifier, Client*, WTF::RunLoop&amp; clientRunLoop);
+    static PassRefPtr&lt;Connection&gt; createClientConnection(Identifier, Client*, WTF::RunLoop&amp; clientRunLoop);
</ins><span class="cx">     ~Connection();
</span><span class="cx"> 
</span><span class="cx">     Client* client() const { return m_client; }
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">     Identifier identifier() const;
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    Connection(Identifier, bool isServer, Client*, WTF::RunLoop* clientRunLoop);
</del><ins>+    Connection(Identifier, bool isServer, Client*, WTF::RunLoop&amp; clientRunLoop);
</ins><span class="cx">     void platformInitialize(Identifier);
</span><span class="cx">     void platformInvalidate();
</span><span class="cx">     
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_isConnected;
</span><span class="cx">     RefPtr&lt;WorkQueue&gt; m_connectionQueue;
</span><del>-    WTF::RunLoop* m_clientRunLoop;
</del><ins>+    WTF::RunLoop&amp; m_clientRunLoop;
</ins><span class="cx"> 
</span><span class="cx">     HashMap&lt;StringReference, std::pair&lt;RefPtr&lt;WorkQueue&gt;, RefPtr&lt;WorkQueueMessageReceiver&gt;&gt;&gt; m_workQueueMessageReceivers;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCmacConnectionMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx">     if (decoder-&gt;messageReceiverName() == &quot;IPC&quot; &amp;&amp; decoder-&gt;messageName() == &quot;SetExceptionPort&quot;) {
</span><span class="cx">         if (m_isServer) {
</span><span class="cx">             // Server connections aren't supposed to have their exception ports overriden. Treat this as an invalid message.
</span><del>-            m_clientRunLoop-&gt;dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, decoder-&gt;messageReceiverName().toString(), decoder-&gt;messageName().toString()));
</del><ins>+            m_clientRunLoop.dispatch(bind(&amp;Connection::dispatchDidReceiveInvalidMessage, this, decoder-&gt;messageReceiverName().toString(), decoder-&gt;messageName().toString()));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">         MachPort exceptionPort;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedChildProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ChildProcess.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ChildProcess::stopRunLoop()
</span><span class="cx"> {
</span><del>-    RunLoop::main()-&gt;stop();
</del><ins>+    RunLoop::main().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ChildProcess::terminate()
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNPObjectProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/Shared/Plugins/NPObjectProxy.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">     // that is known to be misused during plugin teardown, and to not be concerned about change in behavior if this
</span><span class="cx">     // occured at any other time.
</span><span class="cx">     if (!isMainThread()) {
</span><del>-        RunLoop::main()-&gt;dispatch(bind(&amp;NPObjectProxy::NP_Deallocate, npObject));
</del><ins>+        RunLoop::main().dispatch(bind(&amp;NPObjectProxy::NP_Deallocate, npObject));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchereflProcessLauncherEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">         close(sockets[0]);
</span><span class="cx">         m_processIdentifier = pid;
</span><span class="cx">         // We've finished launching the process, message back to the main run loop.
</span><del>-        RunLoop::main()-&gt;dispatch(bind(&amp;ProcessLauncher::didFinishLaunchingProcess, this, pid, sockets[1]));
</del><ins>+        RunLoop::main().dispatch(bind(&amp;ProcessLauncher::didFinishLaunchingProcess, this, pid, sockets[1]));
</ins><span class="cx">     } else {
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     m_processIdentifier = pid;
</span><span class="cx"> 
</span><span class="cx">     // We've finished launching the process, message back to the main run loop.
</span><del>-    RunLoop::main()-&gt;dispatch(bind(&amp;ProcessLauncher::didFinishLaunchingProcess, this, m_processIdentifier, sockets[1]));
</del><ins>+    RunLoop::main().dispatch(bind(&amp;ProcessLauncher::didFinishLaunchingProcess, this, m_processIdentifier, sockets[1]));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ProcessLauncher::terminateProcess()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">             // And the receive right.
</span><span class="cx">             mach_port_mod_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_RECEIVE, -1);
</span><span class="cx"> 
</span><del>-            RunLoop::main()-&gt;dispatch(bind(didFinishLaunchingProcessFunction, that, 0, IPC::Connection::Identifier()));
</del><ins>+            RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, 0, IPC::Connection::Identifier()));
</ins><span class="cx">         } else {
</span><span class="cx">             ASSERT(type == XPC_TYPE_DICTIONARY);
</span><span class="cx">             ASSERT(!strcmp(xpc_dictionary_get_string(reply, &quot;message-name&quot;), &quot;process-finished-launching&quot;));
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx">             pid_t processIdentifier = xpc_connection_get_pid(connection);
</span><span class="cx"> 
</span><span class="cx">             // We've finished launching the process, message back to the main run loop.
</span><del>-            RunLoop::main()-&gt;dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort, connection)));
</del><ins>+            RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort, connection)));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         that-&gt;deref();
</span><span class="lines">@@ -358,7 +358,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // We've finished launching the process, message back to the main run loop.
</span><del>-    RunLoop::main()-&gt;dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
</del><ins>+    RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -498,7 +498,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // We've finished launching the process, message back to the main run loop.
</span><del>-    RunLoop::main()-&gt;dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
</del><ins>+    RunLoop::main().dispatch(bind(didFinishLaunchingProcessFunction, that, processIdentifier, IPC::Connection::Identifier(listeningPort)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ProcessLauncher::launchProcess()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageStorageManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -421,14 +421,14 @@
</span><span class="cx">     m_queue-&gt;dispatch(bind(&amp;StorageManager::invalidateConnectionInternal, this, RefPtr&lt;IPC::Connection&gt;(webProcessProxy-&gt;connection())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StorageManager::getOrigins(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector&lt;RefPtr&lt;WebCore::SecurityOrigin&gt;&gt;&amp; securityOrigins, void* context))
</del><ins>+void StorageManager::getOrigins(FunctionDispatcher&amp; callbackDispatcher, void* context, void (*callback)(const Vector&lt;RefPtr&lt;WebCore::SecurityOrigin&gt;&gt;&amp; securityOrigins, void* context))
</ins><span class="cx"> {
</span><del>-    m_queue-&gt;dispatch(bind(&amp;StorageManager::getOriginsInternal, this, RefPtr&lt;FunctionDispatcher&gt;(callbackDispatcher), context, callback));
</del><ins>+    m_queue-&gt;dispatch(bind(&amp;StorageManager::getOriginsInternal, this, RefPtr&lt;FunctionDispatcher&gt;(&amp;callbackDispatcher), context, callback));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StorageManager::getStorageDetailsByOrigin(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector&lt;LocalStorageDetails&gt;&amp; storageDetails, void* context))
</del><ins>+void StorageManager::getStorageDetailsByOrigin(FunctionDispatcher&amp; callbackDispatcher, void* context, void (*callback)(const Vector&lt;LocalStorageDetails&gt;&amp; storageDetails, void* context))
</ins><span class="cx"> {
</span><del>-    m_queue-&gt;dispatch(bind(&amp;StorageManager::getStorageDetailsByOriginInternal, this, RefPtr&lt;FunctionDispatcher&gt;(callbackDispatcher), context, callback));
</del><ins>+    m_queue-&gt;dispatch(bind(&amp;StorageManager::getStorageDetailsByOriginInternal, this, RefPtr&lt;FunctionDispatcher&gt;(&amp;callbackDispatcher), context, callback));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StorageManager::deleteEntriesForOrigin(SecurityOrigin* securityOrigin)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessStorageStorageManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -62,8 +62,8 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Instead of a context + C function, this should take a WTF::Function, but we currently don't
</span><span class="cx">     // support arguments in functions.
</span><del>-    void getOrigins(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector&lt;RefPtr&lt;WebCore::SecurityOrigin&gt;&gt;&amp;, void* context));
-    void getStorageDetailsByOrigin(FunctionDispatcher* callbackDispatcher, void* context, void (*callback)(const Vector&lt;LocalStorageDetails&gt;&amp;, void* context));
</del><ins>+    void getOrigins(FunctionDispatcher&amp; callbackDispatcher, void* context, void (*callback)(const Vector&lt;RefPtr&lt;WebCore::SecurityOrigin&gt;&gt;&amp;, void* context));
+    void getStorageDetailsByOrigin(FunctionDispatcher&amp; callbackDispatcher, void* context, void (*callback)(const Vector&lt;LocalStorageDetails&gt;&amp;, void* context));
</ins><span class="cx">     void deleteEntriesForOrigin(WebCore::SecurityOrigin*);
</span><span class="cx">     void deleteAllEntries();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsNetscapeNetscapePlugincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx"> 
</span><span class="cx"> void NetscapePlugin::pluginThreadAsyncCall(void (*function)(void*), void* userData)
</span><span class="cx"> {
</span><del>-    RunLoop::main()-&gt;dispatch(WTF::bind(&amp;NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
</del><ins>+    RunLoop::main().dispatch(WTF::bind(&amp;NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void NetscapePlugin::handlePluginThreadAsyncCall(void (*function)(void*), void* userData)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -1573,7 +1573,7 @@
</span><span class="cx">     // the destroyed object higher on the stack. To prevent this, if the plug-in has
</span><span class="cx">     // only one remaining reference, call deref() asynchronously.
</span><span class="cx">     if (hasOneRef())
</span><del>-        RunLoop::main()-&gt;dispatch(bind(derefPluginView, this));
</del><ins>+        RunLoop::main().dispatch(bind(derefPluginView, this));
</ins><span class="cx">     else
</span><span class="cx">         deref();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">     UNUSED_PARAM(canRubberBandAtBottom);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RunLoop::main()-&gt;dispatch(bind(&amp;EventDispatcher::dispatchWheelEvent, this, pageID, wheelEvent));
</del><ins>+    RunLoop::main().dispatch(bind(&amp;EventDispatcher::dispatchWheelEvent, this, pageID, wheelEvent));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void EventDispatcher::dispatchWheelEvent(uint64_t pageID, const WebWheelEvent&amp; wheelEvent)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageViewUpdateDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">         MutexLocker locker(m_dataMutex);
</span><span class="cx">         m_latestUpdate.set(pageID, visibleContentRectUpdateInfo);
</span><span class="cx">     }
</span><del>-    RunLoop::main()-&gt;dispatch(bind(&amp;ViewUpdateDispatcher::dispatchVisibleContentRectUpdate, this));
</del><ins>+    RunLoop::main().dispatch(bind(&amp;ViewUpdateDispatcher::dispatchVisibleContentRectUpdate, this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ViewUpdateDispatcher::dispatchVisibleContentRectUpdate()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -885,7 +885,7 @@
</span><span class="cx">     WebProcess::shared().removeWebPage(m_pageID);
</span><span class="cx"> 
</span><span class="cx">     if (isRunningModal)
</span><del>-        RunLoop::main()-&gt;stop();
</del><ins>+        RunLoop::main().stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::tryClose()
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Tools/ChangeLog        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-03-17  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        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):
+
</ins><span class="cx"> 2014-03-17  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         sort-export-file --help doesn't work (missing 'use')
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkDOMDOMWindowTestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp (165745 => 165746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp        2014-03-17 18:20:28 UTC (rev 165745)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp        2014-03-17 18:47:33 UTC (rev 165746)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">     test-&gt;notify(&quot;loaded&quot;, &quot;&quot;);
</span><span class="cx"> 
</span><span class="cx">     // Stop the loop and let testSignals() or testDispatchEvent() continue its course
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> 
</span><span class="cx">     return FALSE;
</span><span class="cx"> }
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">     test-&gt;notify(&quot;finish&quot;, &quot;&quot;);
</span><span class="cx"> 
</span><span class="cx">     // Stop the loop and let testSignals() or testDispatchEvent() continue its course
</span><del>-    RunLoop::current()-&gt;stop();
</del><ins>+    RunLoop::current().stop();
</ins><span class="cx"> 
</span><span class="cx">     return FALSE;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>