Index: Source/modules/device_orientation/DeviceSensorEventController.cpp |
diff --git a/Source/modules/device_orientation/DeviceSensorEventController.cpp b/Source/modules/device_orientation/DeviceSensorEventController.cpp |
index 19a205780fd2baba170596e3f88540a7f4d21237..fda95d867bf38b27b5384e0d07a374741882f077 100644 |
--- a/Source/modules/device_orientation/DeviceSensorEventController.cpp |
+++ b/Source/modules/device_orientation/DeviceSensorEventController.cpp |
@@ -33,8 +33,8 @@ |
namespace WebCore { |
-DeviceSensorEventController::DeviceSensorEventController(Document* document) |
- : PageLifecycleObserver(document->page()) |
+DeviceSensorEventController::DeviceSensorEventController(Document& document) |
+ : PageLifecycleObserver(document.page()) |
, m_hasEventListener(false) |
, m_document(document) |
, m_isActive(false) |
@@ -59,10 +59,10 @@ void DeviceSensorEventController::fireDeviceEvent(Timer<DeviceSensorEventControl |
void DeviceSensorEventController::dispatchDeviceEvent(PassRefPtr<Event> prpEvent) |
{ |
RefPtr<Event> event = prpEvent; |
- if (m_document && m_document->domWindow() |
- && !m_document->activeDOMObjectsAreSuspended() |
- && !m_document->activeDOMObjectsAreStopped()) |
- m_document->domWindow()->dispatchEvent(event); |
+ if (m_document.domWindow() |
+ && !m_document.activeDOMObjectsAreSuspended() |
+ && !m_document.activeDOMObjectsAreStopped()) |
+ m_document.domWindow()->dispatchEvent(event); |
if (m_needsCheckingNullEvents) { |
if (isNullEvent(event.get())) |