Index: chrome/browser/importer/importer_bridge.cc |
=================================================================== |
--- chrome/browser/importer/importer_bridge.cc (revision 49216) |
+++ chrome/browser/importer/importer_bridge.cc (working copy) |
@@ -113,8 +113,11 @@ |
ExternalProcessImporterBridge::ExternalProcessImporterBridge( |
ProfileImportThread* profile_import_thread, |
const DictionaryValue& localized_strings) |
- : profile_import_thread_(profile_import_thread), |
- localized_strings_(localized_strings) { |
+ : profile_import_thread_(profile_import_thread) { |
+ // Bridge needs to make its own copy because OS 10.6 autoreleases the |
+ // localized_strings value that is passed in (see http://crbug.com/46003 ). |
+ localized_strings_.reset( |
+ static_cast<DictionaryValue*>(localized_strings.DeepCopy())); |
} |
void ExternalProcessImporterBridge::AddBookmarkEntries( |
@@ -181,7 +184,7 @@ |
std::wstring ExternalProcessImporterBridge::GetLocalizedString( |
int message_id) { |
std::wstring message; |
- localized_strings_.GetString(IntToWString(message_id), &message); |
+ localized_strings_->GetString(IntToWString(message_id), &message); |
return message; |
} |