RenderProcessHostImpl dtor is not executed.
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 13 Jan 2016 20:51:26 +0000 (16:51 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
commit86332c93310ae8dd2fcbcdef0cd1116a30f14980
tree541e242425e5564fff0a9ce6980e4f78ef4e5553
parentc26e94d76aaa4298065cca2994045377ba4ed6c5
RenderProcessHostImpl dtor is not executed.

Since forcibly shutdown our UI message loop, it is possible
that important pending Tasks are simply not executed.
Among these, the destruction of RenderProcessHostImpl class
(scheduled with DeleteSoon) performs various process um-plumbing
stuff.
Particularly, RenderProcessHostImpl holds a strong references of lots
of other objects (e.g. URLRequestContextGetterEfl, RenderWidgetHelper,
ChildProcessLauncher, etc) and not performing the proper destruction
of them might result in crashes at shutdown or other undefined problems.

Patch gives the UI message loop a extra run ('till it gets idle)
to perform such pending tasks.

In order to implement this, it was required to unstub the
implementation of MessagePumpForUIEfl::Run, based on the logic
described in base/message_loop/message_pump.h, as well as in
message_pump_{default,glib}.cc

Callstack looks like:
- EwkGlobalData::~EwkGlobalData
- MessageLoop::RunUntilIdle
- RunLoop::RunUntilIdle
- RunLoop::Run
- MessageLoop::RunHandler
- MessagePumpForUIEfl::Run # idle state will break the loop

Original beta/m47 patches:
- http://165.213.202.130/gerrit/#/c/103446/
- http://165.213.202.130/gerrit/#/c/104287/

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

Reviewed by: djmix.kim, sns.park

Change-Id: I2957a0a7fb942daf9bcbf74431d91acb8cff7902
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/ewk/efl_integration/ewk_global_data.cc
tizen_src/ewk/efl_integration/message_pump_for_ui_efl.cc
tizen_src/ewk/efl_integration/message_pump_for_ui_efl.h