Changeset 41151 in webkit


Ignore:
Timestamp:
Feb 23, 2009 11:52:52 AM (15 years ago)
Author:
treat@webkit.org
Message:

2009-02-23 Adam Treat <adam.treat@torchmobile.com>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=24094
Make sure to empty the cache on exit to get rid of superfluous leak messages
for CachedResource's in order to keep the leak messages accurate. This
is analagous to what the Mac port is doing on application exit when all
WebView's have been closed.

  • Api/qwebpage.cpp: (QWebPagePrivate::_q_cleanupLeakMessages): (QWebPage::QWebPage):
  • Api/qwebpage.h:
  • Api/qwebpage_p.h:
Location:
trunk/WebKit/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r40818 r41151  
    6565#include "WindowFeatures.h"
    6666#include "LocalizedStrings.h"
     67#include "Cache.h"
    6768#include "runtime/InitializeThreading.h"
    6869
     
    430431}
    431432
     433#ifndef NDEBUG
     434void QWebPagePrivate::_q_cleanupLeakMessages()
     435{
     436    // Need this to make leak messages accurate.
     437    cache()->setCapacities(0, 0, 0);
     438}
     439#endif
     440
    432441void QWebPagePrivate::updateAction(QWebPage::WebAction action)
    433442{
     
    12521261
    12531262    connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int)));
     1263#ifndef NDEBUG
     1264    connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(_q_cleanupLeakMessages()));
     1265#endif
    12541266}
    12551267
  • trunk/WebKit/qt/Api/qwebpage.h

    r40228 r41151  
    326326    Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int))
    327327    Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked))
     328#ifndef NDEBUG
     329    Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages())
     330#endif
    328331    QWebPagePrivate *d;
    329332
  • trunk/WebKit/qt/Api/qwebpage_p.h

    r40027 r41151  
    8080    void _q_onLoadProgressChanged(int);
    8181    void _q_webActionTriggered(bool checked);
     82#ifndef NDEBUG
     83    void _q_cleanupLeakMessages();
     84#endif
    8285    void updateAction(QWebPage::WebAction action);
    8386    void updateNavigationActions();
  • trunk/WebKit/qt/ChangeLog

    r41147 r41151  
     12009-02-23  Adam Treat  <adam.treat@torchmobile.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=24094
     6        Make sure to empty the cache on exit to get rid of superfluous leak messages
     7        for CachedResource's in order to keep the leak messages accurate.  This
     8        is analagous to what the Mac port is doing on application exit when all
     9        WebView's have been closed.
     10
     11        * Api/qwebpage.cpp:
     12        (QWebPagePrivate::_q_cleanupLeakMessages):
     13        (QWebPage::QWebPage):
     14        * Api/qwebpage.h:
     15        * Api/qwebpage_p.h:
     16
    1172009-02-23  Thiago Macieira  <thiago.macieira@nokia.com>
    218
Note: See TracChangeset for help on using the changeset viewer.