Chrome driver always sends response to foreground page to avoid foreground exception.

See #1487

This fixes #1487 and fixes #1489
main
MannyC 8 years ago
parent 37d88fbe64
commit 967b8c916e

@ -135,7 +135,8 @@
onMessage: function(message, sender, sendResponse) { onMessage: function(message, sender, sendResponse) {
var var
hostname, hostname,
a = document.createElement('a'); a = document.createElement('a'),
response = undefined;
if ( typeof message.id != 'undefined' ) { if ( typeof message.id != 'undefined' ) {
w.log('message: ' + message.id); w.log('message: ' + message.id);
@ -164,15 +165,18 @@
break; break;
case 'get_apps': case 'get_apps':
sendResponse({ response = {
tabCache: tabCache[message.tab.id], tabCache: tabCache[message.tab.id],
apps: w.apps, apps: w.apps,
categories: w.categories categories: w.categories
}); };
break; break;
} }
sendResponse( response );
} }
}, },
goToURL: function(args) { goToURL: function(args) {

Loading…
Cancel
Save