Merge "[TV] Bring cancelDialogs() forward to before-quit" into tizen
authorBot Blink <blinkbot@samsung.com>
Mon, 26 Oct 2020 07:30:41 +0000 (07:30 +0000)
committerGerrit Code Review <gerrit@review>
Mon, 26 Oct 2020 07:30:41 +0000 (07:30 +0000)
wrt_app/src/web_application.ts

index 3e5a683..3795a2a 100644 (file)
@@ -381,22 +381,22 @@ Then you can get profile log from the initial loading.`;
 
   finalize() {
     console.log('WebApplication : finalize');
+    this.flushData();
+    this.windowList.forEach((window) => window.removeAllListeners());
+  }
+
+  quit() {
+    console.log('WebApplication : quit');
+    addonManager.emit('lcQuit', this.mainWindow.id);
     if (wrt.tv) {
       this.inspectorSrc = '';
       wrt.tv.cancelDialogs(this.mainWindow.webContents);
     }
-    this.flushData();
     if (this.debugPort) {
       console.log('stop inspector server');
       this.debugPort = 0;
       wrt.stopInspectorServer();
     }
-    this.windowList.forEach((window) => window.removeAllListeners());
-  }
-
-  quit() {
-    console.log('WebApplication : quit');
-    addonManager.emit('lcQuit', this.mainWindow.id);
     this.inQuit = true;
     if (!this.suspended)
       this.suspend();