Fixup![Gamepad]fix coredump when gamepad disconnect. 13/308413/2
authorYu Yang <yangy.yu@samsung.com>
Thu, 21 Mar 2024 05:50:58 +0000 (13:50 +0800)
committerBot Blink <blinkbot@samsung.com>
Tue, 26 Mar 2024 02:00:12 +0000 (02:00 +0000)
commit44aeebae032cbc5a2582b26f88e9137362eee66f
tree875d6c88207e37e384cb0c2e3c2917079c439006
parent97254b3e4e80005ffcec03ecebfce0774e94ce60
Fixup![Gamepad]fix coredump when gamepad disconnect.

Gamepad connect/disconnect callback is invoked in mainthread,
and gamepad read is invoked in polling thread.
when gamepad disconnect,
OCIGamepadItem will be accessed in mainthread and polling thread,
mainthread destoring OCIGamepadItem while polling thread is still use it,
that could make crash.
solution:
Moving all handle of OCIGamepadItem to polling thread to avoid issue.

Change-Id: I3bfda2112ee78b9cf7a16ed2e92d091182a73bba
Signed-off-by: Yu Yang <yangy.yu@samsung.com>
tizen_src/ewk/efl_integration/browser/gamepad/gamepad_platform_data_fetcher_tizen_tv.cc
tizen_src/ewk/efl_integration/browser/gamepad/gamepad_platform_data_fetcher_tizen_tv.h
tizen_src/ewk/efl_integration/browser/gamepad/oci_gamepad_item.cc
tizen_src/ewk/efl_integration/browser/gamepad/oci_gamepad_item.h