GtkAdjustmentWatcher::updateAdjustmentsFromScrollbarsLater() creates a new idle source and initializes m_updateAdjustmentCallbackId, which is used everywhere and specially in the destructor to cancel the source when the GtkAdjustmentWatcher is deleted. However, m_updateAdjustmentCallbackId is reset to 0 in GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars() only when not returning early. This method is public and not only called by the updateAdjustmentCallback, which means that a call to updateAdjustmentsFromScrollbars could reset the m_updateAdjustmentCallbackId without actually destroying the source.
Created attachment 207312 [details]
Only reset the idle id when the idle callback has been called.
I wonder if should also destroy the source in GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars() where we were setting it to 0 before, since we have already handled the adjustment update.
Created attachment 207317 [details]
Also destroy the source in GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars()
*** Bug 118396 has been marked as a duplicate of this bug. ***
Comment on attachment 207317 [details]
Committed r153052: <http://trac.webkit.org/changeset/153052>