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

Unified Diff: base/synchronization/cancellation_flag.h

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest 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
Index: base/synchronization/cancellation_flag.h
diff --git a/base/synchronization/cancellation_flag.h b/base/synchronization/cancellation_flag.h
index 51a4def1eb31984f0eafeb97dbd0d8678541ee59..0f0f08ee8f70ab0f49d60c9a0b8770cba220a1eb 100644
--- a/base/synchronization/cancellation_flag.h
+++ b/base/synchronization/cancellation_flag.h
@@ -29,6 +29,11 @@ class BASE_EXPORT CancellationFlag {
void Set();
bool IsSet() const; // Returns true iff the flag was set.
+ // For subtle reasons that may be different on different architectures,
+ // a different thread testing IsSet() may erroneously read 'true' after
+ // this method has been called.
+ void UnsafeResetForTesting();
+
private:
base::subtle::Atomic32 flag_;
#if !defined(NDEBUG)

Powered by Google App Engine
This is Rietveld 408576698