jdarling/Object.observe — pull request #21 by chopstikk (2014-11-18 22:34:32+00:00)
Title: pass shallow copy of updates to deliverChangeRecords method

This is a fix for the following use case:
If the callback passed to the `Observer` is itself changing some of the `object`'s properties, further updates are added to the queue (`queueUpdates` method) from within the for loop in the `deliverChangeRecords` method. In the current version of the polyfill, `deliverChangeRecords` processes the `_updates`, which are changed in different places. This leads to errors in the use case described above. My solution is to pass in a shallow copy of the `_updates` array to ensure that during processing the `_updates` (in `deliverChangeRecord`) they are not changed.