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

Unified Diff: Source/wtf/text/StringStatics.cpp

Issue 587173005: Add WTF::String::emptyString16Bit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « Source/wtf/text/StringImpl.h ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/StringStatics.cpp
diff --git a/Source/wtf/text/StringStatics.cpp b/Source/wtf/text/StringStatics.cpp
index 099f00115619cdf3403f25e96563bff563f4b6f2..9231216e192fe35d67e40d007828b0a9be01a19a 100644
--- a/Source/wtf/text/StringStatics.cpp
+++ b/Source/wtf/text/StringStatics.cpp
@@ -37,7 +37,16 @@ namespace WTF {
StringImpl* StringImpl::empty()
{
DEFINE_STATIC_LOCAL(StringImpl, emptyString, (ConstructEmptyString));
- WTF_ANNOTATE_BENIGN_RACE(&emptyString, "Benign race on StringImpl::emptyString reference counter");
+ WTF_ANNOTATE_BENIGN_RACE(&emptyString,
+ "Benign race on the reference counter of a static string created by StringImpl::empty");
+ return &emptyString;
+}
+
+StringImpl* StringImpl::empty16Bit()
+{
+ DEFINE_STATIC_LOCAL(StringImpl, emptyString, (ConstructEmptyString16Bit));
+ WTF_ANNOTATE_BENIGN_RACE(&emptyString,
+ "Benign race on the reference counter of a static string created by StringImpl::empty16Bit");
return &emptyString;
}
« no previous file with comments | « Source/wtf/text/StringImpl.h ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698