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

Unified Diff: base/lazy_instance.cc

Issue 147008: Added dynamic annotation files into base/...,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « base/lazy_instance.h ('k') | base/singleton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/lazy_instance.cc
===================================================================
--- base/lazy_instance.cc (revision 18944)
+++ base/lazy_instance.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/at_exit.h"
#include "base/atomicops.h"
+#include "base/dynamic_annotations.h"
#include "base/basictypes.h"
#include "base/platform_thread.h"
@@ -20,6 +21,10 @@
&state_, STATE_EMPTY, STATE_CREATING) == STATE_EMPTY) {
// Created the instance in the space provided by |instance|.
ctor(instance);
+
+ // See the comment to the corresponding HAPPENS_AFTER in Pointer().
+ ANNOTATE_HAPPENS_BEFORE(&state_);
+
// Instance is created, go from CREATING to CREATED.
base::subtle::Release_Store(&state_, STATE_CREATED);
// Register the destructor callback with AtExitManager.
« no previous file with comments | « base/lazy_instance.h ('k') | base/singleton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698