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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp

Issue 1862223005: Add setIndexedDBClientCreateFunction() explanatory comment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp
index ddbe4cd3a088f29fdb4fd10eed1cf2db736ede51..55478aab08ff6520c900dbed8931b8270fb78694 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp
@@ -11,6 +11,10 @@ static void* idbClientCreateFunction = nullptr;
void setIndexedDBClientCreateFunction(CreateIndexedDBClient createFunction)
{
+ // See web/IndexedDBClientImpl.h comment for some context. As the initialization
+ // of this IndexedDB client constructor now happens as context is set up for
+ // threads, it is possible that setIndexedDBClientCreateFunction() will be
+ // called more than once. Hence update atomicity is needed.
#if ENABLE(ASSERT)
CreateIndexedDBClient* currentFunction = reinterpret_cast<CreateIndexedDBClient*>(acquireLoad(&idbClientCreateFunction));
ASSERT(!currentFunction || currentFunction == createFunction);
« 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