зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1263324 - Part 1: Fixing the cache storage inspector to obey originAttributes and indexedDB storage inspector to use correct database file name with originAttributes. r=miker
--HG-- extra : rebase_source : c5da3ad94b70b9ff59b22dddcc3b0fd539e5d003
This commit is contained in:
Родитель
809b455084
Коммит
30dc977e6a
|
@ -1219,8 +1219,12 @@ StorageActors.createActor({
|
|||
}, {
|
||||
getCachesForHost: Task.async(function* (host) {
|
||||
let uri = Services.io.newURI(host);
|
||||
let attrs = this.storageActor
|
||||
.document
|
||||
.nodePrincipal
|
||||
.originAttributes;
|
||||
let principal =
|
||||
Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri);
|
||||
Services.scriptSecurityManager.createCodebasePrincipal(uri, attrs);
|
||||
|
||||
// The first argument tells if you want to get |content| cache or |chrome|
|
||||
// cache.
|
||||
|
@ -1664,11 +1668,11 @@ StorageActors.createActor({
|
|||
|
||||
populateStoresForHost: Task.async(function* (host) {
|
||||
let storeMap = new Map();
|
||||
let {names} = yield this.getDBNamesForHost(host);
|
||||
|
||||
let win = this.storageActor.getWindowFromHost(host);
|
||||
if (win) {
|
||||
let principal = win.document.nodePrincipal;
|
||||
let {names} = yield this.getDBNamesForHost(host, principal);
|
||||
|
||||
for (let {name, storage} of names) {
|
||||
let metadata = yield this.getDBMetaData(host, principal, name, storage);
|
||||
|
@ -2025,8 +2029,8 @@ var indexedDBHelpers = {
|
|||
/**
|
||||
* Fetches all the databases and their metadata for the given `host`.
|
||||
*/
|
||||
getDBNamesForHost: Task.async(function* (host) {
|
||||
let sanitizedHost = this.getSanitizedHost(host);
|
||||
getDBNamesForHost: Task.async(function* (host, principal) {
|
||||
let sanitizedHost = this.getSanitizedHost(host) + principal.originSuffix;
|
||||
let profileDir = OS.Constants.Path.profileDir;
|
||||
let files = [];
|
||||
let names = [];
|
||||
|
@ -2363,8 +2367,8 @@ var indexedDBHelpers = {
|
|||
return indexedDBHelpers.splitNameAndStorage(name);
|
||||
}
|
||||
case "getDBNamesForHost": {
|
||||
let [host] = args;
|
||||
return indexedDBHelpers.getDBNamesForHost(host);
|
||||
let [host, principal] = args;
|
||||
return indexedDBHelpers.getDBNamesForHost(host, principal);
|
||||
}
|
||||
case "getValuesForHost": {
|
||||
let [host, name, options, hostVsStores, principal] = args;
|
||||
|
|
Загрузка…
Ссылка в новой задаче