From: ws29.jung Date: Tue, 24 Jul 2018 09:01:22 +0000 (+0900) Subject: Fix WebApp crash with installed extension on TV (multiprocess) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2c77acec5ed4b2a1044c706f3086d7bca8ba0c3;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Fix WebApp crash with installed extension on TV (multiprocess) Earlier then this patch, there was fix up patch for same issue but only applied with Tizen WebApp. (d8c2683) This patch moves extension activation on 'browser-window-created' callback so now BrowserWindow construction is guaranteed before activation for both Tizen and Electron Web App type. Change-Id: I94405ead5ef6188da09faaac91f976307fae3a3b Signed-off-by: ws29.jung --- diff --git a/wrt/src/runtime.js b/wrt/src/runtime.js index a49487d29..ae01bb358 100755 --- a/wrt/src/runtime.js +++ b/wrt/src/runtime.js @@ -42,6 +42,10 @@ class Runtime { return runtime_debug('browser-window-focus'); }); app.on('browser-window-created', function() { + if (!_this.isLaunched) { + _this.extensionManager.activateAll(app); + _this.isLaunched = true; + } return runtime_debug('browser-window-created'); }); app.on('gpu-process-crashed', function() { @@ -70,11 +74,9 @@ class Runtime { _this.extensionManager.build(); } if (wrt.isElectronLaunch()) { - _this.extensionManager.activateAll(app); return; } _this.webApplication = new WebApplication(options); - _this.extensionManager.activateAll(app); }); } onPause(web_window_id) {