style(Scope): rename child scope type from Child to ChildScope

This change makes it easier to debug angular, especiall when dealing with heap snapshots
and hunting for memory leaks.
This commit is contained in:
Igor Minar 2013-12-03 15:39:20 -08:00
parent bb36bc7edf
commit 7401c70718

View file

@ -172,7 +172,7 @@ function $RootScopeProvider(){
*
*/
$new: function(isolate) {
var Child,
var ChildScope,
child;
if (isolate) {
@ -182,11 +182,11 @@ function $RootScopeProvider(){
child.$$asyncQueue = this.$$asyncQueue;
child.$$postDigestQueue = this.$$postDigestQueue;
} else {
Child = function() {}; // should be anonymous; This is so that when the minifier munges
ChildScope = function() {}; // should be anonymous; This is so that when the minifier munges
// the name it does not become random set of chars. This will then show up as class
// name in the debugger.
Child.prototype = this;
child = new Child();
ChildScope.prototype = this;
child = new ChildScope();
child.$id = nextUid();
}
child['this'] = child;