Commit 6bfc16d6 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Rename the two CreateMemoryCoordinatorHandle functions in content

There were two small (identical) helper functions in
content/browser named CreateMemoryCoordinatorHandle(..). One in
gpu and one in render_host, and with no obvious place
to put a shared copy.

These two cause problems in some extreme jumbo configurations so
this patch renames them according to how they are user.

Change-Id: I508530b6290606a01046ec0378d8da7d9f8c164b
Reviewed-on: https://chromium-review.googlesource.com/1092696
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565646}
parent 213c711c
...@@ -481,7 +481,7 @@ FontRenderParamsOnIO& GetFontRenderParamsOnIO() { ...@@ -481,7 +481,7 @@ FontRenderParamsOnIO& GetFontRenderParamsOnIO() {
return *instance; return *instance;
} }
void CreateMemoryCoordinatorHandle( void CreateMemoryCoordinatorHandleForGpuProcess(
int gpu_process_id, int gpu_process_id,
mojom::MemoryCoordinatorHandleRequest request) { mojom::MemoryCoordinatorHandleRequest request) {
MemoryCoordinatorImpl::GetInstance()->CreateHandle(gpu_process_id, MemoryCoordinatorImpl::GetInstance()->CreateHandle(gpu_process_id,
...@@ -503,7 +503,8 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter { ...@@ -503,7 +503,8 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter {
#endif #endif
registry_.AddInterface( registry_.AddInterface(
base::BindRepeating(&CreateMemoryCoordinatorHandle, gpu_process_id), base::BindRepeating(&CreateMemoryCoordinatorHandleForGpuProcess,
gpu_process_id),
task_runner); task_runner);
} }
......
...@@ -784,7 +784,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, ...@@ -784,7 +784,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
RenderProcessHost* host_ = nullptr; RenderProcessHost* host_ = nullptr;
}; };
void CreateMemoryCoordinatorHandle( void CreateMemoryCoordinatorHandleForRenderProcess(
int render_process_id, int render_process_id,
mojom::MemoryCoordinatorHandleRequest request) { mojom::MemoryCoordinatorHandleRequest request) {
MemoryCoordinatorImpl::GetInstance()->CreateHandle(render_process_id, MemoryCoordinatorImpl::GetInstance()->CreateHandle(render_process_id,
...@@ -1920,7 +1920,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { ...@@ -1920,7 +1920,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
storage_partition_impl_->GetBroadcastChannelProvider()))); storage_partition_impl_->GetBroadcastChannelProvider())));
if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
AddUIThreadInterface( AddUIThreadInterface(
registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); registry.get(),
base::Bind(&CreateMemoryCoordinatorHandleForRenderProcess, GetID()));
} }
if (resource_coordinator::IsResourceCoordinatorEnabled()) { if (resource_coordinator::IsResourceCoordinatorEnabled()) {
AddUIThreadInterface( AddUIThreadInterface(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment