From 706a51c2119f8b049b921b87a5610888fd22a6be Mon Sep 17 00:00:00 2001 From: Deathamns Date: Tue, 9 Dec 2014 21:56:17 +0100 Subject: [PATCH] Firefox: blocking and content scripts for e10s --- platform/chromium/vapi-background.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 76b25bf..9609980 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -140,6 +140,8 @@ vAPI.tabs.open = function(details) { }; if ( details.tabId ) { + details.tabId = parseInt(tabId, 10); + // update doesn't accept index, must use move chrome.tabs.update(details.tabId, _details, function(tab) { // if the tab doesn't exist @@ -203,7 +205,7 @@ vAPI.tabs.remove = function(tabId) { if ( vAPI.lastError() ) { } }; - chrome.tabs.remove(tabId, onTabRemoved); + chrome.tabs.remove(parseInt(tabId, 10), onTabRemoved); }; /******************************************************************************/ @@ -227,6 +229,7 @@ vAPI.tabs.injectScript = function(tabId, details, callback) { } }; if ( tabId ) { + tabid = parseInt(tabId, 10); chrome.tabs.executeScript(tabId, details, onScriptExecuted); } else { chrome.tabs.executeScript(details, onScriptExecuted); @@ -243,6 +246,7 @@ vAPI.tabs.injectScript = function(tabId, details, callback) { // anymore, so this ensures it does still exist. vAPI.setIcon = function(tabId, img, badge) { + tabId = parseInt(tabId, 10); var onIconReady = function() { if ( vAPI.lastError() ) { return;