Commit f3ab72bc authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Reland: Call blink::WebMemoryCoordinator::OnPurgeMemory in RenderThreadImpl::ReleaseFreeMemory

Orignal commit: f4544427

This CL was reverted because it caused the timeout test failure on fyi bots.
But, it looks like the issue was solved. So now this CL lands original CL without
a duplicated function invocation.

Bug: 842019
Test: Covered by RenderThreadImplDiscardableMemoryBrowserTest.ReleaseFreeMemory
Change-Id: I52a4bafc1688822a11fa2408ad7422331fa62a46
Reviewed-on: https://chromium-review.googlesource.com/1084369Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Cr-Commit-Position: refs/heads/master@{#564331}
parent 12d9d3c6
...@@ -2333,8 +2333,6 @@ void RenderThreadImpl::OnPurgeMemory() { ...@@ -2333,8 +2333,6 @@ void RenderThreadImpl::OnPurgeMemory() {
OnTrimMemoryImmediately(); OnTrimMemoryImmediately();
ReleaseFreeMemory(); ReleaseFreeMemory();
if (blink_platform_impl_)
blink::WebMemoryCoordinator::OnPurgeMemory();
} }
void RenderThreadImpl::RecordPurgeMemory(RendererMemoryMetrics before) { void RenderThreadImpl::RecordPurgeMemory(RendererMemoryMetrics before) {
...@@ -2470,7 +2468,7 @@ void RenderThreadImpl::ReleaseFreeMemory() { ...@@ -2470,7 +2468,7 @@ void RenderThreadImpl::ReleaseFreeMemory() {
if (blink_platform_impl_) { if (blink_platform_impl_) {
// Purge Skia font cache, resource cache, and image filter. // Purge Skia font cache, resource cache, and image filter.
SkGraphics::PurgeAllCaches(); SkGraphics::PurgeAllCaches();
blink::DecommitFreeableMemory(); blink::WebMemoryCoordinator::OnPurgeMemory();
} }
} }
......
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