<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#c9">Comment # 9</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:zan@falconsigh.net" title="Zan Dobersek <zan@falconsigh.net>"> <span class="fn">Zan Dobersek</span></a>
</span></b>
<pre>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>
<span class="quote">>>> 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.</span >
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 class="quote">> Source/JavaScriptCore/heap/HeapTimer.cpp:41
> #if PLATFORM(EFL)
> #include <Ecore.h>
> +#elif USE(GLIB)
> +#include <glib.h>
> #endif</span >
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 class="quote">> Source/JavaScriptCore/heap/HeapTimer.cpp:174
> + g_source_attach(m_timer.get(), g_main_context_get_thread_default());</span >
As it stands these timers only fire on main threads, since worker threads aren't run via a main loop.</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>