summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:20:36 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:20:36 +0000
commit2fff7509b69da4da6c794233caba79fac385e404 (patch)
tree781b00899ab1c95f4a48e5225210fba7074252b6 /views
parent4ad2087c2b3fb35d83fa3ea3c11fa0941cf9fd05 (diff)
downloadchromium_src-2fff7509b69da4da6c794233caba79fac385e404.zip
chromium_src-2fff7509b69da4da6c794233caba79fac385e404.tar.gz
chromium_src-2fff7509b69da4da6c794233caba79fac385e404.tar.bz2
Revert 92071 - 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 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/7258008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index 0166339..51bafb0 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -446,8 +446,7 @@ bool Widget::IsActive() const {
void Widget::DisableInactiveRendering() {
disable_inactive_rendering_ = true;
- if (non_client_view_)
- non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
+ non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
}
void Widget::SetAlwaysOnTop(bool on_top) {
@@ -599,8 +598,7 @@ void Widget::UpdateWindowTitle() {
}
void Widget::UpdateWindowIcon() {
- if (non_client_view_)
- non_client_view_->UpdateWindowIcon();
+ non_client_view_->UpdateWindowIcon();
native_widget_->SetWindowIcons(widget_delegate_->GetWindowIcon(),
widget_delegate_->GetWindowAppIcon());
}
@@ -729,8 +727,7 @@ bool Widget::IsInactiveRenderingDisabled() const {
void Widget::EnableInactiveRendering() {
disable_inactive_rendering_ = false;
- if (non_client_view_)
- non_client_view_->DisableInactiveRendering(false);
+ non_client_view_->DisableInactiveRendering(false);
}
void Widget::OnNativeWidgetActivationChanged(bool active) {
@@ -818,8 +815,7 @@ void Widget::OnNativeWidgetPaint(gfx::Canvas* canvas) {
}
int Widget::GetNonClientComponent(const gfx::Point& point) {
- return non_client_view_ ? non_client_view_->NonClientHitTest(point)
- : HTNOWHERE;
+ return non_client_view_->NonClientHitTest(point);
}
bool Widget::OnKeyEvent(const KeyEvent& event) {