emberjs/ember.js — pull request #5645 by stefanpenner (2014-09-27 05:44:36+00:00)
Title: [Bugfix beta] slightly defensive perf

Ember.merge is global and as such if merge(x, y) ever happens where y is not safe for enumeration, it can deopt the function (in v8) for all other users.

Since functions are shared, deopting merge can cause inlining bailout cascades throughout the framework. Now it is still possible to deopt it by for example passing a global like window to it, but at least it wont happen more unexpectedly.

example inlining bailout cascade

![screenshot 2014-09-27 01 21 48](https://cloud.githubusercontent.com/assets/1377/4429852/54291452-4609-11e4-89d8-d2ab119a2e95.png)