Changeset 77452 in webkit


Ignore:
Timestamp:
Feb 2, 2011 5:58:03 PM (13 years ago)
Author:
Stephanie Lewis
Message:

https://bugs.webkit.org/show_bug.cgi?id=53361
<rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease
pools not being drained.
Call into AppKit to add observers that push and pop autorelease pools on entry
and exit from the CFRunLoop. This will prevent memory from accumulating.

Reviewed by Geoff Garen.

  • WebProcess/mac/WebProcessMainMac.mm:

(WebKit::WebProcessMain):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r77449 r77452  
     12011-02-02  Stephanie Lewis  <slewis@apple.com>
     2
     3        Reviewed by Geoff Garen.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=53361
     6        <rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease
     7        pools not being drained.
     8        Call into AppKit to add observers that push and pop autorelease pools on entry
     9        and exit from the CFRunLoop.  This will prevent memory from accumulating.
     10
     11        * WebProcess/mac/WebProcessMainMac.mm:
     12        (WebKit::WebProcessMain):
     13
    1142011-02-02  Darin Adler  <darin@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm

    r76991 r77452  
    4747extern "C" kern_return_t bootstrap_look_up2(mach_port_t, const name_t, mach_port_t*, pid_t, uint64_t);
    4848
     49@interface NSApplication (WebNSApplicationDetails)
     50-(void)_installAutoreleasePoolsOnCurrentThreadIfNecessary;
     51@end
     52
    4953#define SHOW_CRASH_REPORTER 1
    5054
     
    9094    [NSApplication sharedApplication];
    9195
     96    // Installs autorelease pools on the current CFRunLoop which prevents memory from accumulating between user events.
     97    // FIXME: Remove when <rdar://problem/8929426> is fixed.
     98    [[NSApplication sharedApplication] _installAutoreleasePoolsOnCurrentThreadIfNecessary];
     99
    92100#if !defined(BUILDING_ON_SNOW_LEOPARD)
    93101    WKAXRegisterRemoteApp();
Note: See TracChangeset for help on using the changeset viewer.