| Index: pkg/observe/lib/src/dirty_check.dart
|
| diff --git a/pkg/observe/lib/src/dirty_check.dart b/pkg/observe/lib/src/dirty_check.dart
|
| index 8ab8c3006dc110f6f32b67a77d2e74f7b569ea40..2084f227163a9d9642b0f5c8e584d21188879c51 100644
|
| --- a/pkg/observe/lib/src/dirty_check.dart
|
| +++ b/pkg/observe/lib/src/dirty_check.dart
|
| @@ -2,22 +2,21 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -/**
|
| - * *Warning*: this library is **internal**, and APIs are subject to change.
|
| - *
|
| - * Tracks observable objects for dirty checking and testing purposes.
|
| - *
|
| - * It can collect all observed objects, which can be used to trigger predictable
|
| - * delivery of all pending changes in a test, including objects allocated
|
| - * internally to another library, such as those in `package:template_binding`.
|
| - */
|
| +/// *Warning*: this library is **internal**, and APIs are subject to change.
|
| +///
|
| +/// Tracks observable objects for dirty checking and testing purposes.
|
| +///
|
| +/// It can collect all observed objects, which can be used to trigger
|
| +/// predictable delivery of all pending changes in a test, including objects
|
| +/// allocated internally to another library, such as those in
|
| +/// `package:template_binding`.
|
| library observe.src.dirty_check;
|
|
|
| import 'dart:async';
|
| import 'package:logging/logging.dart';
|
| import 'package:observe/observe.dart' show Observable;
|
|
|
| -/** The number of active observables in the system. */
|
| +/// The number of active observables in the system.
|
| int get allObservablesCount => _allObservablesCount;
|
|
|
| int _allObservablesCount = 0;
|
| @@ -32,12 +31,10 @@ void registerObservable(Observable obj) {
|
| _allObservablesCount++;
|
| }
|
|
|
| -/**
|
| - * Synchronously deliver all change records for known observables.
|
| - *
|
| - * This will execute [Observable.deliverChanges] on objects that inherit from
|
| - * [Observable].
|
| - */
|
| +/// Synchronously deliver all change records for known observables.
|
| +///
|
| +/// This will execute [Observable.deliverChanges] on objects that inherit from
|
| +/// [Observable].
|
| // Note: this is called performMicrotaskCheckpoint in change_summary.js.
|
| void dirtyCheckObservables() {
|
| if (_delivering) return;
|
| @@ -85,17 +82,13 @@ void dirtyCheckObservables() {
|
|
|
| const MAX_DIRTY_CHECK_CYCLES = 1000;
|
|
|
| -/**
|
| - * Log for messages produced at runtime by this library. Logging can be
|
| - * configured by accessing Logger.root from the logging library.
|
| - */
|
| +/// Log for messages produced at runtime by this library. Logging can be
|
| +/// configured by accessing Logger.root from the logging library.
|
| final Logger _logger = new Logger('Observable.dirtyCheck');
|
|
|
| -/**
|
| - * Creates a [ZoneSpecification] to set up automatic dirty checking after each
|
| - * batch of async operations. This ensures that change notifications are always
|
| - * delivered. Typically used via [dirtyCheckZone].
|
| - */
|
| +/// Creates a [ZoneSpecification] to set up automatic dirty checking after each
|
| +/// batch of async operations. This ensures that change notifications are always
|
| +/// delivered. Typically used via [dirtyCheckZone].
|
| ZoneSpecification dirtyCheckZoneSpec() {
|
| bool pending = false;
|
|
|
| @@ -133,10 +126,8 @@ ZoneSpecification dirtyCheckZoneSpec() {
|
| registerUnaryCallback: wrapUnaryCallback);
|
| }
|
|
|
| -/**
|
| - * Forks a [Zone] off the current one that does dirty-checking automatically
|
| - * after each batch of async operations. Equivalent to:
|
| - *
|
| - * Zone.current.fork(specification: dirtyCheckZoneSpec());
|
| - */
|
| +/// Forks a [Zone] off the current one that does dirty-checking automatically
|
| +/// after each batch of async operations. Equivalent to:
|
| +///
|
| +/// Zone.current.fork(specification: dirtyCheckZoneSpec());
|
| Zone dirtyCheckZone() => Zone.current.fork(specification: dirtyCheckZoneSpec());
|
|
|