Index: Source/modules/device_orientation/DeviceMotionController.cpp |
diff --git a/Source/modules/device_orientation/DeviceMotionController.cpp b/Source/modules/device_orientation/DeviceMotionController.cpp |
index 877fe372663d6bf364aec4779e3b23b7ee74a48e..9aec05c77e4127be9988516f2b230b3f4e1042e1 100644 |
--- a/Source/modules/device_orientation/DeviceMotionController.cpp |
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp |
@@ -37,9 +37,9 @@ |
namespace WebCore { |
-DeviceMotionController::DeviceMotionController(Document* document) |
+DeviceMotionController::DeviceMotionController(Document& document) |
: DeviceSensorEventController(document) |
- , DOMWindowLifecycleObserver(document->domWindow()) |
+ , DOMWindowLifecycleObserver(document.domWindow()) |
{ |
} |
@@ -58,14 +58,14 @@ const char* DeviceMotionController::supplementName() |
return "DeviceMotionController"; |
} |
-DeviceMotionController* DeviceMotionController::from(Document* document) |
+DeviceMotionController& DeviceMotionController::from(Document& document) |
{ |
DeviceMotionController* controller = static_cast<DeviceMotionController*>(DocumentSupplement::from(document, supplementName())); |
if (!controller) { |
controller = new DeviceMotionController(document); |
DocumentSupplement::provideTo(document, supplementName(), adoptPtr(controller)); |
} |
- return controller; |
+ return *controller; |
} |
bool DeviceMotionController::hasLastData() |