Closed
Bug 136893
Opened 22 years ago
Closed 22 years ago
Rhino treatment of |for(i in undefined)|, |for(i in null)|
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R4
People
(Reporter: pschwartau, Assigned: norrisboyd)
References
Details
Attachments
(1 file)
This issue grows out of: bug 121744 SpiderMonkey should error on |for(i in undefined)|, |for(i in null)| bug 131348 |var obj; for (item in obj) {}| causes error Before these bugs were filed, SpiderMonkey did NOT error on these statements; Rhino does. Since ECMA-262 Edition 3 requires ECMAScript to error on them, bug 121744 was filed and SpiderMonkey corrected its behavior to match the standard. But many complaints ensued because we had changed the behavior of JS, and were no longer in agreement with the behavior of NN4.7 and IE6. So bug 131348 was filed, and it was decided to undo the 121744 fix. In addition, Waldemar reports in bug 131348 that the ECMA committee is leaning toward treating this as a bug in the standard, and changing it in Edition 4. So: how does Rhino want to behave on these statements? We currently have two testcases, for the two SpiderMonkey bugs: mozilla/js/tests/ecma_3/Statements/regress-121744.js mozilla/js/tests/ecma_3/Statements/regress-131348.js The two tests expect contrary things. I retain both of them because at present, SpiderMonkey and Rhino do contrary things on these statements. Once this bug is resolved, I will adjust the testcases accordingly.
Reporter | ||
Comment 1•22 years ago
|
||
*** Bug 156510 has been marked as a duplicate of this bug. ***
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
With the patch above Rhino passes ecma_3/Statements/regress-131348.js and naturally fails at ecma_3/Statements/regress-121744.js to follow SM. I can commit it if it is OK (it passes the rest of test suite). (And sory for that bug 156510, next time I will try to do the search in bugzilla ...)
Comment 4•22 years ago
|
||
I commited the fix, so now mozilla/js/tests/ecma_3/Statements/regress-121744.js can be removed
Reporter | ||
Comment 5•22 years ago
|
||
Igor: thanks. Do you want to mark this bug as Fixed, then? I have modified both tests above now that Rhino and SpiderMonkey are in synch on this issue. mozilla/js/tests/ecma_3/Statements/regress-121744.js mozilla/js/tests/ecma_3/Statements/regress-131348.js The two tests expect contrary things. I've put an early return on the former test, so that it no longer runs in either SpiderMonkey or Rhino. I decided to retain it as a record of the issue, rather than CVS-deleting it. Meanwhile, I have removed the early Rhino return on the latter test, so that it tests both SpiderMonkey and Rhino on this issue now. It now passes in both the interpreted and compiled Rhino shells -
Comment 6•22 years ago
|
||
Fixed, as Rhino passes the modified tests.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•