Fix RWI is not working issue for HostedApp 40/303440/1
authorzhaosy <shiyusy.zhao@samsung.com>
Mon, 25 Sep 2023 07:57:47 +0000 (15:57 +0800)
committerSangYong Park <sy302.park@samsung.com>
Thu, 28 Dec 2023 02:09:58 +0000 (11:09 +0900)
If launch HostedApp by command "app_launcher -w -s app_id"(AppFW add
(key:__AUL_DEBUG__, value:1) to appControl), launchInspectorIfNeeded
is not called because HostedApp has loaded url before app control event,
which causes command is blocked and debugPort is not created.

So call launchInspectorIfNeeded in this case.

Change-Id: Ief5d0be1ae07c3c077f95bcf5daa88e33313a0ab
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt_app/src/web_application.ts

index 7b45f489d9baaac709e26e6aff9c48dd01ebc8cf..54e4aa35681e1b07e883e727e05cc4b9fd378dff 100644 (file)
@@ -330,10 +330,10 @@ export class WebApplication {
   loadUrl(appControl: NativeWRTjs.AppControl) {
     this.profileDelegate.setInitValue(appControl);
     this.contentSrc = appControl.getLoadInfo().getSrc();
+       this.launchInspectorIfNeeded(appControl);
     if (this.earlyLoadedUrl === this.contentSrc)
       return;
 
-    this.launchInspectorIfNeeded(appControl);
     this.mainWindow.loadURL(this.contentSrc);
     this.prelaunch(this.contentSrc);
     if (wrt.da) {