summaryrefslogtreecommitdiffstats
path: root/mobile/android/components/extensions/ext-tabs.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mobile/android/components/extensions/ext-tabs.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/mobile/android/components/extensions/ext-tabs.js b/mobile/android/components/extensions/ext-tabs.js
index 66c7417379..c4d8010e79 100644
--- a/mobile/android/components/extensions/ext-tabs.js
+++ b/mobile/android/components/extensions/ext-tabs.js
@@ -541,7 +541,13 @@ this.tabs = class extends ExtensionAPIPersistent {
? windowTracker.topWindow
: windowTracker.getWindow(windowId, context);
- const tab = tabManager.wrapTab(window.tab);
+ const tab = tabManager.getWrapper(window.tab);
+ if (
+ !extension.hasPermission("<all_urls>") &&
+ !tab.hasActiveTabPermission
+ ) {
+ throw new ExtensionError("Missing activeTab permission");
+ }
await tabListener.awaitTabReady(tab.nativeTab);
const zoom = window.browsingContext.fullZoom;