NSLocale leaks in LocaleMac
authorKeishi Hattori <keishi@webkit.org>
Tue, 30 Oct 2012 02:39:35 +0000 (02:39 +0000)
committerKeishi Hattori <keishi@webkit.org>
Tue, 30 Oct 2012 02:39:35 +0000 (02:39 +0000)
commitf608a48c5c3abd88784c9db428dfa28c0e3c3e7f
tree2ab99c07311a73266b2a2630bd49a6aafd02d8c4
parentfa92f3c50ec17b0635d74cefdd06946af2d69e63
NSLocale leaks in LocaleMac
https://bugs.webkit.org/show_bug.cgi?id=97628

Reviewed by Kent Tamura.

We need to adopt the NSLocale object so it doesn't leak and
determineLocale() should return a NSLocale without additional retain.

No new tests.

* platform/text/mac/LocaleMac.mm:
(WebCore::determineLocale): Returns a RetainPtr<NSLocale>.
(WebCore::Locale::create):
(WebCore::LocaleMac::LocaleMac): m_locale should adopt the NSLocale object.
(WebCore::LocaleMac::create): LocaleMac constructor takes NSLocale without additional retain.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/text/mac/LocaleMac.mm