aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorsainaen2013-05-07 20:02:58 +0300
committersainaen2013-05-09 09:44:39 +0300
commite678622b8ce2113431598177e148e8a32dfc0e77 (patch)
tree61f4e6e65191333e977a31d0c1baf5be0aa4ff4c /background_scripts
parentc7180d197a88b670da694cb9502441f2edab51f0 (diff)
downloadvimium-e678622b8ce2113431598177e148e8a32dfc0e77.tar.bz2
Remove the callback parameter of removeTab()
callback parameter is never passed to removeTab(), so adding it to the selectionChangeHandlers list causes 'Can not call method call() of undefined' error after closing the tab.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee7
1 files changed, 2 insertions, 5 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 71f963b2..c585c265 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -234,12 +234,9 @@ BackgroundCommands =
previousTab: (callback) -> selectTab(callback, "previous")
firstTab: (callback) -> selectTab(callback, "first")
lastTab: (callback) -> selectTab(callback, "last")
- removeTab: (callback) ->
+ removeTab: ->
chrome.tabs.getSelected(null, (tab) ->
- chrome.tabs.remove(tab.id)
- # We can't just call the callback here because we need to wait
- # for the selection to change to consider this action done.
- selectionChangedHandlers.push(callback))
+ chrome.tabs.remove(tab.id))
restoreTab: (callback) ->
# TODO(ilya): Should this be getLastFocused instead?
chrome.windows.getCurrent((window) ->