This plainly shouldn't be possible, but it appears that the OnActivated event can return activeTabInfo that does not match a tab that chrome.tabs.get can find. When that happens, setBrowserActionAndIcon throws an error.
I suppose we could bail fast inside setBrowserActionAndIcon if the tab is undefined, but it's not clear what state that will end up leaving the toolbar button in. But trying to change the toolbar button to disabled would require that we have a legitimate active TabID...
v1.18
This plainly shouldn't be possible, but it appears that the
OnActivated
event can returnactiveTabInfo
that does not match a tab thatchrome.tabs.get
can find. When that happens,setBrowserActionAndIcon
throws an error.I suppose we could bail fast inside
setBrowserActionAndIcon
if the tab is undefined, but it's not clear what state that will end up leaving the toolbar button in. But trying to change the toolbar button to disabled would require that we have a legitimate active TabID...