Bug 1224570 - [Service Workers Panel] Service Workers panel fails to show registered service workers after restart. r=fabrice

This commit is contained in:
Fernando Jimenez 2015-12-10 14:32:58 -05:00
parent 4dbbd6a937
commit 3573b841f0

View File

@ -29,17 +29,12 @@ function serializeServiceWorkerInfo(aServiceWorkerInfo) {
let result = {};
Object.keys(aServiceWorkerInfo).forEach(property => {
if (typeof aServiceWorkerInfo[property] == "function") {
return;
}
if (property === "principal") {
result.principal = {
origin: aServiceWorkerInfo.principal.originNoSuffix,
originAttributes: aServiceWorkerInfo.principal.originAttributes
};
return;
}
result.principal = {
origin: aServiceWorkerInfo.principal.originNoSuffix,
originAttributes: aServiceWorkerInfo.principal.originAttributes
};
["scope", "scriptSpec"].forEach(property => {
result[property] = aServiceWorkerInfo[property];
});