[Tizen6.5 Migration] Prevent window showing during termination 62/257962/1 submit/tizen/20210507.160020
authorSangYong Park <sy302.park@samsung.com>
Thu, 6 May 2021 01:31:33 +0000 (10:31 +0900)
committerSangYong Park <sy302.park@samsung.com>
Fri, 7 May 2021 05:31:46 +0000 (14:31 +0900)
Show previous window when current window was closed.
but, window showing causes invalid memory access in termination.
so, prevent window showing during app termination.

Reference:
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/257882/

Change-Id: I7878594d5ba12b5300523e00262ff84d95072ba7
Signed-off-by: SangYong Park <sy302.park@samsung.com>
wrt_app/src/web_application.ts

index f2e3d1a..31f3915 100644 (file)
@@ -68,7 +68,7 @@ export class WebApplication {
         console.log(`window closed : #${this.windowList.length}`);
         let index = this.windowList.indexOf(window);
         this.windowList.splice(index, 1);
-        if (index === this.windowList.length && this.windowList.length > 0)
+        if (!this.inQuit && index === this.windowList.length && this.windowList.length > 0)
           this.windowList[this.windowList.length - 1].show();
       });
     });