From ada818484187c865d14400baa1b6a4308478f2cb Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Mon, 12 Oct 2020 17:32:23 +0900 Subject: [PATCH] [TV] Bring cancelDialogs() forward to before-quit With below refactor patch, https://review.tizen.org/gerrit/245417/ Defered timing of closing windows, Sometimes, JS exception is coming due to access of destroyed Object at wrt.tv.cancelDialogs(this.mainWindow.webContents); Change-Id: I207c890cb84e6aaec8ed13316c39b80dd2e6cd3c Signed-off-by: DongHyun Song --- wrt_app/src/web_application.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index 3e5a683..3795a2a 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -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(); -- 2.7.4