[M130 Migration][WRTjs][Service] Return the callbackid for addMessagePortListener 14/322714/1
authorzhaosy <shiyusy.zhao@samsung.com>
Tue, 15 Apr 2025 01:44:13 +0000 (09:44 +0800)
committerzhaosy <shiyusy.zhao@samsung.com>
Tue, 15 Apr 2025 01:44:13 +0000 (09:44 +0800)
1.Fix port not found issue when service app do messageport
removeMessagePortListener.
2.Add debug log for refineFilesystemApis

Refer to:
https://review.tizen.org/gerrit/c/platform/framework/web/wrtjs/+/320142
https://review.tizen.org/gerrit/c/platform/framework/web/wrtjs/+/318291

Change-Id: I1b5778fcfffdbbddcdda6694d95d1eb86114fc95
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt_app/service/device_api_router.ts
wrt_app/service/message_port_router.ts

index 30c7ca095cb96e42cf5284571bf17d3e16de733f..241394fb6ab161a68c302f5a5593ac229cbe7973 100644 (file)
@@ -410,6 +410,7 @@ export class DeviceAPIRouter {
       let virtualPath = ['wgt-private', 'wgt-private-tmp', 'wgt-package'];
       virtualPath.forEach(name => {
         let realPath = wrt.resolveVirtualRoot(this.id, name);
+        console.debug(`Routing - refineFilesystemApis() : ${realPath}`);
         global.tizen.filesystem.setVirtualPath(name, realPath, 'INTERVAL', 'MOUNTED');
       });
     } catch (e) {
index bf5927cc1d207cef5166d7ebf5513cc3aaa7f749..a9c939b07a5346df98c77e5f21c2907cd14b387b 100644 (file)
@@ -72,7 +72,7 @@ export class LocalMessagePort {
         remoteMessagePort = LocalMessagePort.funcRemoteMessagePort(remoteAppId, remotePort);
       return listener(message, remoteMessagePort);
     }
-    this.messagePortObj.addMessagePortListener(listenerWrapper);
+    return this.messagePortObj.addMessagePortListener(listenerWrapper);
   }
 
   removeMessagePortListener(watchId: any) {