Bug 138915 - Throttled DOMTimers can prevent their document from being garbage collected
Summary: Throttled DOMTimers can prevent their document from being garbage collected
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 138292
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-20 00:31 PST by Chris Dumez
Modified: 2014-11-21 19:29 PST (History)
9 users (show)

See Also:


Attachments
Patch (12.73 KB, patch)
2014-11-20 11:59 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.15 KB, patch)
2014-11-21 18:07 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-11-20 00:31:45 PST
It seems throttled DOMTimers can prevent their document from being garbage collected. This is likely caused by DOMTimer::m_elementsCausingThrottling keeping a reference to the Elements that caused its throttling. It looks like we may need to use weak references to those Elements in DOMTimer.

I realized this when trying to write a layout test for:
https://bugs.webkit.org/show_bug.cgi?id=138914
Comment 1 Chris Dumez 2014-11-20 11:59:19 PST
Created attachment 241969 [details]
Patch
Comment 2 Chris Dumez 2014-11-21 18:07:34 PST
Created attachment 242098 [details]
Patch
Comment 3 Chris Dumez 2014-11-21 18:08:16 PST
Stop using a unique_ptr in ElementRareData as per Andreas' comments offline.
Comment 4 WebKit Commit Bot 2014-11-21 19:29:46 PST
Comment on attachment 242098 [details]
Patch

Clearing flags on attachment: 242098

Committed r176496: <http://trac.webkit.org/changeset/176496>
Comment 5 WebKit Commit Bot 2014-11-21 19:29:52 PST
All reviewed patches have been landed.  Closing bug.