When MessageLoop for PPAPI is destroyed it may happen that there are
some unrun callbacks. Dtor of such callback tries to acquire global
proxy lock.
If such destroy is called from during call to method exposed via PPAPI
to the plugin then deadlock occurs as global proxy lock is held
EnterResource object form Thunk layer.
Ported patch from Tizen 7.0:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/280223/
Change-Id: If50242a099ce4c95f42148cd38c565314558359c
Signed-off-by: jinbei09 <jinbei09.dai@samsung.com>
if (should_destroy_ && nested_invocations_ == 0) {
task_runner_.reset();
- single_thread_task_executor_.reset();
+ {
+ // Message Loop dtor may try to aquire lock.
+ ProxyAutoUnlock lock;
+ single_thread_task_executor_.reset();
+ }
destroyed_ = true;
}
return PP_OK;