<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GLIB] Implement garbage collector timers"
href="https://bugs.webkit.org/show_bug.cgi?id=151391#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GLIB] Implement garbage collector timers"
href="https://bugs.webkit.org/show_bug.cgi?id=151391">bug 151391</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=151391#c9">comment #9</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=265749&action=diff" name="attach_265749" title="Patch">attachment 265749</a> <a href="attachment.cgi?id=265749&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=265749&action=review">https://bugs.webkit.org/attachment.cgi?id=265749&action=review</a>
>
> >>> Source/JavaScriptCore/heap/EdenGCActivityCallback.cpp:33
> >>> +#if USE(CF) || USE(GLIB)
> >>
> >> Is USE(GLIB) also true for EFL? I wonder if it wouldn't be better to be more explicit here for the sake of code readability and leave this as:
> >>
> >> #if USE(CF) || PLATFORM(EFL) || USE(GLIB)
> >
> > Yes, it's true.
>
> Why USE(GLIB) then? It's true for both EFL and GTK, but the implementations
> of HeapTimer differ for the two ports.
>
> Since all these classes are based on HeapTimer, I think the PLATFORM(EFL) ||
> PLATFORM(GTK) should be used throughout this patch, instead of bundling them
> under USE(GLIB).</span >
Because this would work for any other port using glib, like WebKit4Wayland, EFL is the exception here, not glib.
<span class="quote">> > Source/JavaScriptCore/heap/HeapTimer.cpp:41
> > #if PLATFORM(EFL)
> > #include <Ecore.h>
> > +#elif USE(GLIB)
> > +#include <glib.h>
> > #endif
>
> Just one example, you end up doing this. It's counter-intuitive because
> PLATFORM(EFL) falls under USE(GLIB), but you still have to special-case it
> because of the different implementations.</span >
Yes, because EFL uses GLIB but its own timer implementation. The EFL implementation is specific to EFL, but the GLIB one is not specific to GTK.
<span class="quote">> > Source/JavaScriptCore/heap/HeapTimer.cpp:174
> > + g_source_attach(m_timer.get(), g_main_context_get_thread_default());
>
> As it stands these timers only fire on main threads, since worker threads
> aren't run via a main loop.</span >
g_main_context_get_thread_default() will return the main thread context from threads not using a main loop in any case. But I could use the main context here to make it explicit.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>