summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/Api/qwebsettings.cpp
diff options
context:
space:
mode:
authorArunprasad Rajkumar <arunprasadr@nds.com>2013-03-18 18:11:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-19 12:11:36 +0100
commita97531f6c64984a91027e92a4521a847103c0cae (patch)
treeb5775b3e9bf2941ad2fb1a953d8fc552af656b44 /Source/WebKit/qt/Api/qwebsettings.cpp
parentd9c4f8fababcfe370881b4402994cbcd6fa05504 (diff)
downloadqtwebkit-a97531f6c64984a91027e92a4521a847103c0cae.tar.gz
[Qt] QWebSettings::clearMemoryCaches should clear JS garbage
https://bugs.webkit.org/show_bug.cgi?id=111094 Reviewed by Jocelyn Turcotte. * Api/qwebsettings.cpp: (QWebSettings::clearMemoryCaches): Change-Id: I088556a052ae81159533bdc5991654d80e1f5dcc git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145085 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebKit/qt/Api/qwebsettings.cpp')
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index 01818aff4..88172149c 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -28,6 +28,7 @@
#include "DatabaseTracker.h"
#include "FileSystem.h"
#include "FontCache.h"
+#include "GCController.h"
#include "IconDatabase.h"
#include "Image.h"
#if ENABLE(ICONDATABASE)
@@ -805,7 +806,7 @@ QPixmap QWebSettings::webGraphic(WebGraphic type)
}
/*!
- Frees up as much memory as possible by cleaning all memory caches such
+ Frees up as much memory as possible by calling the JavaScript garbage collector and cleaning all memory caches such
as page, object and font cache.
\since 4.6
@@ -832,6 +833,11 @@ void QWebSettings::clearMemoryCaches()
// Empty the Cross-Origin Preflight cache
WebCore::CrossOriginPreflightResultCache::shared().empty();
+
+ // Drop JIT compiled code from ExecutableAllocator.
+ WebCore::gcController().discardAllCompiledCode();
+ // Garbage Collect to release the references of CachedResource from dead objects.
+ WebCore::gcController().garbageCollectNow();
}
/*!