Changeset 202020 in webkit


Ignore:
Timestamp:
Jun 13, 2016 7:27:08 PM (8 years ago)
Author:
ddkilzer@apple.com
Message:

False-positive over-release of WebView in destroyWebViewAndOffscreenWindow() in DumpRenderTree.mm
<https://webkit.org/b/158716>

Reviewed by Andy Estes.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(destroyWebViewAndOffscreenWindow): Change this function to take
a WebView, and assert that it's the same as [mainFrame webView].
(dumpRenderTree): Pass 'webView' into
destroyWebViewAndOffscreenWindow().

  • DumpRenderTree/mac/DumpRenderTreeMac.h:

(createWebViewAndOffscreenWindow): Add NS_RETURNS_RETAINED since
this function returns a +1 WebView. Declare this method only for
Objective-C[++] source.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r202002 r202020  
     12016-06-13  David Kilzer  <ddkilzer@apple.com>
     2
     3        False-positive over-release of WebView in destroyWebViewAndOffscreenWindow() in DumpRenderTree.mm
     4        <https://webkit.org/b/158716>
     5
     6        Reviewed by Andy Estes.
     7
     8        * DumpRenderTree/mac/DumpRenderTree.mm:
     9        (destroyWebViewAndOffscreenWindow): Change this function to take
     10        a WebView, and assert that it's the same as [mainFrame webView].
     11        (dumpRenderTree): Pass 'webView' into
     12        destroyWebViewAndOffscreenWindow().
     13        * DumpRenderTree/mac/DumpRenderTreeMac.h:
     14        (createWebViewAndOffscreenWindow): Add NS_RETURNS_RETAINED since
     15        this function returns a +1 WebView.  Declare this method only for
     16        Objective-C[++] source.
     17
    1182016-06-13  Sam Weinig  <sam@webkit.org>
    219
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r201990 r202020  
    856856}
    857857
    858 static void destroyWebViewAndOffscreenWindow()
    859 {
    860     WebView *webView = [mainFrame webView];
     858static void destroyWebViewAndOffscreenWindow(WebView *webView)
     859{
     860    ASSERT(webView == [mainFrame webView]);
    861861#if !PLATFORM(IOS)
    862862    NSWindow *window = [webView window];
     
    13141314        stopJavaScriptThreads();
    13151315
    1316     destroyWebViewAndOffscreenWindow();
     1316    destroyWebViewAndOffscreenWindow(webView);
    13171317   
    13181318    releaseGlobalControllers();
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h

    r177868 r202020  
    6868bool shouldSetWaitToDumpWatchdog();
    6969
    70 WebView* createWebViewAndOffscreenWindow();
     70#ifdef __OBJC__
     71WebView *createWebViewAndOffscreenWindow() NS_RETURNS_RETAINED;
     72#endif
     73
    7174void setPersistentUserStyleSheetLocation(CFStringRef);
    7275
Note: See TracChangeset for help on using the changeset viewer.