RESOLVED FIXED 56607
RequestAnimationFrame callbacks prevent Document from being released on detach
https://bugs.webkit.org/show_bug.cgi?id=56607
Summary RequestAnimationFrame callbacks prevent Document from being released on detach
Zhenyao Mo
Reported 2011-03-17 16:01:13 PDT
This is also reported in crbug: http://code.google.com/p/chromium/issues/detail?id=74636 After a discussion with Adam, it seems like using ActiveDOMObject for RequestAnimationFrameCallback is the proper way, however, delete callbacks on Document::detach also fixes this memory holding. Let's get the quick/simple fix in now and merge back to chrome M10 and M11, then we can do the proper ActiveDOMObject thing on the top of the tree.
Attachments
Patch (1.52 KB, patch)
2011-03-17 16:04 PDT, Zhenyao Mo
abarth: review+
Zhenyao Mo
Comment 1 2011-03-17 16:04:48 PDT
Adam Barth
Comment 2 2011-03-17 16:14:15 PDT
Comment on attachment 86107 [details] Patch Can you add a FIXME comment to both these locations saying that we should consider using ActiveDOMObject in the future?
Zhenyao Mo
Comment 3 2011-03-17 16:15:24 PDT
Will do upon landing.
Zhenyao Mo
Comment 4 2011-03-17 16:26:52 PDT
James Robinson
Comment 5 2011-03-17 16:39:01 PDT
As a nit, I personally like .clear() instead of = 0 to null out an OwnPtr<>'s reference. As for ActiveDOMObject you are all welcome to debate ap@ on that point but I'm not inclined to jump on that grenade again.
Zhenyao Mo
Comment 6 2011-03-17 17:02:33 PDT
(In reply to comment #5) > As a nit, I personally like .clear() instead of = 0 to null out an OwnPtr<>'s reference. > > As for ActiveDOMObject you are all welcome to debate ap@ on that point but I'm not inclined to jump on that grenade again. Feel free to change it, and thanks for the warning of the grenade. :)
Note You need to log in before you can comment on or make changes to this bug.