зеркало из https://github.com/mozilla/gecko-dev.git
Bug 975038 - Remove obsolete indexedDB migration code r=mwu
This commit is contained in:
Родитель
09d14b377f
Коммит
c3af83254c
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче