[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ggaren at apple.com ggaren at apple.com
Wed Dec 22 11:45:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 44a2b5df9a5267006dd5be3e2a495aee77ecd232
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 6 00:13:36 2010 +0000

    Fixed leak seen on buildbot.
    
    Reviewed by Mark Rowe.
    
    * runtime/GCActivityCallbackCF.cpp:
    (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
    (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
    (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
    since anything less would be uncivilized.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64800 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index fbbca99..7da922f 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-05  Geoffrey Garen  <ggaren at apple.com>
+
+        Reviewed by Mark Rowe.
+
+        Fixed leak seen on buildbot.
+
+        * runtime/GCActivityCallbackCF.cpp:
+        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
+        (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
+        (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
+        since anything less would be uncivilized.
+
 2010-08-05  Andy Estes  <aestes at apple.com>
 
         Reviewed by David Kilzer.
diff --git a/JavaScriptCore/runtime/GCActivityCallbackCF.cpp b/JavaScriptCore/runtime/GCActivityCallbackCF.cpp
index cfd07c7..06d4210 100644
--- a/JavaScriptCore/runtime/GCActivityCallbackCF.cpp
+++ b/JavaScriptCore/runtime/GCActivityCallbackCF.cpp
@@ -31,6 +31,7 @@
 
 #include "Collector.h"
 #include "JSLock.h"
+#include <wtf/RetainPtr.h>
 #include <CoreFoundation/CoreFoundation.h>
 
 #if !PLATFORM(CF)
@@ -42,7 +43,7 @@ namespace JSC {
 struct DefaultGCActivityCallbackPlatformData {
     static void trigger(CFRunLoopTimerRef, void *info);
 
-    CFRunLoopTimerRef timer;
+    RetainPtr<CFRunLoopTimerRef> timer;
     CFRunLoopTimerContext context;
 };
 
@@ -62,21 +63,21 @@ DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
 
     memset(&d->context, '\0', sizeof(CFRunLoopTimerContext));
     d->context.info = heap;
-    d->timer = CFRunLoopTimerCreate(0, decade, decade, 0, 0, DefaultGCActivityCallbackPlatformData::trigger, &d->context);
-    CFRunLoopAddTimer(CFRunLoopGetCurrent(), d->timer, kCFRunLoopCommonModes);
+    d->timer.adoptCF(CFRunLoopTimerCreate(0, decade, decade, 0, 0, DefaultGCActivityCallbackPlatformData::trigger, &d->context));
+    CFRunLoopAddTimer(CFRunLoopGetCurrent(), d->timer.get(), kCFRunLoopCommonModes);
 }
 
 DefaultGCActivityCallback::~DefaultGCActivityCallback()
 {
-    CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), d->timer, kCFRunLoopCommonModes);
-    CFRunLoopTimerInvalidate(d->timer);
+    CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), d->timer.get(), kCFRunLoopCommonModes);
+    CFRunLoopTimerInvalidate(d->timer.get());
     d->context.info = 0;
     d->timer = 0;
 }
 
 void DefaultGCActivityCallback::operator()()
 {
-    CFRunLoopTimerSetNextFireDate(d->timer, CFAbsoluteTimeGetCurrent() + 2);
+    CFRunLoopTimerSetNextFireDate(d->timer.get(), CFAbsoluteTimeGetCurrent() + 2);
 }
 
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list