[Service] Refactor and fix message-port issue 20/284320/6
authorDongHyun Song <dh81.song@samsung.com>
Tue, 15 Nov 2022 12:38:35 +0000 (21:38 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Wed, 16 Nov 2022 05:50:35 +0000 (14:50 +0900)
commite57bcfeb02a105c13ef2c908635d3eac2d9b58ad
tree0b8ddc4072375bb5f693a47f0e663f9caaa8511d
parent3f3b6e40e3f85b61c49755beb43c2c94fba8fc32
[Service] Refactor and fix message-port issue

when the app calls RemoteMessageport.sendMessage(), its second
parameter should be an LocalMessagePort function which is created
in pure message-port webapis.
From the bi-direction support, because LocalMessagePort becomes
an wrapper object by device_api_router, this makes an error by
type validator of webapis core.

Thus, this patch's main idea is going to unwrap the object to pass
the pure message-port object as the second parameter, also refactors
message-port implementation source code on mesage_port_router.

Change-Id: I226d9521df7cb5edc84530b3d65ba63a155905d8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/service/device_api_router.ts
wrt_app/service/message_port_router.ts [new file with mode: 0644]