summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 01:36:57 +0000
committerchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 01:36:57 +0000
commitca27645dbac0a03383f052dac8ecc3271668e1d0 (patch)
treef93730b826f1ca7f242730afae0af1da4d9ae6bd
parentf857514464ef7ba2fd432b356cb02d1072009d2c (diff)
downloadchromium_src-ca27645dbac0a03383f052dac8ecc3271668e1d0.zip
chromium_src-ca27645dbac0a03383f052dac8ecc3271668e1d0.tar.gz
chromium_src-ca27645dbac0a03383f052dac8ecc3271668e1d0.tar.bz2
Merge 84185 - Fix crash on chrome os exit due to ordering of AtExit callbacks.
BUG=chromium-os:14770 TEST=manually test to make sure it doesn't crash. Review URL: http://codereview.chromium.org/6928022 TBR=chocobo@chromium.org Review URL: http://codereview.chromium.org/6933025 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@84187 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/common/notification_registrar.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/common/notification_registrar.cc b/content/common/notification_registrar.cc
index 3978421..0d3308c 100644
--- a/content/common/notification_registrar.cc
+++ b/content/common/notification_registrar.cc
@@ -38,6 +38,12 @@ bool NotificationRegistrar::Record::operator==(const Record& other) const {
}
NotificationRegistrar::NotificationRegistrar() {
+ // Force the NotificationService to be constructed (if it isn't already).
+ // This ensures the NotificationService will be registered on the
+ // AtExitManager before any objects which access it via NotificationRegistrar.
+ // This in turn means it will be destroyed after these objects, so they will
+ // never try to access the NotificationService after it's been destroyed.
+ NotificationService::current();
}
NotificationRegistrar::~NotificationRegistrar() {