summaryrefslogtreecommitdiffstats
path: root/ui/base/resource
diff options
context:
space:
mode:
authorscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 20:50:38 +0000
committerscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 20:50:38 +0000
commite8895feb92c9849a328652ff4465510f53eee6ea (patch)
tree157a814941cbef16a09d68329204db9992f90be7 /ui/base/resource
parent2d3d1d19828e0ad8ef5218a2cd7967079e13a1c8 (diff)
downloadchromium_src-e8895feb92c9849a328652ff4465510f53eee6ea.zip
chromium_src-e8895feb92c9849a328652ff4465510f53eee6ea.tar.gz
chromium_src-e8895feb92c9849a328652ff4465510f53eee6ea.tar.bz2
More logging for ASAN crash related to threading.
Added thread info to find out what the threads are. R=tony@chromium.org BUG=95425, 132752 TEST=browser_tests --gtest_filter=WebUIBidiCheckerBrowserTestRTL.*TestSettingsFrameStartup Review URL: https://chromiumcodereview.appspot.com/10553021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource')
-rw-r--r--ui/base/resource/resource_bundle.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 5fdf239..a48866c 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -16,6 +16,7 @@
#include "base/stl_util.h"
#include "base/string_piece.h"
#include "base/synchronization/lock.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "build/build_config.h"
#include "skia/ext/image_operations.h"
@@ -85,6 +86,7 @@ void Create2xResourceIfMissing(gfx::ImageSkia image, int idr) {
ResourceBundle* ResourceBundle::g_shared_instance_ = NULL;
static bool g_locale_initialized_ = false;
static bool g_locale_reloading_ = false;
+static base::PlatformThreadId g_locale_reload_thread_id_ = 0;
// static
std::string ResourceBundle::InitSharedInstanceWithLocale(
@@ -255,6 +257,8 @@ std::string ResourceBundle::ReloadLocaleResources(
const std::string& pref_locale) {
base::AutoLock lock_scope(*locale_resources_data_lock_);
AutoReset<bool> reset_reloading(&g_locale_reloading_, true);
+ AutoReset<base::PlatformThreadId> reset_reloading_thread(
+ &g_locale_reload_thread_id_, base::PlatformThread::CurrentId());
UnloadLocaleResources();
return LoadLocaleResources(pref_locale);
}
@@ -354,7 +358,9 @@ base::StringPiece ResourceBundle::GetRawDataResource(
if (!locale_resources_data_.get()) {
LOG(ERROR)
<< "!locale_resources_data_.get()), init=" << g_locale_initialized_
- << ", reloading=" << g_locale_reloading_;
+ << ", reloading=" << g_locale_reloading_
+ << ", reload_thread=" << g_locale_reload_thread_id_
+ << ", current thread=" << base::PlatformThread::CurrentId();
NOTREACHED();
}