From: DongHyun Song Date: Mon, 13 Sep 2021 09:13:55 +0000 (+0900) Subject: [Service] Handle exception if workerData is empty X-Git-Tag: accepted/tizen/unified/20210915.001905~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=eadcbd422b27a662e2412ea5706f8ab1b31d3a47;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Handle exception if workerData is empty Sometimes, we are facing, there is a case of workerData is empty. empty 'id' makes kind of smack error and JavaScript errors. This issue has been reported from long aging test. Change-Id: Ib287eecc3906e313dc5b23491aa04939b88543cf Signed-off-by: DongHyun Song --- diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index e3cb9bd..63766c7 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -132,6 +132,11 @@ export function stop(id: string) { function run() { let id = workerData.id; + if (!id) { + console.debug('workerData.id is empty!'); + process.exit(); + } + Object.defineProperty(global, 'internalId', { value: id, writable: false