Changeset 129191 in webkit


Ignore:
Timestamp:
Sep 20, 2012 9:44:21 PM (12 years ago)
Author:
yosin@chromium.org
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r129190 r129191  
     12012-09-20  Yoshifumi Inoue  <yosin@chromium.org>
     2
     3        [Platform] There are memory leak in LocaleICU
     4        https://bugs.webkit.org/show_bug.cgi?id=97289
     5
     6        Reviewed by Kent Tamura.
     7
     8        This patch adds udt_close() calls for medium time format and short
     9        time format data used in LocaleICU class to avoid memory leak.
     10
     11        This memory leak is found by external tool Valgrind and reported in
     12        Chromium bug repositry(http://crbug.com/151006) with stack trace of
     13        call path of leaked memory.
     14
     15        This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
     16        ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
     17
     18        No new tests. External tool such as Valgrind will check this memory leak.
     19
     20        * platform/text/LocaleICU.cpp:
     21        (WebCore::LocaleICU::~LocaleICU): Added to call udt_close() for m_mediumTimeFormat
     22        and m_shortTimeFormat which have UDateFormat objects.
     23
    1242012-09-20  Kenichi Ishibashi  <bashi@chromium.org>
    225
  • trunk/Source/WebCore/platform/text/LocaleICU.cpp

    r128584 r129191  
    6969    unum_close(m_numberFormat);
    7070    udat_close(m_shortDateFormat);
     71#if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
     72    udat_close(m_mediumTimeFormat);
     73    udat_close(m_shortTimeFormat);
     74#endif
    7175}
    7276
Note: See TracChangeset for help on using the changeset viewer.