Commit 1797f4a2 authored by sky@chromium.org's avatar sky@chromium.org

Fixes crash in Browser::Observe. We can end up here during creation of

the window, at which point window_ is NULL. This can happen because
SHAppBarMessage runs a nested message loop pumping events. I suspect
the right fix is to not invoke SHAppBarMessage, but that'll have to be
done separately.

BUG=94614
TEST=none
R=ben@chromium.org

Review URL: http://codereview.chromium.org/7792014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98839 0039d316-1c4b-4281-b951-d872f2087c98
parent fe8944fb
......@@ -3927,7 +3927,11 @@ void Browser::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
case chrome::NOTIFICATION_EXTENSION_LOADED:
if (window()->GetLocationBar())
// During window creation on Windows we may end up calling into
// SHAppBarMessage, which internally spawns a nested message loop. This
// makes it possible for us to end up here before window creation has
// completed,at which point window_ is NULL. See 94752 for details.
if (window() && window()->GetLocationBar())
window()->GetLocationBar()->UpdatePageActions();
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment