| Index: Source/wtf/text/StringStatics.cpp
|
| diff --git a/Source/wtf/text/StringStatics.cpp b/Source/wtf/text/StringStatics.cpp
|
| index 099f00115619cdf3403f25e96563bff563f4b6f2..a20f3c05d1b8e679426ad48da6e7bedf9e473086 100644
|
| --- a/Source/wtf/text/StringStatics.cpp
|
| +++ b/Source/wtf/text/StringStatics.cpp
|
| @@ -34,11 +34,13 @@
|
|
|
| namespace WTF {
|
|
|
| -StringImpl* StringImpl::empty()
|
| +StringImpl* StringImpl::empty(bool is8Bit)
|
| {
|
| - DEFINE_STATIC_LOCAL(StringImpl, emptyString, (ConstructEmptyString));
|
| - WTF_ANNOTATE_BENIGN_RACE(&emptyString, "Benign race on StringImpl::emptyString reference counter");
|
| - return &emptyString;
|
| + DEFINE_STATIC_LOCAL(StringImpl, empty8BitString, (ConstructEmpty8BitString));
|
| + DEFINE_STATIC_LOCAL(StringImpl, empty16BitString, (ConstructEmpty16BitString));
|
| + WTF_ANNOTATE_BENIGN_RACE(&empty8BitString, "Benign race on StringImpl::empty8BitString reference counter");
|
| + WTF_ANNOTATE_BENIGN_RACE(&empty16BitString, "Benign race on StringImpl::empty16BitString reference counter");
|
| + return is8Bit ? &empty8BitString : &empty16BitString;
|
| }
|
|
|
| WTF_EXPORT DEFINE_GLOBAL(AtomicString, nullAtom)
|
|
|