Changeset 73970 in webkit


Ignore:
Timestamp:
Dec 13, 2010 3:02:47 PM (13 years ago)
Author:
bweinstein@apple.com
Message:

WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
https://bugs.webkit.org/show_bug.cgi?id=50975
<rdar://problem/8763501>

Reviewed by Adam Roben.

Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.

  • UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
  • UIProcess/win/WebInspectorProxyWin.cpp:

(WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.

Location:
trunk/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r73968 r73970  
     12010-12-13  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
     6        https://bugs.webkit.org/show_bug.cgi?id=50975
     7        <rdar://problem/8763501>
     8       
     9        Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.
     10
     11        * UIProcess/WebInspectorProxy.cpp:
     12        (WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.
     13        * UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
     14        * UIProcess/win/WebInspectorProxyWin.cpp:
     15        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.
     16
    1172010-12-13  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/WebKit2/UIProcess/WebInspectorProxy.cpp

    r73877 r73970  
    3434#include "WebPageGroup.h"
    3535
     36#if PLATFORM(WIN)
     37#include "WebView.h"
     38#endif
     39
    3640#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
    3741#include "NotImplemented.h"
     
    5660#if PLATFORM(WIN)
    5761    , m_inspectorWindow(0)
    58     , m_inspectorView(0)
    5962#endif
    6063{
  • trunk/WebKit2/UIProcess/WebInspectorProxy.h

    r73935 r73970  
    3333#include <wtf/Forward.h>
    3434#include <wtf/PassRefPtr.h>
     35#include <wtf/RefPtr.h>
    3536
    3637#if PLATFORM(MAC)
     
    148149#elif PLATFORM(WIN)
    149150    HWND m_inspectorWindow;
    150     WebView* m_inspectorView;
     151    RefPtr<WebView> m_inspectorView;
    151152#endif
    152153};
  • trunk/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp

    r73965 r73970  
    153153
    154154    RECT emptyRect = {0};
    155     m_inspectorView = WebView::createForAssociatedPage(emptyRect, m_page, inspectorPageGroup(), 0).leakRef();
     155    m_inspectorView = WebView::createForAssociatedPage(emptyRect, m_page, inspectorPageGroup(), 0);
    156156
    157157    return m_inspectorView->page();
Note: See TracChangeset for help on using the changeset viewer.