Title: [160262] trunk/Source/WebCore
- Revision
- 160262
- Author
- [email protected]
- Date
- 2013-12-06 16:57:59 -0800 (Fri, 06 Dec 2013)
Log Message
Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
Reviewed by Anders Carlsson.
* rendering/RenderText.cpp:
(WebCore::originalTextMap):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (160261 => 160262)
--- trunk/Source/WebCore/ChangeLog 2013-12-07 00:56:24 UTC (rev 160261)
+++ trunk/Source/WebCore/ChangeLog 2013-12-07 00:57:59 UTC (rev 160262)
@@ -1,3 +1,12 @@
+2013-12-06 Antti Koivisto <[email protected]>
+
+ Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
+
+ Reviewed by Anders Carlsson.
+
+ * rendering/RenderText.cpp:
+ (WebCore::originalTextMap):
+
2013-12-05 Jer Noble <[email protected]>
[MSE] Add a runtime-setting for the MediaSource constructor.
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (160261 => 160262)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2013-12-07 00:56:24 UTC (rev 160261)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2013-12-07 00:57:59 UTC (rev 160262)
@@ -44,6 +44,7 @@
#include "TextResourceDecoder.h"
#include "VisiblePosition.h"
#include "break_lines.h"
+#include <wtf/NeverDestroyed.h>
#include <wtf/text/StringBuffer.h>
#include <wtf/unicode/CharacterNames.h>
@@ -104,12 +105,9 @@
int m_lastTypedCharacterOffset;
};
-
-typedef HashMap<const RenderText*, String> OriginalTextMap;
-
-static OriginalTextMap& originalTextMap()
+static HashMap<const RenderText*, String>& originalTextMap()
{
- DEFINE_STATIC_LOCAL(OriginalTextMap, map, ());
+ static NeverDestroyed<HashMap<const RenderText*, String>> map;
return map;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes