Title: [144656] trunk/Source/WebCore
- Revision
- 144656
- Author
- [email protected]
- Date
- 2013-03-04 12:06:55 -0800 (Mon, 04 Mar 2013)
Log Message
Use initialization from literal for MediaFeatureNames
https://bugs.webkit.org/show_bug.cgi?id=111283
Reviewed by Andreas Kling.
* css/MediaFeatureNames.cpp:
(WebCore::MediaFeatureNames::init):
Initialization from literal is faster and use less memory. The names are
defined statically in MediaFeatureNames.h.
Also use the NotNull placement new to avoid a branch on silly allocators.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144655 => 144656)
--- trunk/Source/WebCore/ChangeLog 2013-03-04 19:45:56 UTC (rev 144655)
+++ trunk/Source/WebCore/ChangeLog 2013-03-04 20:06:55 UTC (rev 144656)
@@ -1,3 +1,17 @@
+2013-03-04 Benjamin Poulain <[email protected]>
+
+ Use initialization from literal for MediaFeatureNames
+ https://bugs.webkit.org/show_bug.cgi?id=111283
+
+ Reviewed by Andreas Kling.
+
+ * css/MediaFeatureNames.cpp:
+ (WebCore::MediaFeatureNames::init):
+ Initialization from literal is faster and use less memory. The names are
+ defined statically in MediaFeatureNames.h.
+
+ Also use the NotNull placement new to avoid a branch on silly allocators.
+
2013-03-04 Joshua Bell <[email protected]>
[V8] Unreviewed. Rebaselined run-bindings-tests following r144617
Modified: trunk/Source/WebCore/css/MediaFeatureNames.cpp (144655 => 144656)
--- trunk/Source/WebCore/css/MediaFeatureNames.cpp 2013-03-04 19:45:56 UTC (rev 144655)
+++ trunk/Source/WebCore/css/MediaFeatureNames.cpp 2013-03-04 20:06:55 UTC (rev 144656)
@@ -42,9 +42,9 @@
// Use placement new to initialize the globals.
AtomicString::init();
- #define INITIALIZE_GLOBAL(name, str) new ((void*)&name##MediaFeature) AtomicString(str);
+#define INITIALIZE_GLOBAL(name, str) new (NotNull, (void*)&name##MediaFeature) AtomicString(str, AtomicString::ConstructFromLiteral);
CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(INITIALIZE_GLOBAL)
- #undef INITIALIZE_GLOBAL
+#undef INITIALIZE_GLOBAL
initialized = true;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes