diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 19:40:58 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 19:40:58 +0000 |
commit | 71f0214da5e3b43cb0d60ad03f82ce552daab9dc (patch) | |
tree | edbe2e61d85648a4724fe7e9e45b080f19eb39b9 /chrome/renderer/chrome_render_process_observer.cc | |
parent | 400a61c5463c029125d6c854c9eee773b9be302b (diff) | |
download | chromium_src-71f0214da5e3b43cb0d60ad03f82ce552daab9dc.zip chromium_src-71f0214da5e3b43cb0d60ad03f82ce552daab9dc.tar.gz chromium_src-71f0214da5e3b43cb0d60ad03f82ce552daab9dc.tar.bz2 |
Remove the PurgeMemory IPC message and handling code. The MemoryPurger is gone.
BUG=350455
TEST=none
R=jam@chromium.org
Review URL: https://codereview.chromium.org/198313002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/chrome_render_process_observer.cc')
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.cc | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index 60759bc..e4f6d4b 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -27,7 +27,6 @@ #include "chrome/common/net/net_resource_provider.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" -#include "chrome/renderer/chrome_content_renderer_client.h" #include "chrome/renderer/content_settings_observer.h" #include "chrome/renderer/extensions/extension_localization_peer.h" #include "chrome/renderer/security_filter_peer.h" @@ -39,23 +38,17 @@ #include "net/base/net_errors.h" #include "net/base/net_module.h" #include "third_party/WebKit/public/web/WebCache.h" -#include "third_party/WebKit/public/web/WebCrossOriginPreflightResultCache.h" #include "third_party/WebKit/public/web/WebDocument.h" -#include "third_party/WebKit/public/web/WebFontCache.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebView.h" -#include "third_party/sqlite/sqlite3.h" -#include "v8/include/v8.h" #if defined(OS_WIN) #include "base/win/iat_patch_function.h" #endif using blink::WebCache; -using blink::WebCrossOriginPreflightResultCache; -using blink::WebFontCache; using blink::WebRuntimeFeatures; using blink::WebSecurityPolicy; using blink::WebString; @@ -323,7 +316,6 @@ bool ChromeRenderProcessObserver::OnControlMessageReceived( IPC_MESSAGE_HANDLER(ChromeViewMsg_GetV8HeapStats, OnGetV8HeapStats) IPC_MESSAGE_HANDLER(ChromeViewMsg_GetCacheResourceStats, OnGetCacheResourceStats) - IPC_MESSAGE_HANDLER(ChromeViewMsg_PurgeMemory, OnPurgeMemory) IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingRules, OnSetContentSettingRules) IPC_MESSAGE_UNHANDLED(handled = false) @@ -411,34 +403,6 @@ void ChromeRenderProcessObserver::OnGetV8HeapStats() { HeapStatisticsCollector::Instance()->InitiateCollection(); } -void ChromeRenderProcessObserver::OnPurgeMemory() { - if (!webkit_initialized_) - return; - - // Clear the object cache (as much as possible; some live objects cannot be - // freed). - WebCache::clear(); - - // Clear the font/glyph cache. - WebFontCache::clear(); - - // Clear the Cross-Origin Preflight cache. - WebCrossOriginPreflightResultCache::clear(); - - // Release all freeable memory from the SQLite process-global page cache (a - // low-level object which backs the Connection-specific page caches). - while (sqlite3_release_memory(std::numeric_limits<int>::max()) > 0) { - } - - v8::V8::LowMemoryNotification(); - - // Tell our allocator to release any free pages it's still holding. - base::allocator::ReleaseFreeMemory(); - - if (client_) - client_->OnPurgeMemory(); -} - void ChromeRenderProcessObserver::ExecutePendingClearCache() { if (clear_cache_pending_ && webkit_initialized_) { clear_cache_pending_ = false; |