From cd2ec4bce32b559b5daa47de815a31fc6d469517 Mon Sep 17 00:00:00 2001 From: "lipalani@chromium.org" Date: Thu, 6 Jan 2011 00:09:36 +0000 Subject: Fixing the crash in about:sync code. This was caused by a race condition. BUG=65370 TEST= Review URL: http://codereview.chromium.org/6074006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70561 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sync/sync_ui_util.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/browser/sync/sync_ui_util.cc') diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc index 27fdb9a..43a97d0 100644 --- a/chrome/browser/sync/sync_ui_util.cc +++ b/chrome/browser/sync/sync_ui_util.cc @@ -322,6 +322,12 @@ void ConstructAboutInformation(ProfileSyncService* service, std::string location_str; loc.Write(true, true, &location_str); strings->SetString("unrecoverable_error_location", location_str); + } else if (!service->sync_initialized()) { + strings->SetString("summary", "Sync not yet initialized"); + } else if (service->backend() == NULL) { + strings->SetString("summary", + "Unrecoverable error detected. Backend is null when it shouldnt be"); + NOTREACHED(); } else { browser_sync::ModelSafeRoutingInfo routes; service->backend()->GetModelSafeRoutingInfo(&routes); -- cgit v1.1