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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp

Issue 2152173002: Fix static race in DatabaseAuthorizer's whitelistedFunctions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/webdatabase/DatabaseAuthorizer.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
index 353d3b02dff8d0a2071a212eb86a381ba59b7cb3..299008fdbd95fd61085aa9893db3a43b760254cf 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
@@ -30,6 +30,7 @@
#include "wtf/HashSet.h"
#include "wtf/StdLibExtras.h"
+#include "wtf/Threading.h"
#include "wtf/text/StringHash.h"
namespace blink {
@@ -65,7 +66,7 @@ using FunctionNameList = HashSet<String, CaseFoldingHash>;
const FunctionNameList& whitelistedFunctions()
{
- DEFINE_STATIC_LOCAL(FunctionNameList, list, ({
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(FunctionNameList, list, new FunctionNameList({
// SQLite functions used to help implement some operations
// ALTER TABLE helpers
"sqlite_rename_table",
« 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