[datacontrol] Fix synchronisation issue 87/245687/4
authork2.nagaraju <k2.nagaraju@samsung.com>
Wed, 14 Oct 2020 07:58:38 +0000 (13:28 +0530)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 19 Oct 2020 03:09:48 +0000 (03:09 +0000)
commit67cdc4e0bc37d5b9a202e7b33fdbba054a043a97
treec612d3676f7e1a266d92567b3fa45d409bdab3c3
parentcec2fbfc302943217244f0b0f8716df0f3c3af23
[datacontrol] Fix synchronisation issue

k2.nagaraju:
In |RunMAPDataControlJob| updating the |IdMap| value and same value is
used in callback function |MAPAddResponseCallback| for any request id is
added. But before |RunMAPDataControlJob| updating value of |IdMap|,
getting |MAPAddResponseCallback| which is causing the failure with
|Invalid context|. Handled this scenario.

p.wasowski2:
Changed k2.nagaraju's commit a little to conform with the coding used in
the datacontrol module implementation and Web API.

[Verification] No synchronization issues in several runs of WebService2.wgt
app, attached to the related XWALK-2183 task (before, the problem,
signalled by "Invalid context" dlog entry, was reproducible on every run).
tct-datacontrol-tizen-tests: 100% pass rate

Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
Change-Id: I247aaff45071331255528a62ffc5d8afa4b8e8af
src/datacontrol/datacontrol_instance.cc