<!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>[191728] trunk/Source</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/191728">191728</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-29 05:19:37 -0700 (Thu, 29 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Use a persistent main loop source in RunLoop glib implementation
https://bugs.webkit.org/show_bug.cgi?id=150590
Reviewed by Žan Doberšek.
Source/WebKit2:
Use RunLoop::dispatch() instead of
GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
cases.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::dragLeave):
Source/WTF:
It's more efficient than creating and destroying a new source for
every dispatch and it simplifies the code.
* wtf/RunLoop.h:
* wtf/glib/MainThreadGLib.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread): Use
RunLoop::dispatch() instead of GMainLoopSource::scheduleAndDeleteOnDestroy().
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::RunLoop): Create and setup the persistent source.
(WTF::RunLoop::~RunLoop): Destroy the persistent source.
(WTF::RunLoop::stop): Stop the persistent source before stopping
the main loop.
(WTF::RunLoop::wakeUp): Make the persistent source active. We
no longer need to explicitly wakeup the context.
(WTF::RunLoop::TimerBase::TimerBase): Create and setup the
persistent source.
(WTF::RunLoop::TimerBase::~TimerBase): Destroy the persistent source.
(WTF::RunLoop::TimerBase::updateReadyTime): Set the ready time
according to the fire interval.
(WTF::RunLoop::TimerBase::start): Make the persistent source active.
(WTF::RunLoop::TimerBase::stop): Stop the persistent source.
(WTF::RunLoop::TimerBase::isActive): Return whether the
persistent source is active.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRunLooph">trunk/Source/WTF/wtf/RunLoop.h</a></li>
<li><a href="#trunkSourceWTFwtfglibMainThreadGLibcpp">trunk/Source/WTF/wtf/glib/MainThreadGLib.cpp</a></li>
<li><a href="#trunkSourceWTFwtfglibRunLoopGLibcpp">trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheIOChannelSoupcpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkDragAndDropHandlercpp">trunk/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WTF/ChangeLog        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Use a persistent main loop source in RunLoop glib implementation
+ https://bugs.webkit.org/show_bug.cgi?id=150590
+
+ Reviewed by Žan Doberšek.
+
+ It's more efficient than creating and destroying a new source for
+ every dispatch and it simplifies the code.
+
+ * wtf/RunLoop.h:
+ * wtf/glib/MainThreadGLib.cpp:
+ (WTF::scheduleDispatchFunctionsOnMainThread): Use
+ RunLoop::dispatch() instead of GMainLoopSource::scheduleAndDeleteOnDestroy().
+ * wtf/glib/RunLoopGLib.cpp:
+ (WTF::RunLoop::RunLoop): Create and setup the persistent source.
+ (WTF::RunLoop::~RunLoop): Destroy the persistent source.
+ (WTF::RunLoop::stop): Stop the persistent source before stopping
+ the main loop.
+ (WTF::RunLoop::wakeUp): Make the persistent source active. We
+ no longer need to explicitly wakeup the context.
+ (WTF::RunLoop::TimerBase::TimerBase): Create and setup the
+ persistent source.
+ (WTF::RunLoop::TimerBase::~TimerBase): Destroy the persistent source.
+ (WTF::RunLoop::TimerBase::updateReadyTime): Set the ready time
+ according to the fire interval.
+ (WTF::RunLoop::TimerBase::start): Make the persistent source active.
+ (WTF::RunLoop::TimerBase::stop): Stop the persistent source.
+ (WTF::RunLoop::TimerBase::isActive): Return whether the
+ persistent source is active.
+
</ins><span class="cx"> 2015-10-28 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, make sure B3 is disabled on iOS for now.
</span></span></pre></div>
<a id="trunkSourceWTFwtfRunLooph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RunLoop.h (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RunLoop.h        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WTF/wtf/RunLoop.h        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx">
</span><span class="cx"> #if USE(GLIB)
</span><del>-#include <wtf/glib/GMainLoopSource.h>
</del><ins>+#include <wtf/glib/GRefPtr.h>
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="lines">@@ -100,7 +100,10 @@
</span><span class="cx"> Ecore_Timer* m_timer;
</span><span class="cx"> bool m_isRepeating;
</span><span class="cx"> #elif USE(GLIB)
</span><del>- GMainLoopSource m_timerSource;
</del><ins>+ void updateReadyTime();
+ GRefPtr<GSource> m_source;
+ bool m_isRepeating { false };
+ std::chrono::microseconds m_fireInterval { 0 };
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -155,11 +158,9 @@
</span><span class="cx">
</span><span class="cx"> static void wakeUpEvent(void* data, void*, unsigned);
</span><span class="cx"> #elif USE(GLIB)
</span><del>-public:
- static gboolean queueWork(RunLoop*);
-private:
</del><span class="cx"> GRefPtr<GMainContext> m_mainContext;
</span><span class="cx"> Vector<GRefPtr<GMainLoop>> m_mainLoops;
</span><ins>+ GRefPtr<GSource> m_source;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWTFwtfglibMainThreadGLibcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/glib/MainThreadGLib.cpp (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/glib/MainThreadGLib.cpp        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WTF/wtf/glib/MainThreadGLib.cpp        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "MainThread.h"
</span><span class="cx">
</span><del>-#include <wtf/glib/GMainLoopSource.h>
</del><ins>+#include <wtf/RunLoop.h>
</ins><span class="cx">
</span><span class="cx"> namespace WTF {
</span><span class="cx">
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> void scheduleDispatchFunctionsOnMainThread()
</span><span class="cx"> {
</span><del>- GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] dispatchFunctionsFromMainThread", std::function<void()>(dispatchFunctionsFromMainThread));
</del><ins>+ RunLoop::main().dispatch(std::function<void()>(dispatchFunctionsFromMainThread));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWTFwtfglibRunLoopGLibcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -32,6 +32,22 @@
</span><span class="cx">
</span><span class="cx"> namespace WTF {
</span><span class="cx">
</span><ins>+static GSourceFuncs runLoopSourceFunctions = {
+ nullptr, // prepare
+ nullptr, // check
+ // dispatch
+ [](GSource* source, GSourceFunc callback, gpointer userData) -> gboolean
+ {
+ if (g_source_get_ready_time(source) == -1)
+ return G_SOURCE_CONTINUE;
+ g_source_set_ready_time(source, -1);
+ return callback(userData);
+ },
+ nullptr, // finalize
+ nullptr, // closure_callback
+ nullptr, // closure_marshall
+};
+
</ins><span class="cx"> RunLoop::RunLoop()
</span><span class="cx"> {
</span><span class="cx"> m_mainContext = g_main_context_get_thread_default();
</span><span class="lines">@@ -42,10 +58,22 @@
</span><span class="cx"> GRefPtr<GMainLoop> innermostLoop = adoptGRef(g_main_loop_new(m_mainContext.get(), FALSE));
</span><span class="cx"> ASSERT(innermostLoop);
</span><span class="cx"> m_mainLoops.append(innermostLoop);
</span><ins>+
+ m_source = adoptGRef(g_source_new(&runLoopSourceFunctions, sizeof(GSource)));
+ g_source_set_name(m_source.get(), "[WebKit] RunLoop work");
+ g_source_set_can_recurse(m_source.get(), TRUE);
+ g_source_set_ready_time(m_source.get(), -1);
+ g_source_set_callback(m_source.get(), [](gpointer userData) -> gboolean {
+ static_cast<RunLoop*>(userData)->performWork();
+ return G_SOURCE_CONTINUE;
+ }, this, nullptr);
+ g_source_attach(m_source.get(), m_mainContext.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RunLoop::~RunLoop()
</span><span class="cx"> {
</span><ins>+ g_source_destroy(m_source.get());
+
</ins><span class="cx"> for (int i = m_mainLoops.size() - 1; i >= 0; --i) {
</span><span class="cx"> if (!g_main_loop_is_running(m_mainLoops[i].get()))
</span><span class="cx"> continue;
</span><span class="lines">@@ -82,6 +110,8 @@
</span><span class="cx">
</span><span class="cx"> void RunLoop::stop()
</span><span class="cx"> {
</span><ins>+ g_source_set_ready_time(m_source.get(), -1);
+
</ins><span class="cx"> // The innermost main loop should always be there.
</span><span class="cx"> ASSERT(!m_mainLoops.isEmpty());
</span><span class="cx"> GRefPtr<GMainLoop> lastMainLoop = m_mainLoops.last();
</span><span class="lines">@@ -91,37 +121,50 @@
</span><span class="cx">
</span><span class="cx"> void RunLoop::wakeUp()
</span><span class="cx"> {
</span><del>- RefPtr<RunLoop> runLoop(this);
- GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] RunLoop work", std::function<void()>([runLoop] {
- runLoop->performWork();
- }), G_PRIORITY_DEFAULT, nullptr, m_mainContext.get());
- g_main_context_wakeup(m_mainContext.get());
</del><ins>+ g_source_set_ready_time(m_source.get(), g_get_monotonic_time());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
</span><span class="cx"> : m_runLoop(runLoop)
</span><ins>+ , m_source(adoptGRef(g_source_new(&runLoopSourceFunctions, sizeof(GSource))))
</ins><span class="cx"> {
</span><ins>+ g_source_set_name(m_source.get(), "[WebKit] RunLoop::Timer work");
+ g_source_set_ready_time(m_source.get(), -1);
+ g_source_set_callback(m_source.get(), [](gpointer userData) -> gboolean {
+ RunLoop::TimerBase* timer = static_cast<RunLoop::TimerBase*>(userData);
+ timer->fired();
+ if (timer->m_isRepeating)
+ timer->updateReadyTime();
+ return G_SOURCE_CONTINUE;
+ }, this, nullptr);
+ g_source_attach(m_source.get(), m_runLoop.m_mainContext.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RunLoop::TimerBase::~TimerBase()
</span><span class="cx"> {
</span><del>- stop();
</del><ins>+ g_source_destroy(m_source.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void RunLoop::TimerBase::updateReadyTime()
+{
+ g_source_set_ready_time(m_source.get(), m_fireInterval.count() ? g_get_monotonic_time() + m_fireInterval.count() : 0);
+}
+
</ins><span class="cx"> void RunLoop::TimerBase::start(double fireInterval, bool repeat)
</span><span class="cx"> {
</span><del>- m_timerSource.scheduleAfterDelay("[WebKit] RunLoop::Timer", std::function<bool ()>([this, repeat] { fired(); return repeat; }),
- std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(fireInterval)), G_PRIORITY_DEFAULT, nullptr, m_runLoop.m_mainContext.get());
</del><ins>+ m_fireInterval = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(fireInterval));
+ m_isRepeating = repeat;
+ updateReadyTime();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RunLoop::TimerBase::stop()
</span><span class="cx"> {
</span><del>- m_timerSource.cancel();
</del><ins>+ g_source_set_ready_time(m_source.get(), -1);
</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_timerSource.isScheduled();
</del><ins>+ return g_source_get_ready_time(m_source.get()) != -1;
</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 (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Use a persistent main loop source in RunLoop glib implementation
+ https://bugs.webkit.org/show_bug.cgi?id=150590
+
+ Reviewed by Žan Doberšek.
+
+ Use RunLoop::dispatch() instead of
+ GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
+ cases.
+
+ * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
+ (WebKit::NetworkCache::runTaskInQueue):
+ * UIProcess/gtk/DragAndDropHandler.cpp:
+ (WebKit::DragAndDropHandler::dragLeave):
+
</ins><span class="cx"> 2015-10-28 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix the build
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheIOChannelSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -30,8 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "NetworkCacheFileSystem.h"
</span><span class="cx"> #include <wtf/MainThread.h>
</span><del>-#include <wtf/glib/GMainLoopSource.h>
-#include <wtf/glib/GMutexLocker.h>
</del><ins>+#include <wtf/RunLoop.h>
</ins><span class="cx"> #include <wtf/glib/GUniquePtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -78,7 +77,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Using nullptr as queue submits the result to the main context.
</span><del>- GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] IOChannel task", WTF::move(task));
</del><ins>+ RunLoop::main().dispatch(WTF::move(task));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void fillDataFromReadBuffer(SoupBuffer* readBuffer, size_t size, Data& data)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkDragAndDropHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp (191727 => 191728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp        2015-10-29 11:13:56 UTC (rev 191727)
+++ trunk/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp        2015-10-29 12:19:37 UTC (rev 191728)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #include <WebCore/GtkUtilities.h>
</span><span class="cx"> #include <WebCore/PasteboardHelper.h>
</span><span class="cx"> #include <gtk/gtk.h>
</span><del>-#include <wtf/glib/GMainLoopSource.h>
</del><ins>+#include <wtf/RunLoop.h>
</ins><span class="cx"> #include <wtf/glib/GUniquePtr.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx"> // During a drop GTK+ will fire a drag-leave signal right before firing
</span><span class="cx"> // the drag-drop signal. We want the actions for drag-leave to happen after
</span><span class="cx"> // those for drag-drop, so schedule them to happen asynchronously here.
</span><del>- GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] handleDragLeaveLater", [this, droppingContext]() {
</del><ins>+ RunLoop::main().dispatch([this, droppingContext]() {
</ins><span class="cx"> auto it = m_droppingContexts.find(droppingContext->gdkContext);
</span><span class="cx"> if (it == m_droppingContexts.end())
</span><span class="cx"> return;
</span></span></pre>
</div>
</div>
</body>
</html>