emberjs/ember.js — pull request #5201 by rwjblue (2014-07-21 14:09:40+00:00)
Title: [BUGFIX beta] Prevent strict mode errors from superWrapper.

In Strict Mode accessing the global `window` is considered insecure, and will cause errors. This changes just guards against setting properties on `window` which throws an error like the following:

```
Cannot read property '__nextSuper' of undefined TypeError: Cannot read property '__nextSuper' of undefined
at superWrapper (http://builds.emberjs.com/tags/v1.6.1/ember.js:7568:28)
at App.IndexRoute.App.FooRoute.extend.model (http://emberjs.jsbin.com/yelesahe/3:61:5)
at apply (http://builds.emberjs.com/tags/v1.6.1/ember.js:7993:27)
at superWrapper [as model] (http://builds.emberjs.com/tags/v1.6.1/ember.js:7570:15)
at EmberObject.extend.deserialize (http://builds.emberjs.com/tags/v1.6.1/ember.js:38347:23)
at Object.HandlerInfo.runSharedModelHook (http://builds.emberjs.com/tags/v1.6.1/ember.js:40437:61)
at Object.subclass.getModel (http://builds.emberjs.com/tags/v1.6.1/ember.js:40661:21)
at __exports__.bind (http://builds.emberjs.com/tags/v1.6.1/ember.js:42142:19)
at invokeCallback (http://builds.emberjs.com/tags/v1.6.1/ember.js:10558:19)
at publish (http://builds.emberjs.com/tags/v1.6.1/ember.js:10228:9)
```

[Here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode#.22Securing.22_JavaScript) is what MDN has to say about "Securing" JavaScript.