Closed
Bug 783858
Opened 12 years ago
Closed 12 years ago
Unicode in script names breaks scratchpad's recent files
Categories
(DevTools Graveyard :: Scratchpad, defect, P2)
DevTools Graveyard
Scratchpad
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 19
People
(Reporter: espadrine, Assigned: anton)
Details
Attachments
(1 file, 1 obsolete file)
3.17 KB,
patch
|
anton
:
review+
|
Details | Diff | Splinter Review |
Reproducible. 1. Create a file on your hard drive, name it ☕. 2. Open a scratchpad, File > Open, select the file you have just created. 3. Restart Firefox. 4. Open the scratchpad: the File > Open Recent menu is greyed out. We get the following output in the terminal: JavaScript error: chrome://browser/content/scratchpad.js, line 744: SyntaxError: JSON.parse: bad control character in string literal
Assignee | ||
Comment 1•12 years ago
|
||
This patch fixes the issue (get/setCharPref don't play nice with unicode strings) and updates recent-files test to test for unicode filenames.
Assignee: nobody → anton
Status: NEW → ASSIGNED
Attachment #674068 -
Flags: review?(rcampbell)
Attachment #674068 -
Flags: review?(fayearthur)
Comment 2•12 years ago
|
||
Comment on attachment 674068 [details] [diff] [review] Use set/getComplexValue instead of set/getCharPref Review of attachment 674068 [details] [diff] [review]: ----------------------------------------------------------------- looks good. Use some consts! ::: browser/devtools/scratchpad/scratchpad.js @@ +737,3 @@ > if (branch.prefHasUserValue("recentFilePaths")) { > + let data = branch.getComplexValue("recentFilePaths", > + Components.interfaces.nsISupportsString).data; you can use Ci.nsISupportsString here. @@ +786,5 @@ > + // WARNING: Do not use setCharPref here, it doesn't play nicely with > + // Unicode strings. > + > + let str = Components.classes["@mozilla.org/supports-string;1"] > + .createInstance(Components.interfaces.nsISupportsString); Cc and Ci. We have those consts for convenience! ::: browser/devtools/scratchpad/test/browser_scratchpad_bug_651942_recent_files.js @@ +27,4 @@ > > // Temporary file names. > let gFileName01 = "file01_ForBug651942.tmp" > +let gFileName02 = "☕" // See bug 783858 for more information delicious.
Attachment #674068 -
Flags: review?(rcampbell) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Changed the patch to use Cc and Ci constants. Carrying over r+.
Attachment #674068 -
Attachment is obsolete: true
Attachment #674068 -
Flags: review?(fayearthur)
Attachment #674303 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Whiteboard: [land-in-fx-team]
Comment 4•12 years ago
|
||
Comment on attachment 674303 [details] [diff] [review] Use set/getComplexValue instead of set/getCharPref Review of attachment 674303 [details] [diff] [review]: ----------------------------------------------------------------- Wanted to land this patch, but I'd like to know if you have a green try push? ::: browser/devtools/scratchpad/test/browser_scratchpad_bug_651942_recent_files.js @@ +27,4 @@ > > // Temporary file names. > let gFileName01 = "file01_ForBug651942.tmp" > +let gFileName02 = "☕" // See bug 783858 for more information This might fail - based on previous experience you might need to use the unicode escape \uNNNN.
Assignee | ||
Updated•12 years ago
|
Priority: -- → P2
Comment 7•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/9e56a20d367f
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 8•12 years ago
|
||
Backed out on suspicion of causing mochitest-1 and 3 permaorange: https://hg.mozilla.org/integration/fx-team/rev/c5e7f0bbdb84
Whiteboard: [fixed-in-fx-team]
Comment 9•12 years ago
|
||
Relanded: https://hg.mozilla.org/integration/fx-team/rev/45bfc549dcac
Whiteboard: [fixed-in-fx-team]
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/45bfc549dcac
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 19
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•