| Index: content/renderer/render_thread_impl.cc
|
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
| index b9613aed26ff5b880f64d6b0e4836730d7e3cdad..7414601d2f3d0663f381c57de7e91dcb958dd81b 100644
|
| --- a/content/renderer/render_thread_impl.cc
|
| +++ b/content/renderer/render_thread_impl.cc
|
| @@ -624,6 +624,19 @@ void RenderThreadImpl::Init(
|
| // Register this object as the main thread.
|
| ChildProcess::current()->set_main_thread(this);
|
|
|
| + if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
|
| + // Disable MemoryPressureListener when memory coordinator is enabled.
|
| + base::MemoryPressureListener::SetNotificationsSuppressed(true);
|
| +
|
| + // TODO(bashi): Revisit how to manage the lifetime of
|
| + // ChildMemoryCoordinatorImpl.
|
| + // https://codereview.chromium.org/2094583002/#msg52
|
| + mojom::MemoryCoordinatorHandlePtr parent_coordinator;
|
| + GetRemoteInterfaces()->GetInterface(mojo::MakeRequest(&parent_coordinator));
|
| + memory_coordinator_ =
|
| + CreateChildMemoryCoordinator(std::move(parent_coordinator), this);
|
| + }
|
| +
|
| if (IsRunningInMash()) {
|
| gpu_ = ui::Gpu::Create(GetServiceManagerConnection()->GetConnector(),
|
| GetIOTaskRunner());
|
| @@ -826,19 +839,6 @@ void RenderThreadImpl::Init(
|
| base::Bind(&RenderThreadImpl::OnSyncMemoryPressure,
|
| base::Unretained(this))));
|
|
|
| - if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
|
| - // Disable MemoryPressureListener when memory coordinator is enabled.
|
| - base::MemoryPressureListener::SetNotificationsSuppressed(true);
|
| -
|
| - // TODO(bashi): Revisit how to manage the lifetime of
|
| - // ChildMemoryCoordinatorImpl.
|
| - // https://codereview.chromium.org/2094583002/#msg52
|
| - mojom::MemoryCoordinatorHandlePtr parent_coordinator;
|
| - GetRemoteInterfaces()->GetInterface(mojo::MakeRequest(&parent_coordinator));
|
| - memory_coordinator_ = CreateChildMemoryCoordinator(
|
| - std::move(parent_coordinator), this);
|
| - }
|
| -
|
| int num_raster_threads = 0;
|
| std::string string_value =
|
| command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
|
|
|