emberjs/data — pull request #1439 by craigteegarden (2013-10-09 22:02:34+00:00)
Title: Correctly define window/global DS namespace in IE7/8.

In IE7/8, defining `DS` globally without directly defining it on
`window.DS` causes it to not appear in the for..in loop that
processes namespaces inside of `findNamespaces()` (same issue [here](http://stackoverflow.com/questions/10633187/javascript-global-variable-behaviour-in-ie8)).

https://github.com/emberjs/ember.js/blob/master/packages/ember-runtime/lib/system/namespace.js#L117

This causes `Ember.Namespace.NAMESPACES_BY_ID` to contain an undefined
key instead of `DS`, which leads to issues when resolving across different
namespaces (such as the `DS` namespace when using DjangoRESTAdapter), or
when generating `toString()` outputs of the DS namespace or child objects.

This change allows one existing, failing test to pass in IE8:

https://github.com/emberjs/data/blob/c04b8e47c7de8b158d16bd4850744fec796ca05f/packages/ember-data/tests/unit/model_test.js#L57

which fails because the `DS` part of the expected `toString()` output
is missing.