Closed
Bug 345922
Opened 18 years ago
Closed 18 years ago
Identifiers are reserved in attribute identifiers
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1beta2
People
(Reporter: nanto, Assigned: mrbkap)
References
Details
(Keywords: verified1.8.1, Whiteboard: [patch])
Attachments
(2 files)
1006 bytes,
patch
|
brendan
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
1.72 KB,
patch
|
Details | Diff | Splinter Review |
From bug 336376 comment 6: > > This is a proposed change for ECMA-262 Edition 4. The suggestion comes from > > Douglas Crockford. Instead of reserving identifiers unconditionally, the lexer > > would reserve outside of contexts that must be property names, specifically > > > > * on the right of . and .. operators > > * before the : in a property initialiser within an object initialiser > > * on the right of the :: operator where the right operand is an identifier And should be on the right of @ operators. For example, <label for="idref"/>.@for should return "idref" instead of throwing syntax error.
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Updated•18 years ago
|
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → mozilla1.8.1beta2
Updated•18 years ago
|
Attachment #230704 -
Flags: review?(brendan)
Attachment #230704 -
Flags: review+
Attachment #230704 -
Flags: approval1.8.1?
Would there be any point in asserting that the bit is unset when you start?
Comment 3•18 years ago
|
||
Comment on attachment 230704 [details] [diff] [review] Fix a=drivers. Please land this on the MOZILLA_1_8_BRANCH. We'd also like to know that we haven't the foggiest clue what you're doing here. :)
Attachment #230704 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 4•18 years ago
|
||
(In reply to comment #2) > Would there be any point in asserting that the bit is unset when you start? I looked into this, before attaching the patch, even. The bit is only set around calls to js_GetToken (and macros and functions wrapping it) and immediately unset, so it cannot possibly be set when we get here.
Assignee | ||
Comment 5•18 years ago
|
||
(In reply to comment #3) > We'd also like to know that we haven't the foggiest clue what you're doing > here. :) One of the changes for JS1.7 is to allow keywords to be used as identifiers in certain places where keywords cannot possibly be used. For example, consider the fragment 'foo.if = 3'. The 'if' in the sample cannot possibly be an if statement, so we can simply treat it as the identifier "if" instead of the keyword. The original patch for that feature missed this particular case, which covers the E4X attribute selector (@), which this patch fixes.
Assignee | ||
Comment 6•18 years ago
|
||
Fix checked into the trunk and the 1.8 branch.
Comment 7•18 years ago
|
||
Comment 8•18 years ago
|
||
Checking in regress-336376-01.js; /cvsroot/mozilla/js/tests/js1_7/lexical/regress-336376-01.js,v <-- regress-336376-01.js new revision: 1.2; previous revision: 1.1
Updated•18 years ago
|
Flags: in-testsuite+
Comment 9•18 years ago
|
||
verified fixed 1.8.1, 1.8 windows/mac(ppc|tel)/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
•