summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-12 20:38:41 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-12 20:38:41 +0000
commitab8089b5a8442d10b85fd12b40b8771c86c81b8d (patch)
tree8bca61bea733d5b55d4bba88db02dd96f2f742ed /chrome/browser/browser_theme_provider.h
parent69bb5870fb38eb83ce767ed9b2434827a08f100d (diff)
downloadchromium_src-ab8089b5a8442d10b85fd12b40b8771c86c81b8d.zip
chromium_src-ab8089b5a8442d10b85fd12b40b8771c86c81b8d.tar.gz
chromium_src-ab8089b5a8442d10b85fd12b40b8771c86c81b8d.tar.bz2
Speculative fix for the windows theme crasher.
I have no good ideas about this, so I'm moving the theme building to the UI thread to remove the possibility of clobbering the memory of the Task*. If THAT doesn't work, I've tried to get the theme name into the stack trace and therefore the minidumps. BUG=31719 TEST=none Review URL: http://codereview.chromium.org/536024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.h')
-rw-r--r--chrome/browser/browser_theme_provider.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h
index 1474c24..70f9d57 100644
--- a/chrome/browser/browser_theme_provider.h
+++ b/chrome/browser/browser_theme_provider.h
@@ -197,9 +197,20 @@ class BrowserThemeProvider : public NonThreadSafe,
// Save the id of the last theme installed.
void SaveThemeID(const std::string& id);
+ // A temporary hack to force |name| onto the stack to see if a
+ // certain theme is causing all these crashes in case my speculative
+ // fix doesn't do it.
+ void MigrateTheme(Extension* extension, const std::string& name);
+
// Implementation of SetTheme() (and the fallback from LoadThemePrefs() in
- // case we don't have a theme pack).
- void BuildFromExtension(Extension* extension);
+ // case we don't have a theme pack). We specify |synchronously| because of
+ // a potential data race. BuildFromExtension() is called during startup and
+ // will be called before we have a message loop instantiated on the main
+ // UI thread. Therefore, we can't post tasks FROM the UI thread. We'll work
+ // synchronously during theme upgrades and missing theme paks, and will shunt
+ // encoding and disk writing work onto the other thread when we can't post
+ // tasks.
+ void BuildFromExtension(Extension* extension, bool synchronously);
// Remove preference values for themes that are no longer in use.
void RemoveUnusedThemes();