emberjs/ember.js — pull request #3724 by hjdivad (2013-11-11 21:18:11+00:00)
Title: [BUGFIX beta]  sort guid fallback unconfused by ObjectProxy.

`Em.computed.sort` uses a guid check as a fallback comparator. In order to
search for items correctly, it also wraps items on removal in an object proxy
to shadow new values with the previous values.

This proxy needs to be sort-equal to the actual object. To ensure the guid
fallback check treated the item and the proxy as equal, it had a check
`ObjectProxy.detectInstance`. This check is obviously deficient in the face
of items that might themselves be `ObjectProxy`s, such as `ObjectController`s
when using `@this` as the base array in an `ArrayController`.

This commit creates a local type of `ObjectProxy`, `SearchProxy`, to avoid
this confusion.