diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 13:56:07 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 13:56:07 +0000 |
commit | 573f0908d9bca33a994d03cec7e00057096a9af1 (patch) | |
tree | 39d937caae37cc4a8573b34bf625d8bb9ed7b999 /rlz | |
parent | 19e21ae08ae5f92393a17292658cce94ecd954a9 (diff) | |
download | chromium_src-573f0908d9bca33a994d03cec7e00057096a9af1.zip chromium_src-573f0908d9bca33a994d03cec7e00057096a9af1.tar.gz chromium_src-573f0908d9bca33a994d03cec7e00057096a9af1.tar.bz2 |
Speculatively use memory barriers for loading and storing g_context,
which points to a data structure that might otherwise not be fetched
together with the pointer.
BUG=NONE
R=rogerta@chromium.org
Review URL: https://codereview.chromium.org/327783003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz')
-rw-r--r-- | rlz/lib/financial_ping.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc index a5990a2..da710e1 100644 --- a/rlz/lib/financial_ping.cc +++ b/rlz/lib/financial_ping.cc @@ -188,7 +188,7 @@ AtomicWord g_context; bool FinancialPing::SetURLRequestContext( net::URLRequestContextGetter* context) { - base::subtle::NoBarrier_Store( + base::subtle::Release_Store( &g_context, reinterpret_cast<AtomicWord>(context)); return true; } @@ -218,7 +218,7 @@ bool send_financial_ping_interrupted_for_test = false; void ShutdownCheck(base::WeakPtr<base::RunLoop> weak) { if (!weak.get()) return; - if (!base::subtle::NoBarrier_Load(&g_context)) { + if (!base::subtle::Acquire_Load(&g_context)) { send_financial_ping_interrupted_for_test = true; weak->QuitClosure().Run(); return; @@ -295,7 +295,7 @@ bool FinancialPing::PingServer(const char* request, std::string* response) { // the method is running. net::URLRequestContextGetter* context = reinterpret_cast<net::URLRequestContextGetter*>( - base::subtle::NoBarrier_Load(&g_context)); + base::subtle::Acquire_Load(&g_context)); // Browser shutdown will cause the context to be reset to NULL. if (!context) |