From e7f27c9f51fd960b72eda1afbfa36aee2d5a478f Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Tue, 15 Sep 2009 23:27:25 +0000 Subject: Print a stacktrace when we can't find a string resource (on Windows). This should help debug the linked bug, or at least rule out some possibilities. TEST=none BUG=21925 Review URL: http://codereview.chromium.org/196132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26297 0039d316-1c4b-4281-b951-d872f2087c98 --- app/resource_bundle_win.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc index 3526481..fc9e360 100644 --- a/app/resource_bundle_win.cc +++ b/app/resource_bundle_win.cc @@ -9,6 +9,7 @@ #include "app/app_paths.h" #include "app/gfx/font.h" #include "app/l10n_util.h" +#include "base/debug_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/path_service.h" @@ -133,6 +134,7 @@ string16 ResourceBundle::GetLocalizedString(int message_id) { // If for some reason we were unable to load a resource dll, return an empty // string (better than crashing). if (!locale_resources_data_) { + StackTrace().PrintBacktrace(); // See http://crbug.com/21925. LOG(WARNING) << "locale resources are not loaded"; return string16(); } @@ -149,6 +151,7 @@ string16 ResourceBundle::GetLocalizedString(int message_id) { image = AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(), message_id); if (!image) { + StackTrace().PrintBacktrace(); // See http://crbug.com/21925. NOTREACHED() << "unable to find resource: " << message_id; return std::wstring(); } -- cgit v1.1