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