mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1174751 - Make storage inspector work with local files (file:///). r=gluong
This commit is contained in:
parent
a2bcabe26c
commit
2cb6366763
@ -39,8 +39,8 @@ const UPDATE_INTERVAL = 500;
|
||||
// present in <profileDir>/storage/default/ location
|
||||
let illegalFileNameCharacters = [
|
||||
"[",
|
||||
// Control characters \001 to \037
|
||||
"\\x00-\\x25",
|
||||
// Control characters \001 to \036
|
||||
"\\x00-\\x24",
|
||||
// Special characters
|
||||
"/:*?\\\"<>|\\\\",
|
||||
"]"
|
||||
@ -528,6 +528,9 @@ StorageActors.createActor({
|
||||
if (cookie.host.startsWith(".")) {
|
||||
return host.endsWith(cookie.host);
|
||||
}
|
||||
if (cookie.host === "") {
|
||||
return host.startsWith("file://" + cookie.path);
|
||||
}
|
||||
return cookie.host == host;
|
||||
},
|
||||
|
||||
@ -691,6 +694,11 @@ StorageActors.createActor({
|
||||
|
||||
let cookieHelpers = {
|
||||
getCookiesFromHost: function(host) {
|
||||
// Local files have no host.
|
||||
if (host.startsWith("file:///")) {
|
||||
host = "";
|
||||
}
|
||||
|
||||
let cookies = Services.cookies.getCookiesFromHost(host);
|
||||
let store = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user