Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1701)

Unified Diff: Source/modules/device_orientation/DeviceMotionController.cpp

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/device_orientation/DeviceMotionController.cpp
diff --git a/Source/modules/device_orientation/DeviceMotionController.cpp b/Source/modules/device_orientation/DeviceMotionController.cpp
index 5f6fd4202ef4199296e79b002814090d46358ac0..189c17b710155c93c1238546a026959ee412594f 100644
--- a/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -91,8 +91,7 @@ void DeviceMotionController::unregisterWithDispatcher()
bool DeviceMotionController::isNullEvent(Event* event)
{
- ASSERT(event->type() == eventNames().devicemotionEvent);
- DeviceMotionEvent* motionEvent = static_cast<DeviceMotionEvent*>(event);
+ DeviceMotionEvent* motionEvent = toDeviceMotionEvent(event);
return !motionEvent->deviceMotionData()->canProvideEventData();
}

Powered by Google App Engine
This is Rietveld 408576698