mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 9e56a20d367f on suspicion of causing mochitest-1 and 3 permaorange
This commit is contained in:
parent
019bd65baf
commit
dca32622e6
@ -729,16 +729,13 @@ var Scratchpad = {
|
||||
*/
|
||||
getRecentFiles: function SP_getRecentFiles()
|
||||
{
|
||||
let branch = Services.prefs.getBranch("devtools.scratchpad.");
|
||||
let maxRecent = Services.prefs.getIntPref(PREF_RECENT_FILES_MAX);
|
||||
let branch = Services.prefs.
|
||||
getBranch("devtools.scratchpad.");
|
||||
|
||||
let filePaths = [];
|
||||
|
||||
// WARNING: Do not use getCharPref here, it doesn't play nicely with
|
||||
// Unicode strings.
|
||||
|
||||
if (branch.prefHasUserValue("recentFilePaths")) {
|
||||
let data = branch.getComplexValue("recentFilePaths",
|
||||
Ci.nsISupportsString).data;
|
||||
filePaths = JSON.parse(data);
|
||||
filePaths = JSON.parse(branch.getCharPref("recentFilePaths"));
|
||||
}
|
||||
|
||||
return filePaths;
|
||||
@ -784,16 +781,10 @@ var Scratchpad = {
|
||||
|
||||
filePaths.push(aFile.path);
|
||||
|
||||
// WARNING: Do not use setCharPref here, it doesn't play nicely with
|
||||
// Unicode strings.
|
||||
|
||||
let str = Cc["@mozilla.org/supports-string;1"]
|
||||
.createInstance(Ci.nsISupportsString);
|
||||
str.data = JSON.stringify(filePaths);
|
||||
|
||||
let branch = Services.prefs.getBranch("devtools.scratchpad.");
|
||||
branch.setComplexValue("recentFilePaths",
|
||||
Ci.nsISupportsString, str);
|
||||
let branch = Services.prefs.
|
||||
getBranch("devtools.scratchpad.");
|
||||
branch.setCharPref("recentFilePaths", JSON.stringify(filePaths));
|
||||
return;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -877,19 +868,11 @@ var Scratchpad = {
|
||||
|
||||
let filePaths = this.getRecentFiles();
|
||||
if (maxRecent < filePaths.length) {
|
||||
let branch = Services.prefs.
|
||||
getBranch("devtools.scratchpad.");
|
||||
let diff = filePaths.length - maxRecent;
|
||||
filePaths.splice(0, diff);
|
||||
|
||||
// WARNING: Do not use setCharPref here, it doesn't play nicely with
|
||||
// Unicode strings.
|
||||
|
||||
let str = Cc["@mozilla.org/supports-string;1"]
|
||||
.createInstance(Ci.nsISupportsString);
|
||||
str.data = JSON.stringify(filePaths);
|
||||
|
||||
let branch = Services.prefs.getBranch("devtools.scratchpad.");
|
||||
branch.setComplexValue("recentFilePaths",
|
||||
Ci.nsISupportsString, str);
|
||||
branch.setCharPref("recentFilePaths", JSON.stringify(filePaths));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -27,7 +27,7 @@ var lists = {
|
||||
|
||||
// Temporary file names.
|
||||
let gFileName01 = "file01_ForBug651942.tmp"
|
||||
let gFileName02 = "☕" // See bug 783858 for more information
|
||||
let gFileName02 = "file02_ForBug651942.tmp"
|
||||
let gFileName03 = "file03_ForBug651942.tmp"
|
||||
let gFileName04 = "file04_ForBug651942.tmp"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user