sat...@chromium.org
unread,Oct 25, 2012, 3:50:40 AM10/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hash...@chromium.org, chromium...@chromium.org, nkostyl...@chromium.org, a...@chromium.org, rginda...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, stevenj...@chromium.org, davemoo...@chromium.org
Reviewers: hashimoto,
Description:
drive: Fix a DCHECK failure at shutdown after Drive is disabled
This happens as ShutdownOnUIThread(), which sets profile_ to NULL,
can be called before DispatchMountCompletedEvent() at shutdown.
BUG=157611
TEST=DCHECK failure disappers. See the bug for the repro steps
Please review this at
http://codereview.chromium.org/11269034/
SVN Base: svn://
svn.chromium.org/chrome/trunk/src
Affected files:
M chrome/browser/chromeos/extensions/file_browser_event_router.cc
Index: chrome/browser/chromeos/extensions/file_browser_event_router.cc
diff --git
a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index
715ad8aa4c9afec8abba5c2232d05ffb1b47faa7..61bfd77776a57ac6ed2912a0d2231f30ef6295a1
100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -558,7 +558,12 @@ void
FileBrowserEventRouter::DispatchMountCompletedEvent(
DiskMountManager::MountEvent event,
chromeos::MountError error_code,
const DiskMountManager::MountPointInfo& mount_info) {
- if (!profile_ || mount_info.mount_type == chromeos::MOUNT_TYPE_INVALID) {
+ // profile_ is NULL if ShutdownOnUIThread() is called earlier. This can
+ // happen at shutdown.
+ if (!profile_)
+ return;
+
+ if (mount_info.mount_type == chromeos::MOUNT_TYPE_INVALID) {
NOTREACHED();
return;
}