mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 430ebb28dd92 (bug 935753) for mochitest-bc failures.
This commit is contained in:
parent
4374b8a99b
commit
2c5a2017f7
@ -6338,21 +6338,14 @@ var gIdentityHandler = {
|
||||
let nsIWebProgressListener = Ci.nsIWebProgressListener;
|
||||
|
||||
// For some URIs like data: we can't get a host and so can't do
|
||||
// anything useful here.
|
||||
// anything useful here. Chrome URIs however get special treatment.
|
||||
let unknown = false;
|
||||
try {
|
||||
uri.host;
|
||||
} catch (e) { unknown = true; }
|
||||
|
||||
// Chrome URIs however get special treatment. Some chrome URIs are
|
||||
// whitelisted to provide a positive security signal to the user.
|
||||
let chromeWhitelist = ["about:addons", "about:app-manager", "about:config",
|
||||
"about:crashes", "about:healthreport", "about:home",
|
||||
"about:newaddon", "about:permissions", "about:preferences",
|
||||
"about:privatebrowsing", "about:sessionstore",
|
||||
"about:support", "about:welcomeback"];
|
||||
let lowercaseSpec = uri.spec.toLowerCase();
|
||||
if (chromeWhitelist.some(function(whitelistedSpec) lowercaseSpec.startsWith(whitelistedSpec))) {
|
||||
if ((uri.scheme == "chrome" || uri.scheme == "about") &&
|
||||
uri.spec !== "about:blank") {
|
||||
this.setMode(this.IDENTITY_MODE_CHROMEUI);
|
||||
} else if (unknown) {
|
||||
this.setMode(this.IDENTITY_MODE_UNKNOWN);
|
||||
|
Loading…
Reference in New Issue
Block a user