Closed Bug 136113 Opened 24 years ago Closed 24 years ago

for statement erroneously generates JavaScript error.

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 131348

People

(Reporter: shaohz, Assigned: rogerl)

Details

Attachments

(1 file)

Try the following for statement on Mozilla 0.9.9+ (Build ID: 2002040708) for(i in null) alert(i); It erroneously generates a JavaScript error (Error: null has no properties) in JavaScript console. JavaScript engines in Internet Explorer 5&6, Netscape 4.7x, Netscape 6.2.1 can all handle this for statement without problem. BTW, I detected the bug on Mozilla 0.9.9+ Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9+) Gecko/20020407 (Build ID: 2002040708).
Please read the release notes: http://www.mozilla.org/releases/mozilla0.9.9/ * The following JavaScript snippet now throws an error: for (var foo in undefined) {}. This change was made in order to comply with ECMA-262 3rd Edition Final. (Bug 121744) *** This bug has been marked as a duplicate of 131348 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Open Javascript console to see the error message.
Verified Duplicate -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: