|
533 | 533 | * |
534 | 534 | * When a subtask is discarded due to an unreported rejection in its parent |
535 | 535 | * frame, the existing callbacks on that task will never settle and the |
536 | | - * callbacks will not be invoked. If a new callback is attached ot the subtask |
| 536 | + * callbacks will not be invoked. If a new callback is attached to the subtask |
537 | 537 | * _after_ it has been discarded, it is handled the same as adding a callback |
538 | 538 | * to a cancelled promise: the error-callback path is invoked. This behavior is |
539 | 539 | * intended to handle cases where the user saves a reference to a task promise, |
|
594 | 594 | * > must execute in the order of their originating calls to `then`. |
595 | 595 | * > |
596 | 596 | * |
597 | | - * Specifically, the conformance tests contains the following scenario (for |
| 597 | + * Specifically, the conformance tests contain the following scenario (for |
598 | 598 | * brevity, only the fulfillment version is shown): |
599 | 599 | * |
600 | 600 | * var p1 = Promise.resolve(); |
|
608 | 608 | * // B |
609 | 609 | * |
610 | 610 | * Since the [ControlFlow](#scheduling_callbacks) executes promise callbacks as |
611 | | - * tasks, with this module, the result would be |
| 611 | + * tasks, with this module, the result would be: |
612 | 612 | * |
613 | 613 | * var p2 = promise.fulfilled(); |
614 | 614 | * p2.then(function() { |
@@ -2172,21 +2172,21 @@ const SIMPLE_SCHEDULER = new SimpleScheduler; |
2172 | 2172 | * promises to be resolved before marking the task as completed. |
2173 | 2173 | * |
2174 | 2174 | * Tasks and each callback registered on a {@link ManagedPromise} will be run |
2175 | | - * in their own ControlFlow frame. Any tasks scheduled within a frame will take |
| 2175 | + * in their own ControlFlow frame. Any tasks scheduled within a frame will take |
2176 | 2176 | * priority over previously scheduled tasks. Furthermore, if any of the tasks in |
2177 | 2177 | * the frame fail, the remainder of the tasks in that frame will be discarded |
2178 | 2178 | * and the failure will be propagated to the user through the callback/task's |
2179 | 2179 | * promised result. |
2180 | 2180 | * |
2181 | 2181 | * Each time a ControlFlow empties its task queue, it will fire an |
2182 | | - * {@link ControlFlow.EventType.IDLE IDLE} event. Conversely, |
2183 | | - * whenever the flow terminates due to an unhandled error, it will remove all |
| 2182 | + * {@link ControlFlow.EventType.IDLE IDLE} event. Conversely, whenever |
| 2183 | + * the flow terminates due to an unhandled error, it will remove all |
2184 | 2184 | * remaining tasks in its queue and fire an |
2185 | 2185 | * {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION UNCAUGHT_EXCEPTION} event. |
2186 | 2186 | * If there are no listeners registered with the flow, the error will be |
2187 | 2187 | * rethrown to the global error handler. |
2188 | 2188 | * |
2189 | | - * Refer to the {@link ./promise} module documentation for a detailed |
| 2189 | + * Refer to the {@link ./promise} module documentation for a detailed |
2190 | 2190 | * explanation of how the ControlFlow coordinates task execution. |
2191 | 2191 | * |
2192 | 2192 | * @implements {Scheduler} |
@@ -2258,8 +2258,7 @@ class ControlFlow extends events.EventEmitter { |
2258 | 2258 | * control flow stack and cause rejections within parent tasks. If error |
2259 | 2259 | * propagation is disabled, tasks will not be aborted when an unhandled |
2260 | 2260 | * promise rejection is detected, but the rejection _will_ trigger an |
2261 | | - * {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION} |
2262 | | - * event. |
| 2261 | + * {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION} event. |
2263 | 2262 | * |
2264 | 2263 | * The default behavior is to propagate all unhandled rejections. _The use |
2265 | 2264 | * of this option is highly discouraged._ |
@@ -2293,7 +2292,7 @@ class ControlFlow extends events.EventEmitter { |
2293 | 2292 | * {@code opt_includeStackTraces === true}, the string will include the |
2294 | 2293 | * stack trace from when each task was scheduled. |
2295 | 2294 | * @param {string=} opt_includeStackTraces Whether to include the stack traces |
2296 | | - * from when each task was scheduled. Defaults to false. |
| 2295 | + * from when each task was scheduled. Defaults to false. |
2297 | 2296 | * @return {string} String representation of this flow's internal state. |
2298 | 2297 | */ |
2299 | 2298 | getSchedule(opt_includeStackTraces) { |
@@ -2345,7 +2344,7 @@ class ControlFlow extends events.EventEmitter { |
2345 | 2344 | } |
2346 | 2345 |
|
2347 | 2346 | /** |
2348 | | - * Returns the currently actively task queue for this flow. If there is no |
| 2347 | + * Returns the currently active task queue for this flow. If there is no |
2349 | 2348 | * active queue, one will be created. |
2350 | 2349 | * @return {!TaskQueue} the currently active task queue for this flow. |
2351 | 2350 | * @private |
|
0 commit comments