summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkitclient_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/webkitclient_impl.cc')
-rw-r--r--webkit/glue/webkitclient_impl.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 70be0f3..c65d176 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -424,10 +424,11 @@ static size_t memoryUsageMBGeneric() {
}
#endif
-size_t WebKitClientImpl::memoryUsageMB() {
+static size_t getMemoryUsageMB(bool bypass_cache) {
size_t current_mem_usage = 0;
MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::Get();
- if (mem_usage_cache_singleton->IsCachedValueValid(&current_mem_usage))
+ if (!bypass_cache &&
+ mem_usage_cache_singleton->IsCachedValueValid(&current_mem_usage))
return current_mem_usage;
current_mem_usage =
@@ -442,6 +443,14 @@ size_t WebKitClientImpl::memoryUsageMB() {
return current_mem_usage;
}
+size_t WebKitClientImpl::memoryUsageMB() {
+ return getMemoryUsageMB(false);
+}
+
+size_t WebKitClientImpl::actualMemoryUsageMB() {
+ return getMemoryUsageMB(true);
+}
+
void WebKitClientImpl::SuspendSharedTimer() {
++shared_timer_suspended_;
}