Closed
Bug 382098
Opened 18 years ago
Closed 17 years ago
E4X attribute literals broken
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: martin, Assigned: inonit)
Details
Attachments
(1 file)
114 bytes,
application/javascript
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: CVS 2007-05-26
Consider the following test program, "test.js":
a=1
b=<xml><element attr={a}>{2}</element></xml>
print(b)
c=<xml><element attr={1}>{2}</element></xml>
print(c)
Reproducible: Always
Steps to Reproduce:
1. java -jar js.jar -opt -1 test.js
2. java -jar js.jar -opt 0 test.js
Actual Results:
Case 1): Code for 'b' works, 'c' breaks.
Case 2): Both 'b' and 'c' break.
TypeError: Cannot parse XML: Open quote is expected for attribute "{1}" associated with an element type "attr".
if one would print what is actually send to org.mozilla.javascript.xmlimpl.XMLLibImpl.parse(), one would see
Case 1): <xml><element attr="1">2</element></xml> [correct]; and
<xml><element attr=1>2</element></xml> [missing quotes]
Case 2): <xml><element attr=1>2</element></xml> [missing quotes]; and
<xml><element attr=1>2</element></xml> [missing quotes]
Reporter | ||
Comment 1•18 years ago
|
||
Updated•17 years ago
|
Assignee: nobody → norrisboyd
Assignee | ||
Comment 2•17 years ago
|
||
I'll take a look at this, since I'm hacking around in the code right now. Case 1 corresponds to the bug I received via private mail but have not filed in Bugzilla. Case 2 I have not yet seen.
Assignee: norrisboyd → inonit
Comment 3•17 years ago
|
||
Sorry--we collided. This is the same bug that Adam de Boor submitted the patch for. I tested it and committed his fix. Let me know if you want to back out that change.
Fixed:
Checking in Interpreter.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Interpreter.java,v <--
Interpreter.java
new revision: 1.320.2.4; previous revision: 1.320.2.3
done
Checking in Parser.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Parser.java,v <--
Parser.java
new revision: 1.112.2.2; previous revision: 1.112.2.1
done
Patch from Adam de Boor <adeboor@google.com>.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•17 years ago
|
||
Did you check it in on the branch or trunk or both?
Comment 5•17 years ago
|
||
Just the branch. I held off checking in on the trunk once I got the message that you were looking at the issue.
Assignee | ||
Comment 6•17 years ago
|
||
OK, I am working off of the branch and I seem to be seeing the changes. I may have checked out after you checked in, which mystified me for a little while (I was running cvs update and getting nothing). Now that I've fixed my big global problem (see bug 388643), I'm digging into the details.
You need to log in
before you can comment on or make changes to this bug.
Description
•