Index: Source/modules/screen_orientation/ScreenOrientationController.cpp |
diff --git a/Source/modules/screen_orientation/ScreenOrientationController.cpp b/Source/modules/screen_orientation/ScreenOrientationController.cpp |
index 49c11dbfd772bd9372822351f4e24b10ff415d60..c3f9974088792d15d72323d61227ca46cf994e01 100644 |
--- a/Source/modules/screen_orientation/ScreenOrientationController.cpp |
+++ b/Source/modules/screen_orientation/ScreenOrientationController.cpp |
@@ -18,14 +18,14 @@ ScreenOrientationController::~ScreenOrientationController() |
ScreenOrientationDispatcher::instance().removeController(this); |
} |
-ScreenOrientationController* ScreenOrientationController::from(Document* document) |
+ScreenOrientationController& ScreenOrientationController::from(Document& document) |
{ |
ScreenOrientationController* controller = static_cast<ScreenOrientationController*>(DocumentSupplement::from(document, supplementName())); |
if (!controller) { |
- controller = new ScreenOrientationController(*document); |
+ controller = new ScreenOrientationController(document); |
DocumentSupplement::provideTo(document, supplementName(), adoptPtr(controller)); |
} |
- return controller; |
+ return *controller; |
} |
ScreenOrientationController::ScreenOrientationController(Document& document) |