From 967b8c916e2b03fb426c345d871038bbca43faef Mon Sep 17 00:00:00 2001 From: MannyC Date: Sat, 1 Apr 2017 20:03:21 +0100 Subject: [PATCH] Chrome driver always sends response to foreground page to avoid foreground exception. See #1487 This fixes #1487 and fixes #1489 --- src/drivers/webextension/js/driver.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 3c5c7bd26..09718858b 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -135,7 +135,8 @@ onMessage: function(message, sender, sendResponse) { var hostname, - a = document.createElement('a'); + a = document.createElement('a'), + response = undefined; if ( typeof message.id != 'undefined' ) { w.log('message: ' + message.id); @@ -164,15 +165,18 @@ break; case 'get_apps': - sendResponse({ + response = { tabCache: tabCache[message.tab.id], apps: w.apps, categories: w.categories - }); + }; break; } + + sendResponse( response ); } + }, goToURL: function(args) {