Backed out changeset 5fb14f57f34a (bug 784558)

This commit is contained in:
Tim Taubert 2012-08-22 16:02:25 -07:00
parent b6fd66335a
commit 5555b7c0bf
2 changed files with 1 additions and 25 deletions

View File

@ -19,9 +19,6 @@ let PageThumbsWorker = {
let data = {result: null, data: null};
switch (msg.type) {
case "removeFile":
data.result = this.removeFile(msg);
break;
case "removeFiles":
data.result = this.removeFiles(msg);
break;
@ -51,15 +48,6 @@ let PageThumbsWorker = {
return entries;
},
removeFile: function Worker_removeFile(msg) {
try {
OS.File.remove(msg.path);
return true;
} catch (e) {
return false;
}
},
removeFiles: function Worker_removeFiles(msg) {
for (let file of msg.paths) {
try {

View File

@ -44,7 +44,7 @@ function runTests() {
// clear last 10 mins of history
yield clearHistory(true);
yield whenFileRemoved();
ok(!copy.exists(), "copy of thumbnail has been removed");
}
function clearHistory(aUseRange) {
@ -65,12 +65,10 @@ function clearHistory(aUseRange) {
if (aUseRange) {
let usec = Date.now() * 1000;
s.range = [usec - 10 * 60 * 1000 * 1000, usec];
s.ignoreTimespan = false;
}
s.sanitize();
s.range = null;
s.ignoreTimespan = true;
executeSoon(function () {
if (PageThumbsStorage.getFileForURL(URL).exists())
@ -89,13 +87,3 @@ function whenFileExists() {
executeSoon(callback);
}
function whenFileRemoved() {
let callback = whenFileRemoved;
let file = PageThumbsStorage.getFileForURL(URL);
if (!file.exists())
callback = next;
executeSoon(callback);
}