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

Unified Diff: Source/bindings/core/v8/Dictionary.cpp

Issue 794223003: Cheaper thread-safe atomic initialization of static references. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add type check for initial value Created 5 years, 11 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 | Source/bindings/core/v8/ScriptProfiler.cpp » ('j') | Source/wtf/Threading.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/Dictionary.cpp
diff --git a/Source/bindings/core/v8/Dictionary.cpp b/Source/bindings/core/v8/Dictionary.cpp
index bc3b7cc0a7a007757d41d305d6daf4a7864897ae..91b09a48d1f3e5ddc70a0b17a746f658336fead6 100644
--- a/Source/bindings/core/v8/Dictionary.cpp
+++ b/Source/bindings/core/v8/Dictionary.cpp
@@ -48,8 +48,8 @@ namespace blink {
static ExceptionState& emptyExceptionState()
{
- AtomicallyInitializedStatic(WTF::ThreadSpecific<NonThrowableExceptionState>*, exceptionState = new ThreadSpecific<NonThrowableExceptionState>);
- return **exceptionState;
+ AtomicallyInitializedStaticReference(WTF::ThreadSpecific<NonThrowableExceptionState>, exceptionState, new ThreadSpecific<NonThrowableExceptionState>);
+ return *exceptionState;
}
Dictionary::Dictionary()
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptProfiler.cpp » ('j') | Source/wtf/Threading.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698