summaryrefslogtreecommitdiff
path: root/src/bg/Settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bg/Settings.js')
-rw-r--r--src/bg/Settings.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bg/Settings.js b/src/bg/Settings.js
index 56c88f4..a5fca55 100644
--- a/src/bg/Settings.js
+++ b/src/bg/Settings.js
@@ -90,7 +90,7 @@ var Settings = {
if (typeof unrestrictedTab === "boolean") {
ns.unrestrictedTabs[unrestrictedTab ? "add" : "delete"](tabId);
- ChildPolicies.storeTabInfo(tabId, unrestrictedTab && {unrestricted: true});
+ this.enforceTabRestrictions(tabId, unrestrictedTab);
}
if (reloadAffected) {
browser.tabs.reload(tabId);
@@ -123,4 +123,8 @@ var Settings = {
}, null, 2);
},
+ async enforceTabRestrictions(tabId, unrestricted = ns.unrestrictedTabs.has(tabId)) {
+ await ChildPolicies.storeTabInfo(tabId, unrestricted && {unrestricted: true});
+ return unrestricted;
+ }
}