From: DongHyun Song Date: Wed, 25 Aug 2021 08:37:31 +0000 (+0900) Subject: [Service] Fix JS exception of UI type service X-Git-Tag: submit/tizen/20210827.011519^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F263065%2F2;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Fix JS exception of UI type service 1) correct 'service_manager' path 2) ignore unnecessary logic for UI type Change-Id: I23c4c15630d455c620a8593ddffc5bac550a46fd Signed-off-by: DongHyun Song --- diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index 1fd2080..0dc0ae6 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -84,9 +84,11 @@ export function start(id: string, filename: string) { global.tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { }); // This is for awaking up uv loop. - dummyTimer = setInterval(() => { - checkLauncherAlive(id); - }, 100); + if (isGlobalService()) { + dummyTimer = setInterval(() => { + checkLauncherAlive(id); + }, 100); + } if (isServiceApplication()) { registerExtensionResolver(id); diff --git a/wrt_app/src/runtime.ts b/wrt_app/src/runtime.ts index 2f8a850..947bb76 100644 --- a/wrt_app/src/runtime.ts +++ b/wrt_app/src/runtime.ts @@ -104,10 +104,10 @@ class Runtime { console.log('message type(' + type + ') params : ' + params); const app_id = params[0]; if (type === 'startService') { - require('../common/service_manager').startService(app_id, params[1]); + require('../service/service_manager').startService(app_id, params[1]); event.preventDefault(); } else if (type === 'stopService') { - require('../common/service_manager').stopService(app_id); + require('../service/service_manager').stopService(app_id); event.preventDefault(); } else if (type === 'hideSplashScreen') { this.webApplication?.hideSplashScreen(params[0]);