Changeset 130534 in webkit


Ignore:
Timestamp:
Oct 5, 2012, 11:34:13 AM (13 years ago)
Author:
jer.noble@apple.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130532 r130534  
     12012-10-05  Jer Noble  <jer.noble@apple.com>
     2
     3        No autorelease pool in place, causing buildup of autoreleased objects.
     4        https://bugs.webkit.org/show_bug.cgi?id=98522
     5        <rdar://problem/11647950>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Wrap each timer callback in an AutodrainPool, ensuring an autorelease
     10        pool is present during calls from C/C++ into ObjC.
     11
     12        * platform/cf/RunLoopTimerCF.cpp:
     13        (WebCore::timerFired):
     14
    1152012-10-05  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/WebCore/platform/cf/RunLoopTimerCF.cpp

    r95901 r130534  
    3232
    3333#include "RunLoopTimer.h"
     34#include "AutodrainedPool.h"
    3435
    3536namespace WebCore {
     
    4243static void timerFired(CFRunLoopTimerRef, void* context)
    4344{
     45    // CFRunLoopTimer does not create an NSAutoreleasePool, like NSTimer does. This can lead to
     46    // autoreleased objects being pushed into NSAutoreleasePools underneath the run loop, which
     47    // are very infrequently drained. Create a new autorelease pool here to give autoreleased objects
     48    // a place to collect.
     49    AutodrainedPool pool;
    4450    RunLoopTimerBase* timer = static_cast<RunLoopTimerBase*>(context);
    4551    timer->fired();
Note: See TracChangeset for help on using the changeset viewer.