Bug 975038 - Remove obsolete indexedDB migration code r=mwu

This commit is contained in:
Fabrice Desré 2014-02-20 11:31:57 -08:00
Родитель 09d14b377f
Коммит c3af83254c
1 изменённых файлов: 0 добавлений и 34 удалений

Просмотреть файл

@ -554,44 +554,10 @@ this.DOMApplicationRegistry = {
}.bind(this)).then(null, Cu.reportError);
},
#ifdef MOZ_WIDGET_GONK
fixIndexedDb: function() {
debug("Fixing indexedDb folder names");
let idbDir = FileUtils.getDir("indexedDBPDir", ["indexedDB"]);
if (!idbDir.exists() || !idbDir.isDirectory()) {
return;
}
let re = /^(\d+)\+(.*)\+(f|t)$/;
let entries = idbDir.directoryEntries;
while (entries.hasMoreElements()) {
let entry = entries.getNext().QueryInterface(Ci.nsIFile);
if (!entry.isDirectory()) {
continue;
}
let newName = entry.leafName.replace(re, "$1+$3+$2");
if (newName != entry.leafName) {
try {
entry.moveTo(idbDir, newName);
} catch(e) { }
}
}
},
#endif
loadAndUpdateApps: function() {
return Task.spawn(function() {
let runUpdate = AppsUtils.isFirstRun(Services.prefs);
#ifdef MOZ_WIDGET_GONK
if (runUpdate) {
this.fixIndexedDb();
}
#endif
yield this.loadCurrentRegistry();
if (runUpdate) {