Title: [130534] trunk/Source/WebCore
- Revision
- 130534
- Author
- jer.no...@apple.com
- Date
- 2012-10-05 11:34:13 -0700 (Fri, 05 Oct 2012)
Log Message
No autorelease pool in place, causing buildup of autoreleased objects.
https://bugs.webkit.org/show_bug.cgi?id=98522
<rdar://problem/11647950>
Reviewed by Alexey Proskuryakov.
Wrap each timer callback in an AutodrainPool, ensuring an autorelease
pool is present during calls from C/C++ into ObjC.
* platform/cf/RunLoopTimerCF.cpp:
(WebCore::timerFired):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (130533 => 130534)
--- trunk/Source/WebCore/ChangeLog 2012-10-05 18:32:13 UTC (rev 130533)
+++ trunk/Source/WebCore/ChangeLog 2012-10-05 18:34:13 UTC (rev 130534)
@@ -1,3 +1,17 @@
+2012-10-05 Jer Noble <jer.no...@apple.com>
+
+ No autorelease pool in place, causing buildup of autoreleased objects.
+ https://bugs.webkit.org/show_bug.cgi?id=98522
+ <rdar://problem/11647950>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Wrap each timer callback in an AutodrainPool, ensuring an autorelease
+ pool is present during calls from C/C++ into ObjC.
+
+ * platform/cf/RunLoopTimerCF.cpp:
+ (WebCore::timerFired):
+
2012-10-05 Ryosuke Niwa <rn...@webkit.org>
Deleting across multiple paragraphs can change the style of surrounding text
Modified: trunk/Source/WebCore/platform/cf/RunLoopTimerCF.cpp (130533 => 130534)
--- trunk/Source/WebCore/platform/cf/RunLoopTimerCF.cpp 2012-10-05 18:32:13 UTC (rev 130533)
+++ trunk/Source/WebCore/platform/cf/RunLoopTimerCF.cpp 2012-10-05 18:34:13 UTC (rev 130534)
@@ -31,6 +31,7 @@
#if PLATFORM(MAC) && HAVE(RUNLOOP_TIMER)
#include "RunLoopTimer.h"
+#include "AutodrainedPool.h"
namespace WebCore {
@@ -41,6 +42,11 @@
static void timerFired(CFRunLoopTimerRef, void* context)
{
+ // CFRunLoopTimer does not create an NSAutoreleasePool, like NSTimer does. This can lead to
+ // autoreleased objects being pushed into NSAutoreleasePools underneath the run loop, which
+ // are very infrequently drained. Create a new autorelease pool here to give autoreleased objects
+ // a place to collect.
+ AutodrainedPool pool;
RunLoopTimerBase* timer = static_cast<RunLoopTimerBase*>(context);
timer->fired();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes