Changeset 72146 in webkit


Ignore:
Timestamp:
Nov 16, 2010 3:54:36 PM (13 years ago)
Author:
Stephanie Lewis
Message:

<rdar://problem/8624267> Leak creating offscreen webview running fast/dom tests

Reviewed by Geoff Garen.

WebKit/mac:

Make a static provider for WebDeviceOrientationProviderMock. The old code allocated a new WebDeviceOrientationProviderMock for
every WebView, and the WebKit API doesn't support that ownership model.

  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebDeviceOrientationProviderMock.mm:

(+[WebDeviceOrientationProviderMock shared]):

WebKitTools:

Use shared DeviceOrientationProviderMock. The old allocation method created a new WebDeviceOrientationProviderMock
for every WebView, and the WebKit API doesn't support that ownership model.

I also fixed a leak in setMockDeviceOrientation by adding a missing release.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(createWebViewAndOffscreenWindow):

  • DumpRenderTree/mac/LayoutTestControllerMac.mm:

(LayoutTestController::setMockDeviceOrientation):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r72141 r72146  
     12010-11-16  Stephanie Lewis  <slewis@apple.com>
     2
     3        Reviewed by Geoff Garen.
     4
     5        <rdar://problem/8624267> Leak creating offscreen webview running fast/dom tests
     6
     7        Make a static provider for WebDeviceOrientationProviderMock.  The old code allocated a new WebDeviceOrientationProviderMock for
     8        every WebView, and the WebKit API doesn't support that ownership model.
     9
     10        * WebView/WebDeviceOrientationProviderMock.h:
     11        * WebView/WebDeviceOrientationProviderMock.mm:
     12        (+[WebDeviceOrientationProviderMock shared]):
     13
    1142010-11-16  Dave Hyatt  <hyatt@apple.com>
    215
  • trunk/WebKit/mac/WebView/WebDeviceOrientationProviderMock.h

    r66685 r72146  
    3333}
    3434
     35+ (WebDeviceOrientationProviderMock *)shared;
     36
    3537- (id)init;
    3638- (void)setOrientation:(WebDeviceOrientation*)orientation;
  • trunk/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm

    r66935 r72146  
    7979@implementation WebDeviceOrientationProviderMock
    8080
     81+ (WebDeviceOrientationProviderMock *)shared
     82{
     83    static WebDeviceOrientationProviderMock *provider = [[WebDeviceOrientationProviderMock alloc] init];
     84    return provider;
     85}
     86
    8187- (id)init
    8288{
  • trunk/WebKitTools/ChangeLog

    r72143 r72146  
     12010-11-16  Stephanie Lewis  <slewis@apple.com>
     2
     3        Reviewed by Geoff Garen.
     4
     5        <rdar://problem/8624267> Leak creating offscreen webview running fast/dom tests
     6
     7        Use shared DeviceOrientationProviderMock. The old allocation method created a new WebDeviceOrientationProviderMock
     8        for every WebView, and the WebKit API doesn't support that ownership model.
     9
     10        I also fixed a leak in setMockDeviceOrientation by adding a missing release.
     11
     12        * DumpRenderTree/mac/DumpRenderTree.mm:
     13        (createWebViewAndOffscreenWindow):
     14        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
     15        (LayoutTestController::setMockDeviceOrientation):
     16
    1172010-11-16  Dirk Pranke  <dpranke@chromium.org>
    218
  • trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm

    r71560 r72146  
    296296    [webView setResourceLoadDelegate:resourceLoadDelegate];
    297297    [webView _setGeolocationProvider:[MockGeolocationProvider shared]];
    298     [webView _setDeviceOrientationProvider:[[WebDeviceOrientationProviderMock alloc] init]];
     298    [webView _setDeviceOrientationProvider:[WebDeviceOrientationProviderMock shared]];
    299299
    300300    // Register the same schemes that Safari does
  • trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm

    r70975 r72146  
    349349    WebDeviceOrientation* orientation = [[WebDeviceOrientation alloc] initWithCanProvideAlpha:canProvideAlpha alpha:alpha canProvideBeta:canProvideBeta beta:beta canProvideGamma:canProvideGamma gamma:gamma];
    350350    [mockProvider setOrientation:orientation];
     351    [orientation release];
    351352}
    352353
Note: See TracChangeset for help on using the changeset viewer.