Bug 912469 - Use Object.keys or hasOwnProperty for safer iteration. r=gandalf