@@ -133,6 +133,8 @@ class ScopeLocals implements Map {
133
133
* for change detection, change processing and memory management.
134
134
*/
135
135
class Scope {
136
+ final String id;
137
+ int _childScopeNextId = 0 ;
136
138
137
139
/**
138
140
* The default execution context for [watch] es [observe] ers, and [eval] uation.
@@ -182,7 +184,7 @@ class Scope {
182
184
bool get hasOwnStreams => _streams != null && _streams._scope == this ;
183
185
184
186
Scope (Object this .context, this .rootScope, this ._parentScope,
185
- this ._readWriteGroup, this ._readOnlyGroup);
187
+ this ._readWriteGroup, this ._readOnlyGroup, this .id );
186
188
187
189
/**
188
190
* A [watch] sets up a watch in the [digest] phase of the [apply] cycle.
@@ -271,7 +273,8 @@ class Scope {
271
273
assert (isAttached);
272
274
var child = new Scope (childContext, rootScope, this ,
273
275
_readWriteGroup.newGroup (childContext),
274
- _readOnlyGroup.newGroup (childContext));
276
+ _readOnlyGroup.newGroup (childContext),
277
+ '$id :${_childScopeNextId ++}' );
275
278
276
279
var prev = _childTail;
277
280
child._prev = prev;
@@ -422,7 +425,8 @@ class RootScope extends Scope {
422
425
this ._scopeStats)
423
426
: super (context, null , null ,
424
427
new RootWatchGroup (new DirtyCheckingChangeDetector (cacheGetter), context),
425
- new RootWatchGroup (new DirtyCheckingChangeDetector (cacheGetter), context))
428
+ new RootWatchGroup (new DirtyCheckingChangeDetector (cacheGetter), context),
429
+ '' )
426
430
{
427
431
_zone.onTurnDone = apply;
428
432
_zone.onError = (e, s, ls) => _exceptionHandler (e, s);
0 commit comments