Because in current logic, "before-quit" will not be invoked,
so webApplication.finalize() is not called, it will cause RWI
port is not relased / dialog is not cancled/..., so move to
"quit" procedure.
After "Fix terminate crash issue by appfw" patch, "before-quit"/
'will-quit' will not be invoked(https://review.tizen.org/gerrit/233246/).
Change-Id: I0623b2d1147f1b1c31e809f67f270ae2974662cc
Signed-off-by: liwei <wei90727.li@samsung.com>
var _this = this;
app.on('before-quit', function(event) {
console.log('before-quit');
- if (!wrt.isElectronApp()) {
+ if (_this.webApplication) {
_this.webApplication.quit();
- _this.webApplication.finalize();
- _this.webApplication = null;
}
});
app.on('will-quit', function(event) {
});
app.on('quit', function(event) {
console.log('quit');
+ if (_this.webApplication) {
+ _this.webApplication.finalize();
+ _this.webApplication = null;
+ }
wrt.exit();
});
app.on('browser-window-blur', function() {