g_source_attach() increments the source ref counter, we should use a GRefPtr for the sources to make sure they are freed. g_source_destroy() doesn't free the source, it marks the source as destroyed and decrements the reference counter, even though the source can't be used anymore, it won't be freed until ref counter is 0.
Created attachment 87847 [details]
Patch to fix the leaks.
Comment on attachment 87847 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=87847&action=review
Great work. Please consider the method name changes below before landing.
> +void RunLoop::TimerBase::reset()
I think the name clearTimerSource better describes what this one does.
> +void RunLoop::TimerBase::resetTimerSource(RunLoop::TimerBase* timer)
Please call this one destroyNotifyCallback to make it clear that this is just used as a callback.
> +gboolean RunLoop::TimerBase::timerFired(RunLoop::TimerBase* timer)
Please call this one timerFiredCallback.
Committed r82805: <http://trac.webkit.org/changeset/82805>