Commit f34485ff authored by Yuzu Saijo's avatar Yuzu Saijo Committed by Commit Bot

Avoid allocation in OnOOMCallback

This CL tries to solve crashes in OnOOMCallback, which seem to happen because of allocation inside the function. By initializing the CrashMemoryReporterImpl in blink initializer, this fix intends to avoid allocation when memory pressure is high.


Bug: 888970
Change-Id: Iefc72224f95158e72030862c9d4cad8f964a4e1e
Reviewed-on: https://chromium-review.googlesource.com/c/1275745Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598711}
parent 9ce36747
...@@ -134,6 +134,12 @@ void InitializeCommon(Platform* platform, ...@@ -134,6 +134,12 @@ void InitializeCommon(Platform* platform,
if (task_runner) if (task_runner)
MemoryAblationExperiment::MaybeStartForRenderer(task_runner); MemoryAblationExperiment::MaybeStartForRenderer(task_runner);
} }
#if defined(OS_ANDROID)
// Initialize CrashMemoryMetricsReporterImpl in order to assure that memory
// allocation does not happen in OnOOMCallback.
CrashMemoryMetricsReporterImpl::Instance();
#endif
} }
} // namespace } // namespace
......
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