diff options
Diffstat (limited to 'browser/components/extensions/parent/ext-tabs.js')
-rw-r--r-- | browser/components/extensions/parent/ext-tabs.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js index 128a42439b..4b8d296d67 100644 --- a/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js @@ -1026,7 +1026,13 @@ this.tabs = class extends ExtensionAPIPersistent { ? windowTracker.getTopWindow(context) : windowTracker.getWindow(windowId, context); - let tab = tabManager.wrapTab(window.gBrowser.selectedTab); + let tab = tabManager.getWrapper(window.gBrowser.selectedTab); + if ( + !extension.hasPermission("<all_urls>") && + !tab.hasActiveTabPermission + ) { + throw new ExtensionError("Missing activeTab permission"); + } await tabListener.awaitTabReady(tab.nativeTab); let zoom = window.ZoomManager.getZoomForBrowser( |