Title: [105333] trunk/Source/WebCore
- Revision
- 105333
- Author
- eric.carl...@apple.com
- Date
- 2012-01-18 15:29:27 -0800 (Wed, 18 Jan 2012)
Log Message
Provide access to user's list of preferred languages
https://bugs.webkit.org/show_bug.cgi?id=76138
Reviewed by Timothy Hatcher.
No new tests, tested by fast/harness/user-preferred-language.html.
* platform/mac/Language.mm:
(WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by
CFLocaleCopyPreferredLanguages.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (105332 => 105333)
--- trunk/Source/WebCore/ChangeLog 2012-01-18 23:14:56 UTC (rev 105332)
+++ trunk/Source/WebCore/ChangeLog 2012-01-18 23:29:27 UTC (rev 105333)
@@ -1,3 +1,16 @@
+2012-01-18 Eric Carlson <eric.carl...@apple.com>
+
+ Provide access to user's list of preferred languages
+ https://bugs.webkit.org/show_bug.cgi?id=76138
+
+ Reviewed by Timothy Hatcher.
+
+ No new tests, tested by fast/harness/user-preferred-language.html.
+
+ * platform/mac/Language.mm:
+ (WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by
+ CFLocaleCopyPreferredLanguages.
+
2012-01-18 Joshua Bell <jsb...@chromium.org>
IndexedDB: Implement create-intermediate-objects semantics when injecting values via keyPaths
Modified: trunk/Source/WebCore/platform/mac/Language.mm (105332 => 105333)
--- trunk/Source/WebCore/platform/mac/Language.mm 2012-01-18 23:14:56 UTC (rev 105332)
+++ trunk/Source/WebCore/platform/mac/Language.mm 2012-01-18 23:29:27 UTC (rev 105333)
@@ -102,10 +102,8 @@
if (!languageCount)
userPreferredLanguages.append("en");
else {
- for (CFIndex i = 0; i < languageCount; i++) {
- RetainPtr<CFStringRef> language(AdoptCF, reinterpret_cast<CFStringRef>(CFArrayGetValueAtIndex(languages.get(), i)));
- userPreferredLanguages.append(createHTTPStyleLanguageCode((NSString *)language.get()));
- }
+ for (CFIndex i = 0; i < languageCount; i++)
+ userPreferredLanguages.append(createHTTPStyleLanguageCode((NSString *)CFArrayGetValueAtIndex(languages.get(), i)));
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes