Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: lib/src/backend/invoker.dart

Issue 1152083003: Make Invoker.removeAllOutstandingCallbacks public. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/invoker.dart
diff --git a/lib/src/backend/invoker.dart b/lib/src/backend/invoker.dart
index 221c52a06a3667638c1ec85ea2efda388906d061..fbf7f20176cc825c2476944b90d52ef9962f2a0f 100644
--- a/lib/src/backend/invoker.dart
+++ b/lib/src/backend/invoker.dart
@@ -120,6 +120,13 @@ class Invoker {
void removeOutstandingCallback() =>
_outstandingCallbacks.removeOutstandingCallback();
+ /// Removes all outstanding callbacks, for example when an error occurs.
+ ///
+ /// Future calls to [addOutstandingCallback] and [removeOutstandingCallback]
+ /// will be ignored.
+ void removeAllOutstandingCallbacks() =>
+ _outstandingCallbacks.removeAllOutstandingCallbacks();
+
/// Runs [fn] and returns once all (registered) outstanding callbacks it
/// transitively invokes have completed.
///
@@ -160,7 +167,7 @@ class Invoker {
}
_controller.addError(error, stackTrace);
- _outstandingCallbacks.removeAllOutstandingCallbacks();
+ removeAllOutstandingCallbacks();
// If a test was marked as success but then had an error, that indicates
// that it was poorly-written and could be flaky.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698