Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
docs(VmTurnZone): Fix some messed up markdown.
Browse files Browse the repository at this point in the history
Closes #968
  • Loading branch information
Chris Calabro authored and jbdeboer committed Apr 29, 2014
1 parent 39977b5 commit ce2e45e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/core/zone.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
part of angular.core_internal;

/**
* Handles an [VmTurnZone] onTurnDone event.
* Handles a [VmTurnZone] onTurnDone event.
*/
typedef void ZoneOnTurnDone();

/**
* Handles an [VmTurnZone] onTurnDone event.
* Handles a [VmTurnZone] onTurnDone event.
*/
typedef void ZoneOnTurnStart();

/**
* Handles an [VmTurnZone] onError event.
* Handles a [VmTurnZone] onError event.
*/
typedef void ZoneOnError(dynamic error, dynamic stacktrace,
LongStackTrace longStacktrace);
Expand Down Expand Up @@ -61,8 +61,11 @@ class VmTurnZone {
/**
* Associates with this
*
* - an "outer" [Zone], which is the one that created this.
* - an "inner" [Zone], which is a child of the outer [Zone].
*
* Defaults [onError] to forward errors to the outer [Zone].
* Defaults [onTurnDone] to a no-op.
* Defaults [onTurnStart] and [onTurnDone] to no-op functions.
*/
VmTurnZone() {
_outerZone = async.Zone.current;
Expand Down Expand Up @@ -154,15 +157,15 @@ class VmTurnZone {
* Called with any errors from the inner zone.
*/
ZoneOnError onError;

/// Prevent silently ignoring uncaught exceptions by forwarding such exceptions to the outer zone.
/// Forwards uncaught exceptions to the outer zone.
void _defaultOnError(dynamic e, dynamic s, LongStackTrace ls) =>
_outerZone.handleUncaughtError(e, s);

/**
* Called at the beginning of each VM turn in which inner zone code runs.
* "At the beginning" means before any of the microtasks from the private
* microtask queue of the inner zone is executed. Notes
*
* - [onTurnStart] runs repeatedly until no more microstasks are scheduled
* within [onTurnStart], [run] or [onTurnDone]. You usually don't want it to
* schedule any. For example, if its first line of code is `new Future.value()`,
Expand All @@ -171,11 +174,11 @@ class VmTurnZone {
ZoneOnTurnStart onTurnStart;
void _defaultOnTurnStart() => null;


/**
* Called at the end of each VM turn in which inner zone code runs.
* "At the end" means after the private microtask queue of the inner zone is
* exhausted but before the next VM turn. Notes
*
* - This won't wait for microtasks scheduled in zones other than the inner
* zone, e.g. those scheduled with [runOutsideAngular].
* - [onTurnDone] runs repeatedly until no more tasks are scheduled within
Expand Down

0 comments on commit ce2e45e

Please sign in to comment.