From: DongHyun Song Date: Fri, 6 Nov 2020 07:55:37 +0000 (+0900) Subject: [Service] Prevent multiple calls of wrt.stopService() X-Git-Tag: submit/tizen/20201124.112151~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F247629%2F1;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Prevent multiple calls of wrt.stopService() In case of RakutenTV app, it calls tizen.application...exit() twice. Of course WRTServiceManager::Remove() will skip stopService at the second time, this patch can skip stopService() sequence more early time. Change-Id: I65fdfb13f28834e4093f6be7888054e6aec7162b Signed-off-by: DongHyun Song (cherry picked from commit 9b0419b99033485731a603ac1bb96d1cc87ea7ee) --- diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index c3c8306..7825b02 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -34,7 +34,8 @@ function registerExtensionResolver(id: string) { } } -function requestStopService(id: string) { +let requestStopService = (id: string) => { + requestStopService = (id: string) => {}; setTimeout(() => wrt.stopService(id), 500); }