problem JS use of for(var I in .....)

RESOLVED DUPLICATE of bug 457093

Status

()

Core
JavaScript Engine
--
major
RESOLVED DUPLICATE of bug 457093
9 years ago
9 years ago

People

(Reporter: michel.roovers, Unassigned)

Tracking

({regression, testcase})

1.8 Branch
x86
Windows Vista
regression, testcase
Points:
---
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322)
Build Identifier: 2.0.0.17

When using for in in my scripts, I'm expirencing problemens simmilar to the problem receaved when extending the Array object through prototype.

Reproducible: Always

Steps to Reproduce:
1. create an javascript object containing an "assosiative array"
function obj()
{
this.arr = new Array();

this.func1 = new Function()
{
var output = '';
for(var I in this.arr)
output += I + ':' + this.arr[I];
alert(ouput);
};
};
2.create an instance of the object
3.call the function in my revision (2.0.0.17) this will crach the script engine (sometimes even XUL alltogether)
Actual Results:  
if your lucky an question wether you like to stop execution

Expected Results:  
printed a string with the array content

Comment 1

9 years ago
Created attachment 340434 [details]
minimal test case

Added test case.  This appears to occur only on FF 2.0.0.17, regression from '.16.  The "alert" result from the test case should show a for loop, not a while loop.

This may be related to bug 437288.

Updated

9 years ago
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.8 Branch

Updated

9 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

9 years ago
This issue has the same regression window as bug 457093:

> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17pre)
> Gecko/2008080703 BonEcho/2.0.0.17pre -> works with the Testcase
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17pre)
> Gecko/2008080803 BonEcho/2.0.0.17pre -> fails on the Testcase
> 
> Bonsai Query for this Timeframe : http://tinyurl.com/4vkc7v

This suggests this issue is a regression from bug 437288 as well.
Flags: blocking1.8.1.18?
Keywords: regression, testcase

Comment 3

9 years ago
Checking in regress-456964-01.js;
/cvsroot/mozilla/js/tests/js1_5/decompilation/regress-456964-01.js,v  <--  regress-456964-01.js
initial revision: 1.1

http://hg.mozilla.org/mozilla-central/rev/8c23dc378500
Flags: in-testsuite+
Flags: in-litmus-

Comment 4

9 years ago
Very confident that this is a duplicate of bug 457093
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 457093

Updated

9 years ago
Flags: blocking1.8.1.18?
You need to log in before you can comment on or make changes to this bug.