Title: [129191] trunk/Source/WebCore
- Revision
- 129191
- Author
- [email protected]
- Date
- 2012-09-20 21:44:21 -0700 (Thu, 20 Sep 2012)
Log Message
[Platform] There are memory leak in LocaleICU
https://bugs.webkit.org/show_bug.cgi?id=97289
Reviewed by Kent Tamura.
This patch adds udt_close() calls for medium time format and short
time format data used in LocaleICU class to avoid memory leak.
This memory leak is found by external tool Valgrind and reported in
Chromium bug repositry(http://crbug.com/151006) with stack trace of
call path of leaked memory.
This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
No new tests. External tool such as Valgrind will check this memory leak.
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::~LocaleICU): Added to call udt_close() for m_mediumTimeFormat
and m_shortTimeFormat which have UDateFormat objects.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129190 => 129191)
--- trunk/Source/WebCore/ChangeLog 2012-09-21 04:42:44 UTC (rev 129190)
+++ trunk/Source/WebCore/ChangeLog 2012-09-21 04:44:21 UTC (rev 129191)
@@ -1,3 +1,26 @@
+2012-09-20 Yoshifumi Inoue <[email protected]>
+
+ [Platform] There are memory leak in LocaleICU
+ https://bugs.webkit.org/show_bug.cgi?id=97289
+
+ Reviewed by Kent Tamura.
+
+ This patch adds udt_close() calls for medium time format and short
+ time format data used in LocaleICU class to avoid memory leak.
+
+ This memory leak is found by external tool Valgrind and reported in
+ Chromium bug repositry(http://crbug.com/151006) with stack trace of
+ call path of leaked memory.
+
+ This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
+ ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
+
+ No new tests. External tool such as Valgrind will check this memory leak.
+
+ * platform/text/LocaleICU.cpp:
+ (WebCore::LocaleICU::~LocaleICU): Added to call udt_close() for m_mediumTimeFormat
+ and m_shortTimeFormat which have UDateFormat objects.
+
2012-09-20 Kenichi Ishibashi <[email protected]>
Chromium mac cannot display AppleColorEmoji
Modified: trunk/Source/WebCore/platform/text/LocaleICU.cpp (129190 => 129191)
--- trunk/Source/WebCore/platform/text/LocaleICU.cpp 2012-09-21 04:42:44 UTC (rev 129190)
+++ trunk/Source/WebCore/platform/text/LocaleICU.cpp 2012-09-21 04:44:21 UTC (rev 129191)
@@ -68,6 +68,10 @@
{
unum_close(m_numberFormat);
udat_close(m_shortDateFormat);
+#if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
+ udat_close(m_mediumTimeFormat);
+ udat_close(m_shortTimeFormat);
+#endif
}
PassOwnPtr<LocaleICU> LocaleICU::create(const char* localeString)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes