Reimplement EWebContext::NotifyLowMemory method.
authorAntonio Gomes <a1.gomes@samsung.com>
Mon, 25 Jan 2016 18:52:50 +0000 (14:52 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
commit1cfdc56a8829cdde6c2a67282c549e7c5f16794c
tree5278ee262938265eb31cb133c4dfd16cf30035fd
parent45a7f1c845e7daf4298a8f948a1c5d43623b8c4a
Reimplement EWebContext::NotifyLowMemory method.

MemoryPurger class is a fork of the obsolete files
chrome/browser/memory_purger.cc/h, removed in [1].
In [2], it is advised for callers of this API to use
RenderThreadImpl::OnMemoryPressure instead.

Patch provides an implementation of EWebContext::NotifyLowMemory
based on MemoryPressureController class that calls out to
MemoryPressureListener and down to RenderThreadImpl::OnMemoryPressure.

ewk/efl_integration/memory_purger.cc/h are also removed, as well
as message EwkViewMsg_PurgeMemory and its associated handler
RenderProcessObserverEfl::OnPurgeMemory.

Experiments with this API shows that it frees up to 40Mb of RAM
when browsing facebook.com.

[1] https://codereview.chromium.org/192573010
[2] https://code.google.com/p/chromium/issues/detail?id=350455#c13

Original beta/m47 patch: http://165.213.202.130/gerrit/#/c/105433/

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=4822

Reviewed by: g.czajkowski

Change-Id: I437046a02b4486422dfd2913b1c2b51e405e8e2c
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/ewk/efl_integration/common/render_messages_ewk.h
tizen_src/ewk/efl_integration/efl_integration.gypi
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/memory_purger.cc [deleted file]
tizen_src/ewk/efl_integration/memory_purger.h [deleted file]
tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc
tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h