From 073779a68db4d453f756dfba9283d94cb4535678 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Tue, 30 Jun 2020 10:24:03 +0900 Subject: [PATCH] [VD][Service] Add getApplicationId() for extensions webapis.getApplicationId() will be used to get the current application ID by eden preview webapis. Previously ContentServiceManager is getting the sender application ID from messsage port parameter, but in case of global wrt-service, it is org.tizen.chromium-efl.wrt-service, not expected application ID. So that eden preview webapi can get the intended application ID, this API will be used in eden preview side. Change-Id: Ibfeddefe384da92b7ecbeb3d72f14bf5c26c1eef Signed-off-by: DongHyun Song --- wrt_app/common/service_manager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_manager.js b/wrt_app/common/service_manager.js index a3d19525..a699a6f5 100644 --- a/wrt_app/common/service_manager.js +++ b/wrt_app/common/service_manager.js @@ -28,8 +28,10 @@ function startService(id, filename) { sandbox[id].module.exports.onStop = () => { callFunctionInContext('module.exports.onExit', sandbox[id]); }; - if (wrt.tv) + if (wrt.tv) { sandbox[id].webapis = webapis; + sandbox[id].webapis.getApplicationId = () => { return id; } + } if (is_global_service) { const permissions = wrt.getPrivileges(id); -- 2.34.1