diff options
author | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-24 18:22:38 +0000 |
---|---|---|
committer | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-24 18:22:38 +0000 |
commit | b25ff738e784104874009abf79377b85adbb4d17 (patch) | |
tree | 11c8fecfe7a3b35ef9476e00e0eed46ee1abc144 /ui | |
parent | 146b3f199956ff7331637d4bc4fed6c390965757 (diff) | |
download | chromium_src-b25ff738e784104874009abf79377b85adbb4d17.zip chromium_src-b25ff738e784104874009abf79377b85adbb4d17.tar.gz chromium_src-b25ff738e784104874009abf79377b85adbb4d17.tar.bz2 |
ozone: evdev: Clean up NOTREACHED() usage
Events that aren't implemented should do NOTIMPLEMENTED rather than
NOTREACHED to avoid crashing.
Also, as NOTREACHED() is a DCHECK, it is not appropriate for syscall error
paths because we still need to check for errors in release builds. Use
LOG(FATAL) instead.
BUG=none
TEST=content_shell --ozone-platform=dri
Review URL: https://codereview.chromium.org/196173006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/events/ozone/evdev/touch_event_converter_evdev.cc | 8 | ||||
-rw-r--r-- | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc index 46eda1b..cb78cbe 100644 --- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc +++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc @@ -131,7 +131,7 @@ void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) { altered_slots_.set(current_slot_); break; default: - NOTREACHED() << "invalid code for EV_ABS: " << input.code; + NOTIMPLEMENTED() << "invalid code for EV_ABS: " << input.code; } } else if (input.type == EV_SYN) { switch (input.code) { @@ -163,7 +163,7 @@ void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) { case SYN_MT_REPORT: case SYN_CONFIG: case SYN_DROPPED: - NOTREACHED() << "invalid code for EV_SYN: " << input.code; + NOTIMPLEMENTED() << "invalid code for EV_SYN: " << input.code; break; } } else if (input.type == EV_KEY) { @@ -171,10 +171,10 @@ void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) { case BTN_TOUCH: break; default: - NOTREACHED() << "invalid code for EV_KEY: " << input.code; + NOTIMPLEMENTED() << "invalid code for EV_KEY: " << input.code; } } else { - NOTREACHED() << "invalid type: " << input.type; + NOTIMPLEMENTED() << "invalid type: " << input.type; } } } diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc index 5dbe82c..5fb8886 100644 --- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc +++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc @@ -79,7 +79,7 @@ MockTouchEventConverterEvdev::MockTouchEventConverterEvdev(int fd, int fds[2]; if (pipe(fds)) - NOTREACHED() << "failed pipe(): " << strerror(errno); + PLOG(FATAL) << "failed pipe"; DCHECK(SetNonBlocking(fds[0]) == 0) << "SetNonBlocking for pipe fd[0] failed, errno: " << errno; |