google-code-export / wwwsqldesigner

Automatically exported from code.google.com/p/wwwsqldesigner
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

JavaScript errors triggered in IE #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to use wwwsqldesigner in IE8.
2. JavaScript runtime errors show up in debug console

What version of the product are you using? On what operating system?
svn rev 71

Please provide any additional information below.
Patch attached. IE has a JS bug in its implementation of
arrays, for (x in array) will iterate *methods* in absence of array
elements.

Original issue reported on code.google.com by ober.14@osu.edu on 28 Dec 2009 at 4:30

Attachments:

GoogleCodeExporter commented 9 years ago
Obviously I'm responsible for this breakage ;). I've only now gotten to testing 
in IE.

Original comment by ober.14@osu.edu on 28 Dec 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Actually, IE's implementation is right here. Arrays should not be iterated with
"for..in", because this lists all *properties*, which includes properties added 
to
Array.prototype. This is a rather complex part of the JavaScript story; the only
thing relevant to this issue is that arrays should be always iterated with a 
good-old
for (var i=0;...) construct.

Original comment by ondrej.zara on 28 Dec 2009 at 8:58

GoogleCodeExporter commented 9 years ago
If so, then there are a few more problems like this in code that isn't mine ;) 
Updated patch on its way.

Original comment by ober.14@osu.edu on 28 Dec 2009 at 9:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Heh, spoken too soon -- the other code that uses (for x in something) is in 
fact correct. All of the horkage 
smells like my own code. Apologies for the breakage, and patch is attached.

Original comment by ober.14@osu.edu on 28 Dec 2009 at 9:12

Attachments:

GoogleCodeExporter commented 9 years ago
Commited in r74.

Original comment by ondrej.zara on 3 Jan 2010 at 7:24