Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2665)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 292523002: Do not call into blink before initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 7410529528e013eff009c7f83611d44a8d6743d1..60c2430b320562f85ee4cc9866dada7b9e5a101c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1419,8 +1419,12 @@ void RenderThreadImpl::OnMemoryPressure(
base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) {
// Trigger full v8 garbage collection on critical memory notification.
v8::V8::LowMemoryNotification();
boliu 2014/05/16 16:31:15 Could skip v8 and skia as well if blink is not ini
- // Clear the image cache.
- blink::WebImageCache::clear();
+
+ if (webkit_platform_support_) {
+ // Clear the image cache. Do not call into blink if it is not initialized.
+ blink::WebImageCache::clear();
+ }
+
// Purge Skia font cache, by setting it to 0 and then again to the previous
// limit.
size_t font_cache_limit = SkGraphics::SetFontCacheLimit(0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698