Index: base/mac/foundation_util.mm |
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm |
index 44b81d32e5d5b1226c1dfc91514b4db9776c146b..6778c983a72c4c79920d7a7a97744182f72fd243 100644 |
--- a/base/mac/foundation_util.mm |
+++ b/base/mac/foundation_util.mm |
@@ -238,10 +238,12 @@ CFTypeRef GetValueFromDictionary(CFDictionaryRef dict, |
return value; |
if (CFGetTypeID(value) != expected_type) { |
- std::string expected_type_name = base::SysCFStringRefToUTF8( |
+ ScopedCFTypeRef<CFStringRef> expected_type_name( |
CFCopyTypeIDDescription(expected_type)); |
+ std::string expected_type_utf8 = |
+ base::SysCFStringRefToUTF8(expected_type_name); |
DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key, |
- expected_type_name, |
+ expected_type_utf8, |
value); |
return NULL; |
} |