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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2577353002: memory coordinator: Sends notifications to V8 on THROTTLED state (Closed)
Patch Set: rebase Created 4 years 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 920dad7d4de0fc70fbfcc186fc8b34a6d49dfab7..28eb4e2dc9fa701c064f512c6bbe8afb78a37e34 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -2264,6 +2264,14 @@ void RenderThreadImpl::OnMemoryStateChange(base::MemoryState state) {
break;
case base::MemoryState::THROTTLED:
ResumeRenderer();
+ // TODO(bashi): Figure out what kind of strategy is suitable on
+ // THROTTLED state. crbug.com/674815
+#if defined(OS_ANDROID)
+ OnTrimMemoryImmediately();
+#else
+ OnSyncMemoryPressure(
+ base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE);
+#endif
ReleaseFreeMemory();
break;
case base::MemoryState::SUSPENDED:
« 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