| Index: chrome/browser/prefs/pref_notifier_impl.cc
|
| diff --git a/chrome/browser/prefs/pref_notifier_impl.cc b/chrome/browser/prefs/pref_notifier_impl.cc
|
| index 2dd454f948092ed223eeaf2916302ae64ff8a561..bf44dede42aad2191f0b2ab0cb534e24c08d7ba3 100644
|
| --- a/chrome/browser/prefs/pref_notifier_impl.cc
|
| +++ b/chrome/browser/prefs/pref_notifier_impl.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/prefs/pref_notifier_impl.h"
|
|
|
| +#include "base/debug/stack_trace.h"
|
| #include "base/stl_util.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| @@ -17,11 +18,16 @@ PrefNotifierImpl::PrefNotifierImpl(PrefService* service)
|
| PrefNotifierImpl::~PrefNotifierImpl() {
|
| DCHECK(CalledOnValidThread());
|
|
|
| + bool already_printed_stacktrace = false;
|
| // Verify that there are no pref observers when we shut down.
|
| for (PrefObserverMap::iterator it = pref_observers_.begin();
|
| it != pref_observers_.end(); ++it) {
|
| NotificationObserverList::Iterator obs_iterator(*(it->second));
|
| if (obs_iterator.GetNext()) {
|
| + if (!already_printed_stacktrace) {
|
| + already_printed_stacktrace = true;
|
| + base::debug::StackTrace().PrintBacktrace();
|
| + }
|
| LOG(WARNING) << "pref observer found at shutdown " << it->first;
|
| }
|
| }
|
|
|