https://bugzilla.wikimedia.org/show_bug.cgi?id=28816

--- Comment #10 from Roan Kattouw <roan.katt...@gmail.com> 2011-11-30 12:45:58 
UTC ---
(In reply to comment #9)
> There are a bunch of 'for (var x in obj)' loops:
>   for ( var prop in data.paraminfo ) {
> this is unsafe if object prototypes have been modified by some JS libraries.
> Recommend using $.map or $.each() here, which already covers the necessary
> logic. (otherwise use if(data.paraminfo.hasOwnProperty(prop)) on each
> iteration).
> 
Our coding conventions generally consider for..in loops on objects safe. If a
library modifies Object.prototype, then that library is profoundly evil and we
shouldn't use it. for..in loops on *arrays*, however, are not acceptable.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to