summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:13:04 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:13:04 +0000
commite879b4cc82c94586d95035df86357291f88e1c33 (patch)
treec61f3330cc49312f86f6984ff50105a9f70602c0
parentd2effadd83accd3df875694437ca766bb20cb6e1 (diff)
downloadchromium_src-e879b4cc82c94586d95035df86357291f88e1c33.zip
chromium_src-e879b4cc82c94586d95035df86357291f88e1c33.tar.gz
chromium_src-e879b4cc82c94586d95035df86357291f88e1c33.tar.bz2
Fix a chrome browser crash which occurs when displaying the page info bubble in a ChromeFrame page.
The crash occurs while dereferencing a NULL NonClientView member in the widget code. This member is only instantiated if the widget is of type InitParams::TYPE_WINDOW. ChromeFrame always instantiates as a popup window and hence this member is always NULL. Fix is to add a NULL check at the relevant places in the widget code. Fixes bug http://code.google.com/p/chromium/issues/detail?id=88960 BUG=88960 Review URL: http://codereview.chromium.org/7301028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92071 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/widget/widget.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index 51bafb0..0166339 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -446,7 +446,8 @@ bool Widget::IsActive() const {
void Widget::DisableInactiveRendering() {
disable_inactive_rendering_ = true;
- non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
+ if (non_client_view_)
+ non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
}
void Widget::SetAlwaysOnTop(bool on_top) {
@@ -598,7 +599,8 @@ void Widget::UpdateWindowTitle() {
}
void Widget::UpdateWindowIcon() {
- non_client_view_->UpdateWindowIcon();
+ if (non_client_view_)
+ non_client_view_->UpdateWindowIcon();
native_widget_->SetWindowIcons(widget_delegate_->GetWindowIcon(),
widget_delegate_->GetWindowAppIcon());
}
@@ -727,7 +729,8 @@ bool Widget::IsInactiveRenderingDisabled() const {
void Widget::EnableInactiveRendering() {
disable_inactive_rendering_ = false;
- non_client_view_->DisableInactiveRendering(false);
+ if (non_client_view_)
+ non_client_view_->DisableInactiveRendering(false);
}
void Widget::OnNativeWidgetActivationChanged(bool active) {
@@ -815,7 +818,8 @@ void Widget::OnNativeWidgetPaint(gfx::Canvas* canvas) {
}
int Widget::GetNonClientComponent(const gfx::Point& point) {
- return non_client_view_->NonClientHitTest(point);
+ return non_client_view_ ? non_client_view_->NonClientHitTest(point)
+ : HTNOWHERE;
}
bool Widget::OnKeyEvent(const KeyEvent& event) {