Closed
Bug 299641
Opened 19 years ago
Closed 19 years ago
the "LeftHandSideExpression" of a 'for .. in' statement is executed too often.
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8beta4
People
(Reporter: mozilla, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(2 files, 1 obsolete file)
|
112 bytes,
text/plain
|
Details | |
|
5.96 KB,
patch
|
mrbkap
:
review+
brendan
:
superreview+
brendan
:
superreview+
brendan
:
approval1.8b4+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) According to section 12.6.4 of the ECMAscript spec the LeftHandSideExpression should be executed as often as there are properties in the object (returned by Expression). [ the syntax is: 'for ( LeftHandSideExpression in Expression ) Statement']. Firefox executes it one more time (probably first executing the LHSExpr before verifying, that there are still elements). Reproducible: Always
"infun" is printed 3 times, eventhough there are only 2 properties in o. -> there should be only 2 "infun"s.
Updated•19 years ago
|
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.0 Branch
Updated•19 years ago
|
Version: 1.0 Branch → 1.7 Branch
| Assignee | ||
Comment 2•19 years ago
|
||
Comment on attachment 188202 [details]
test-case.
Wrong testcase?
/be| Assignee | ||
Updated•19 years ago
|
Assignee: general → brendan
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.8b4+
Keywords: js1.5
Priority: -- → P3
Target Milestone: --- → mozilla1.8beta4
| Assignee | ||
Comment 3•19 years ago
|
||
This should print 0, not 1. /be
Attachment #188202 -
Attachment is obsolete: true
| Assignee | ||
Updated•19 years ago
|
OS: Linux → All
Hardware: PC → All
Version: 1.7 Branch → Trunk
sorry. didn't get your first comment (probably missed it). your test-case illustrates the point. thx.
| Assignee | ||
Comment 5•19 years ago
|
||
This is probably what you were after, but it required some knowledge of when to fake out a subroutine with an auto-storage-class tree node ;-). /be
Attachment #189137 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 6•19 years ago
|
||
Trying to use ASSIGNED to mean "have patch".... /be
Status: NEW → ASSIGNED
Comment 7•19 years ago
|
||
Comment on attachment 189137 [details] [diff] [review] proposed fix >+ * Set left and right so pn appears to be a TOK_LB node, instead >+ * the TOK_DOT node it is (see the TOK_FOR case in js_EmitTree). You're missing an 'of' at the end of the first line. r=me with that fixed.
Attachment #189137 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 8•19 years ago
|
||
Comment on attachment 189137 [details] [diff] [review] proposed fix Another spot-fix for an ECMA conformance bug. /be
Attachment #189137 -
Flags: superreview+
| Assignee | ||
Comment 9•19 years ago
|
||
Comment on attachment 189137 [details] [diff] [review] proposed fix Another spot-fix for an ECMA conformance bug. /be
Attachment #189137 -
Flags: superreview+
Attachment #189137 -
Flags: approval1.8b4+
| Assignee | ||
Comment 10•19 years ago
|
||
Blug, didn't mean to double submit (or to sr my own patch). Fixed. /be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: testcase?
Comment 11•19 years ago
|
||
Checking in regress-299641.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-299641.js,v <-- regress-299641.js initial revision: 1.1
Flags: testcase? → testcase+
| Assignee | ||
Comment 12•19 years ago
|
||
This was fixed well before 1.8 branched -- why does it need the fixed1.8 keyword? /be
Comment 13•19 years ago
|
||
one the queries was broken and we thought we were seeing some false positives due to the missing keyword, but it turned out to be our query string. Didn't realize that was going to inconvience you, sorry :)
Keywords: fixed1.8
You need to log in
before you can comment on or make changes to this bug.
Description
•