Closed
Bug 383721
Opened 17 years ago
Closed 17 years ago
Tabs not escaped (to "\t") on some platforms due to isprint() differences
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: timeless, Assigned: crowderbt)
References
Details
Attachments
(1 file)
1.00 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
I'm playing with jsshell and friends and using a very "dumb" command shell which doesn't understand tabs (well, it thinks of them as "get me to the next tab stop"). This means that: js> function a() {return "\t"} js> a function a() { return " "; } js> print(uneval(a)) function a() {return " ";} When I start copying function a() around, I eventually end up with various random results. Would we break many sites or any standard rules if Function.prototype.toString was changed to return "\t" instead of " "? (I pasted this with IE, not sure if that will survive).
Comment 1•17 years ago
|
||
WFM, Mac debug jsshell. js> function a() {return "\t"} js> a function a() { return "\t"; } js> print(uneval(a)) function a() {return "\t";}
Assignee | ||
Comment 2•17 years ago
|
||
Weird, I get Jesse's results in both trunk and 1.8 builds, as well. timeless, what shell build are you using? Have you possibly shadowed Function.toSource somewhere?
Assignee | ||
Comment 3•17 years ago
|
||
Gonna resolve this as WFM for now. timeless please re-open if you have more info later.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
I'm getting the same result as timeless under Windows, in both Firefox 2.0.0.4 and the latest trunk shell. Seems like Microsoft's CRT returns true for isprint('\t') if you call setlocale(LC_ALL, "") before.
Updated•17 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Summary: could spidermonkey please return tabs as escaped elements in Function.toString → Tabs not escaped (to "\t") on some platforms due to isprint() differences
Assignee | ||
Comment 5•17 years ago
|
||
Ok, I can repro this on my Windows machine.
Assignee: general → crowder
Assignee | ||
Updated•17 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 6•17 years ago
|
||
Attachment #267769 -
Flags: review?(mrbkap)
Updated•17 years ago
|
Attachment #267769 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 7•17 years ago
|
||
jsopcode.c: 3.250
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Comment 8•17 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/decompilation/regress-383721.js,v <-- regress-383721.js initial revision: 1.1 done
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•