Bug 1265317 - Handle missing storage error as success. r=kmag

This commit is contained in:
Martin Giger
2016-06-15 07:13:00 -04:00
parent fccc9c078a
commit a4d444323f

View File

@@ -99,8 +99,10 @@ this.ExtensionStorage = {
let promise = OS.File.read(path);
promise = promise.then(array => {
return JSON.parse(decoder.decode(array));
}).catch(() => {
Cu.reportError("Unable to parse JSON data for extension storage.");
}).catch((error) => {
if (!error.becauseNoSuchFile) {
Cu.reportError("Unable to parse JSON data for extension storage.");
}
return {};
});
this.cache.set(extensionId, promise);