Remove DEFAULT_PROXY
This commit is contained in:
parent
37ed2455eb
commit
3572bebbd9
3 changed files with 3 additions and 21 deletions
|
@ -187,21 +187,14 @@ window.assignManager = {
|
|||
async handleProxifiedRequest(requestInfo) {
|
||||
// The following blocks potentially dangerous requests for privacy that come without a tabId
|
||||
|
||||
// Dupe of Utils.DEFAULT_PROXY, which was occasionally and unreliably
|
||||
// not being found on startup and causing significant UI grief.
|
||||
if(requestInfo.tabId === -1) {
|
||||
return {
|
||||
value: Object.freeze({type: "direct"}),
|
||||
writable: false,
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
};
|
||||
return {type: "direct"};
|
||||
}
|
||||
|
||||
const tab = await browser.tabs.get(requestInfo.tabId);
|
||||
const result = await proxifiedContainers.retrieve(tab.cookieStoreId);
|
||||
if (!result || !result.proxy) {
|
||||
return Utils.DEFAULT_PROXY;
|
||||
return {type: "direct"};
|
||||
}
|
||||
|
||||
if (!result.proxy.mozProxyEnabled) {
|
||||
|
|
|
@ -1824,8 +1824,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
return;
|
||||
}
|
||||
|
||||
await proxifiedContainers.set(identity.cookieStoreId, Utils.DEFAULT_PROXY);
|
||||
mozillaVpnUi.updateProxyDependentUi(Utils.DEFAULT_PROXY);
|
||||
mozillaVpnUi.updateProxyDependentUi({});
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -169,13 +169,3 @@ const Utils = {
|
|||
};
|
||||
|
||||
window.Utils = Utils;
|
||||
|
||||
// The following creates a fake (but convincing) constant Utils.DEFAULT_PROXY
|
||||
Object.defineProperty(window.Utils, "DEFAULT_PROXY", {
|
||||
value: Object.freeze({type: "direct"}),
|
||||
writable: false,
|
||||
enumerable: true,
|
||||
|
||||
// Setting configurable to false avoids deletion of Utils.DEFAULT_PROXY
|
||||
configurable: false
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue