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

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp

Issue 2135083003: Initialize gFunctionMap from CoreInitializer (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 | « third_party/WebKit/Source/core/css/MediaQueryEvaluator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
index e716d047454b635f3bab84147ce1bda2258d4900..007d8520fbf175e8ce87e258d4d2fbc0ba23ac14 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -657,7 +657,7 @@ static bool scanMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePr
return (value.id == CSSValueProgressive);
}
-static void createFunctionMap()
+void MediaQueryEvaluator::init()
{
// Create the table.
gFunctionMap = new FunctionMap;
@@ -672,8 +672,7 @@ bool MediaQueryEvaluator::eval(const MediaQueryExp* expr) const
if (!m_mediaValues || !m_mediaValues->hasValues())
return m_expectedResult;
- if (!gFunctionMap)
- createFunctionMap();
+ DCHECK(gFunctionMap);
// Call the media feature evaluation function. Assume no prefix and let
// trampoline functions override the prefix if prefix is used.
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryEvaluator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698