fix(Scope): revert the __proto__ cleanup as that could cause regressions

When a async task interacts with a scope that has been destroyed already
and if it interacts with a property that is prototypically inherited from
some parent scope then resetting proto would make these inherited properties
inaccessible and would result in NPEs
This commit is contained in:
Igor Minar
2014-04-03 12:34:36 -07:00
parent c9677920d4
commit 71c11e96c6
2 changed files with 19 additions and 8 deletions

View File

@@ -757,14 +757,6 @@ function $RootScopeProvider(){
// prevent NPEs since these methods have references to properties we nulled out
this.$destroy = this.$digest = this.$apply = noop;
this.$on = this.$watch = function() { return noop; };
/* jshint -W103 */
// not all browsers have __proto__ so check first
if (this.__proto__) {
this.__proto__ = null;
}
/* jshint +W103 */
},
/**