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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2376233005: [NotForReview] An idea for experimenting purge & suspend (Closed)
Patch Set: Created 4 years, 3 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 | « content/browser/memory/memory_coordinator.cc ('k') | content/child/memory/child_memory_coordinator_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 6fd7aca5d1f3dd97caedf06ff37c31f0d2452246..e57077db3b90add05f30ac3607b895c9ca971ed4 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1265,7 +1265,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
base::Bind(&BroadcastChannelProvider::Connect,
base::Unretained(
storage_partition_impl_->GetBroadcastChannelProvider())));
- if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
+ if (MemoryCoordinator::IsEnabled()) {
AddUIThreadInterface(
registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID()));
}
@@ -1434,7 +1434,11 @@ bool RenderProcessHostImpl::IsWorkerRefCountDisabled() {
}
void RenderProcessHostImpl::PurgeAndSuspend() {
- Send(new ChildProcessMsg_PurgeAndSuspend());
+ if (base::FeatureList::IsEnabled(features::kPurgeAndSuspend)) {
+ MemoryCoordinator::GetInstance()->PurgeAndSuspendChild(GetID());
+ } else {
+ Send(new ChildProcessMsg_PurgeAndSuspend());
+ }
}
mojom::RouteProvider* RenderProcessHostImpl::GetRemoteRouteProvider() {
« no previous file with comments | « content/browser/memory/memory_coordinator.cc ('k') | content/child/memory/child_memory_coordinator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698