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

Unified Diff: Source/core/css/MediaFeatureNames.cpp

Issue 171383002: A thread-safe Media Query Parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another attempt to fix Android build issues Created 6 years, 10 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
Index: Source/core/css/MediaFeatureNames.cpp
diff --git a/Source/core/css/MediaFeatureNames.cpp b/Source/core/css/MediaFeatureNames.cpp
index 2db2bd92e9dd1ba6827845187ea12dca859bb509..4434be46e560251b117ad6671478b6af0db375c3 100644
--- a/Source/core/css/MediaFeatureNames.cpp
+++ b/Source/core/css/MediaFeatureNames.cpp
@@ -32,13 +32,13 @@ namespace WebCore {
namespace MediaFeatureNames {
#define DEFINE_MEDIAFEATURE_GLOBAL(name, str) \
- DEFINE_GLOBAL(AtomicString, name##MediaFeature, str)
+ DEFINE_GLOBAL(String, name##MediaFeature, str)
CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(DEFINE_MEDIAFEATURE_GLOBAL)
#undef DEFINE_MEDIAFEATURE_GLOBAL
void init()
{
-#define INITIALIZE_GLOBAL(name, str) new (NotNull, (void*)&name##MediaFeature) AtomicString(str, AtomicString::ConstructFromLiteral);
+#define INITIALIZE_GLOBAL(name, str) new (NotNull, (void*)&name##MediaFeature) String(StringImpl::createStatic((char*)str, strlen(str), StringHasher::computeHashAndMaskTop8Bits((LChar*)str, strlen(str))));
CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(INITIALIZE_GLOBAL)
#undef INITIALIZE_GLOBAL
}

Powered by Google App Engine
This is Rietveld 408576698