Changeset 62652 in webkit
- Timestamp:
- Jul 7, 2010 4:39:21 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebsettings.cpp
r62249 r62652 81 81 Q_GLOBAL_STATIC(WebGraphicHash, _graphics) 82 82 83 static void earlyClearGraphics() 84 { 85 _graphics()->clear(); 86 } 87 83 88 static WebGraphicHash* graphics() 84 89 { … … 86 91 87 92 if (hash->isEmpty()) { 93 94 // prevent ~QPixmap running after ~QApplication (leaks native pixmaps) 95 qAddPostRoutine(earlyClearGraphics); 96 88 97 hash->insert(QWebSettings::MissingImageGraphic, QPixmap(QLatin1String(":webkit/resources/missingImage.png"))); 89 98 hash->insert(QWebSettings::MissingPluginGraphic, QPixmap(QLatin1String(":webkit/resources/nullPlugin.png"))); -
trunk/WebKit/qt/ChangeLog
r62602 r62652 1 2010-07-07 Marc Mutz <marc.mutz@kdab.com> 2 3 Reviewed by Adam Barth. 4 5 [Qt] QWebSettings: Don't leak native pixmaps 6 7 When Q_GLOBAL_STATIC gets around to deleting the QHash with the 8 pixmaps in, the QApplication destructor has already been 9 completed. This makes it impossible for ~QPixmap to return the 10 native pixmap to the OS, thus leaking them. 11 12 This patch adds a post routine (executed as part of ~QApplication) 13 that clears the hash so Q_GLOBAL_STATIC's destruction doesn't have 14 to execute ~QPixmap's anymore. 15 16 https://bugs.webkit.org/show_bug.cgi?id=41657 17 18 * Api/qwebsettings.cpp: 19 (earlyClearGraphics): New. Clears the pixmap hash. 20 (graphics): add earlyClearGraphics as a qAddPostRoutine() 21 1 22 2010-07-06 Csaba Osztrogonác <ossy@webkit.org> 2 23
Note: See TracChangeset
for help on using the changeset viewer.