Bug 94264 - Heap::setActivityCallback leaks the old GCActivityCallback
Summary: Heap::setActivityCallback leaks the old GCActivityCallback
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 16:28 PDT by Mark Hahnenberg
Modified: 2017-06-16 19:19 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.19 KB, patch)
2012-08-16 16:56 PDT, Mark Hahnenberg
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2012-08-16 16:28:59 PDT
Title says it all.
Comment 1 Mark Hahnenberg 2012-08-16 16:56:15 PDT
Created attachment 158946 [details]
Patch
Comment 2 Geoffrey Garen 2012-08-16 17:33:18 PDT
Comment on attachment 158946 [details]
Patch

This fix is OK.

In the long run, I'd prefer a less whacky ownership model: Put the callback in a smart pointer, have its destructor lock the shutdown mutex and invalidate and unschedule its timer, and have timerDidFire lock the shutdown mutex and double-check that the timer is still valid.
Comment 3 Joseph Pecoraro 2017-06-16 19:19:47 PDT
This never landed but the code has changed significantly since. Lets close.