mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 5fb14f57f34a (bug 784558)
This commit is contained in:
parent
b6fd66335a
commit
5555b7c0bf
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user