Avoid use of Object.create() to keep code consistency for iteration of object properties.
Replace Object.create to keep consistent access to object properties
Did you perf test the change? Usually You also need to open a bugtracker ticket
An associated ticket on the bug tracker is necessary.
For more information, see the contributing guidelines.
Also, I think you meant Object.keys.
Thanks for comments! I opened a ticket in bugtracker. http://bugs.jquery.com/ticket/14659
I will recreate a patch to modify wrong commit log if change is accepted.
@staabm Thanks for confirmation. No errors are found in Test Suite. Also I verified that event listeners were removed in my simple test case.
The change works fine, but I don't like the rationale given in the ticket.
@k-ori considering my response here: http://bugs.jquery.com/ticket/14659#comment:1, can you provide evidence of a performance improvement?
I created jsperf benchmark. for-in was faster if hasOwnProperty() is not called (Chrome 31.0/Safari 6.0.5 on OS X 10.8.5).
for-in is smaller than Object.create(). I quote snippet of build script.
Compared to master @ 537e9ce
It looks like we're just backing out the change from c1b8edf, which is fine with me if it saves bytes.
@mzgol addressed this with a slightly different patch in a96d5be . Thanks for pointint this out @k-ori !