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>