Chromium Code Reviews| 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); |