[Service] Apply smack label ahead of webapis initialization
On webapis side, it is checking privileges by cynara client with
smack label (/prod/tid/attr/current), but, this smack label is
getting before dropThreadPrivilege().
Thus, it is always 'org.tizen.chromium-efl.wrt-service'.
To make correct this problem, this patch change its time ahead of
dropThreadPrivilege().
By this logic, there is a new smack error while using systeminfo
webapi. Because systeminfo webapi is using their singleton worker
thread to get some device information. This must be created by
same smack label as pid's smack label. Otherwise, the worker's task
will be failed.
Therefore, this moves below logic on main thread.
tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { });
Later, I will discuss regarding creating this singleton worker by
other better way with webapi members.
Change-Id: I8c3ab62b775e1aaa895aa70b0ec5f438840ad74b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>