Bug 59705 - WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
Summary: WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 35943
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-28 09:19 PDT by David Kilzer (:ddkilzer)
Modified: 2011-04-28 17:07 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.61 KB, patch)
2011-04-28 09:19 PDT, David Kilzer (:ddkilzer)
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-04-28 09:19:28 PDT
Created attachment 91502 [details]
Patch

Reviewed by NOBODY (OOPS!).

* wtf/mac/MainThreadMac.mm:
(WTF::postTimer): Use RetainPtr to plug the leak.
---
 2 files changed, 12 insertions(+), 1 deletions(-)
Comment 1 Simon Fraser (smfr) 2011-04-28 09:20:53 PDT
Comment on attachment 91502 [details]
Patch

Good catch!
Comment 2 WebKit Review Bot 2011-04-28 09:21:53 PDT
Attachment 91502 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 David Kilzer (:ddkilzer) 2011-04-28 09:22:25 PDT
This regressed in r55816 for Bug 35943.  <http://trac.webkit.org/changeset/55816>
Comment 4 David Kilzer (:ddkilzer) 2011-04-28 09:40:38 PDT
Committed r85195: <http://trac.webkit.org/changeset/85195>
Comment 5 David Kilzer (:ddkilzer) 2011-04-28 16:54:53 PDT
This needs to be rolled out.  It causes crashes on Lion.
Comment 6 David Kilzer (:ddkilzer) 2011-04-28 16:56:02 PDT
<rdar://problem/9355811>
Comment 7 Darin Adler 2011-04-28 17:00:07 PDT
Comment on attachment 91502 [details]
Patch

I don’t think this fix is correct. The timerFired function releases the timer when it fires, so as far as I can tell there is no leak here.
Comment 8 David Kilzer (:ddkilzer) 2011-04-28 17:07:57 PDT
(In reply to comment #7)
> (From update of attachment 91502 [details])
> I don’t think this fix is correct. The timerFired function releases the timer when it fires, so as far as I can tell there is no leak here.

Ahh...that's kind of strange, but it works.

Rolled out in r85265.  <http://trac.webkit.org/changeset/85265>

Closing as RESOLVED/INVALID.