diff options
Diffstat (limited to 'chrome/browser/themes/browser_theme_pack.cc')
-rw-r--r-- | chrome/browser/themes/browser_theme_pack.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc index c0b0081..c636b94 100644 --- a/chrome/browser/themes/browser_theme_pack.cc +++ b/chrome/browser/themes/browser_theme_pack.cc @@ -8,6 +8,7 @@ #include "base/data_pack.h" #include "base/stl_util-inl.h" #include "base/string_util.h" +#include "base/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_thread.h" @@ -842,6 +843,10 @@ void BrowserThemePack::BuildSourceImagesArray(const FilePathMap& file_paths) { bool BrowserThemePack::LoadRawBitmapsTo( const FilePathMap& file_paths, ImageCache* raw_bitmaps) { + // Themes should be loaded on the file thread, not the UI thread. + // http://crbug.com/61838 + base::ThreadRestrictions::ScopedAllowIO allow_io; + for (FilePathMap::const_iterator it = file_paths.begin(); it != file_paths.end(); ++it) { scoped_refptr<RefCountedMemory> raw_data(ReadFileData(it->second)); |