Closed
Bug 352097
Opened 19 years ago
Closed 19 years ago
E4X XMLPI that does not contain embedded spaces decompiles with extra space
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: Waldo)
References
Details
(Keywords: testcase, verified1.8.1)
Attachments
(2 files, 1 obsolete file)
|
2.82 KB,
text/plain
|
Details | |
|
2.86 KB,
patch
|
jwalden+fxhelp
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
js> function() { var y = <?foo?> }
function () {
var y = <?foo ?>;
}
js> function() { var y = <?foo ?> }
function () {
var y = <?foo ?>;
}
Comment 1•19 years ago
|
||
Hmm, tricky.
http://www.w3.org/TR/xml-c14n#Example-OutsideDoc
Updated•19 years ago
|
Assignee: general → jwalden+bmo
| Assignee | ||
Comment 2•19 years ago
|
||
Removing the added space and eliminating trailing spaces for PIs without data requires two changes: first, only print the space when the PI's data has non-zero length (the jsopcode.c change), and second, trim the tokenbuf containing the target so that we don't associate ("f ", "") with the PI denoted by <?f ?>, making sure to do so *after* js_AtomizeChars (the jsscan.c change).
I also folded bug 352103's fix (|if (targetLength==0) goto bad_xml_markup;|) since it was so small.
Attachment #237812 -
Flags: review?(brendan)
| Assignee | ||
Comment 3•19 years ago
|
||
Comment 4•19 years ago
|
||
Comment on attachment 237812 [details] [diff] [review]
Patch
Local style prefers *rval = = '\0' to !*rval. r=me with that, and nominate the updated patch for 1.8.1. Thanks,
/be
Attachment #237812 -
Flags: review?(brendan) → review+
Comment 5•19 years ago
|
||
Checked in on trunk.
Small, tightly-contained patch to make XML PI decompilation saner and to reject a certain type of invalid XML PI in E4X processing...
Attachment #237812 -
Attachment is obsolete: true
Attachment #237829 -
Flags: review+
Attachment #237829 -
Flags: approval1.8.1?
| Reporter | ||
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 6•19 years ago
|
||
Comment on attachment 237829 [details] [diff] [review]
Fixes nit
a=schrep
Attachment #237829 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 7•19 years ago
|
||
Fixed on branch.
Keywords: fixed1.8.1
Target Milestone: --- → mozilla1.8.1
Comment 8•19 years ago
|
||
(In reply to comment #3)
> Created an attachment (id=237816) [edit]
> Testcase
>
Checking in regress-352097.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-352097.js,v <-- regress-352097.js
initial revision: 1.1
done
thanks!
Flags: in-testsuite+
Comment 9•19 years ago
|
||
verified fixed 1.8 20060914 windows/linux 1.9 20060914 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•