summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 17:45:44 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 17:45:44 +0000
commit974558f07cd465431b85f53ef01cb17f6fe83fda (patch)
tree3972493be3326d5e1d6462c666031d2942cc196e /chrome/browser/browser_theme_provider.cc
parent316726d913eb5e48426bd8dd6cb9c7f942556423 (diff)
downloadchromium_src-974558f07cd465431b85f53ef01cb17f6fe83fda.zip
chromium_src-974558f07cd465431b85f53ef01cb17f6fe83fda.tar.gz
chromium_src-974558f07cd465431b85f53ef01cb17f6fe83fda.tar.bz2
More debugging statements to try to track down BrowserThemePack crash.
BUG=31719 TEST=none Review URL: http://codereview.chromium.org/552174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r--chrome/browser/browser_theme_provider.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index 20f5826..45dff50 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -38,6 +38,12 @@
#include "app/win_util.h"
#endif
+// No optimizations under windows until we know what's up with the crashing.
+#if defined(OS_WIN)
+#pragma optimize("", off)
+#pragma warning(disable:4748)
+#endif
+
// Strings used in alignment properties.
const char* BrowserThemeProvider::kAlignmentTop = "top";
const char* BrowserThemeProvider::kAlignmentBottom = "bottom";
@@ -558,17 +564,29 @@ void BrowserThemeProvider::SaveThemeID(const std::string& id) {
void BrowserThemeProvider::MigrateTheme(Extension* extension,
const std::string& name) {
+ FilePath::CharType full_name_on_stack[512 + 1];
+
+ // Copy names's backing string onto the stack because that's what get's
+ // stored in minidumps. :(
+ size_t i = 0;
+ for (i = 0; i < 512 && i < name.size(); ++i) {
+ full_name_on_stack[i] = name[i];
+ }
+ full_name_on_stack[i] = '\0';
+
// TODO(erg): Remove this hack.
//
// This is a hack to force the name of the theme into the stack
// frame. Hopefully.
BuildFromExtension(extension, true);
UserMetrics::RecordAction("Themes.Migrated", profile_);
- LOG(ERROR) << "Migrating theme: " << name;
+ LOG(INFO) << "Migrating theme: " << full_name_on_stack;
}
void BrowserThemeProvider::BuildFromExtension(Extension* extension,
bool synchronously) {
+ CHECK(extension);
+
scoped_refptr<BrowserThemePack> pack =
BrowserThemePack::BuildFromExtension(extension);
if (!pack.get()) {
@@ -603,3 +621,9 @@ void BrowserThemeProvider::OnInfobarDestroyed() {
if (number_of_infobars_ == 0)
RemoveUnusedThemes();
}
+
+// No optimizations under windows until we know what's up with the crashing.
+#if defined(OS_WIN)
+#pragma warning(default:4748)
+#pragma optimize("", on)
+#endif