Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1334)

Unified Diff: chrome/browser/importer/importer_bridge.cc

Issue 2715006: Fix import crash in Mac 10.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/importer/importer_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/browser/importer/importer_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698