Bug 119003 - [GTK] GtkAdjustmentWatcher idle source not correctly handled
Summary: [GTK] GtkAdjustmentWatcher idle source not correctly handled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 118396 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-23 01:52 PDT by Carlos Garcia Campos
Modified: 2013-08-20 10:06 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.04 KB, patch)
2013-07-23 01:55 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (3.19 KB, patch)
2013-07-23 03:04 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2013-07-23 01:52:17 PDT
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.
Comment 1 Carlos Garcia Campos 2013-07-23 01:55:42 PDT
Created attachment 207312 [details]
Patch

Only reset the idle id when the idle callback has been called.
Comment 2 Carlos Garcia Campos 2013-07-23 02:05:27 PDT
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.
Comment 3 Carlos Garcia Campos 2013-07-23 03:04:15 PDT
Created attachment 207317 [details]
Updated patch

Also destroy the source in GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars()
Comment 4 Carlos Garcia Campos 2013-07-23 08:07:04 PDT
*** Bug 118396 has been marked as a duplicate of this bug. ***
Comment 5 Martin Robinson 2013-07-23 08:13:13 PDT
Comment on attachment 207317 [details]
Updated patch

Thanks!
Comment 6 Carlos Garcia Campos 2013-07-23 08:34:59 PDT
Committed r153052: <http://trac.webkit.org/changeset/153052>