[Webkit-unassigned] [Bug 95923] [EFL] Implement GCActivityCallback
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 21 23:43:31 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=95923
--- Comment #25 from Hojong Han <hojong.han at samsung.com> 2013-05-21 23:41:59 PST ---
(From update of attachment 202500)
View in context: https://bugs.webkit.org/attachment.cgi?id=202500&action=review
>> Source/JavaScriptCore/heap/HeapTimer.cpp:188
>> + return ECORE_CALLBACK_CANCEL;
>
> You need to set heapTimer->m_timer to 0 before returning. When you return ECORE_CALLBACK_CANCEL, the handle will become invalid and ecore_timer_del(m_timer) will fail in the destructor.
I'll apply your review to the patch.
>> Source/JavaScriptCore/heap/HeapTimer.h:42
>> +#include <Ecore.h>
>
> A forward declaration of Ecore_Timer would suffice here. And this include can be moved to the cpp.
Do you mean that it'd better move "#include <Ecore.h>" to the cpp?
>> Source/JavaScriptCore/heap/HeapTimer.h:87
>> + void stop()
>
> Can you put the method body in the cpp file instead?
This'll be moved as your comment.
>> Source/JavaScriptCore/heap/HeapTimer.h:89
>> + if (m_timer) {
>
> We usually do the opposite in WebKit, return early.
> If (!m_timer)
> return;
This'll be moved as your comment.
>> Source/JavaScriptCore/runtime/GCActivityCallback.cpp:127
>> + m_timer = ecore_timer_add(newDelay, reinterpret_cast<Ecore_Task_Cb>(HeapTimer::timerEvent), this);
>
> I would add a ASSERT(!m_timer); right before this line to make sure we never leak.
I'll fix to set m_timer as 0 in stop().
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list