summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 00:59:40 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-03 00:59:40 +0000
commit051ec9c7288e9b20c959f71f8ce192c311552889 (patch)
treecdd519860b6d1a734d0953d8ebc476058cd9aa59 /views
parent6481f3aad679b03a67b27333ed6673caa2c20708 (diff)
downloadchromium_src-051ec9c7288e9b20c959f71f8ce192c311552889.zip
chromium_src-051ec9c7288e9b20c959f71f8ce192c311552889.tar.gz
chromium_src-051ec9c7288e9b20c959f71f8ce192c311552889.tar.bz2
A workaround for textfield crash in views_examples.
BUG=chromium-os:14810, chromium:81320 TEST=run views_examples. Review URL: http://codereview.chromium.org/6911020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/textfield/native_textfield_views.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index 1f4f0d8..cf3e14a 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -918,13 +918,15 @@ void NativeTextfieldViews::InitContextMenuIfRequired() {
}
void NativeTextfieldViews::OnTextInputTypeChanged() {
- DCHECK(textfield_->GetInputMethod());
- textfield_->GetInputMethod()->OnTextInputTypeChanged(textfield_);
+ // TODO(suzhe): changed from DCHECK. See http://crbug.com/81320.
+ if (textfield_->GetInputMethod())
+ textfield_->GetInputMethod()->OnTextInputTypeChanged(textfield_);
}
void NativeTextfieldViews::OnCaretBoundsChanged() {
- DCHECK(textfield_->GetInputMethod());
- textfield_->GetInputMethod()->OnCaretBoundsChanged(textfield_);
+ // TODO(suzhe): changed from DCHECK. See http://crbug.com/81320.
+ if (textfield_->GetInputMethod())
+ textfield_->GetInputMethod()->OnCaretBoundsChanged(textfield_);
}
void NativeTextfieldViews::OnBeforeUserAction() {