Index: Source/modules/gamepad/NavigatorGamepad.cpp |
diff --git a/Source/modules/gamepad/NavigatorGamepad.cpp b/Source/modules/gamepad/NavigatorGamepad.cpp |
index 5370c2236797a2e333c102700d6851cda3b7bcd8..81f0e7708bb018e28ae8fd780f637511e1efba5d 100644 |
--- a/Source/modules/gamepad/NavigatorGamepad.cpp |
+++ b/Source/modules/gamepad/NavigatorGamepad.cpp |
@@ -70,19 +70,19 @@ const char* NavigatorGamepad::supplementName() |
return "NavigatorGamepad"; |
} |
-NavigatorGamepad* NavigatorGamepad::from(Navigator* navigator) |
+NavigatorGamepad& NavigatorGamepad::from(Navigator& navigator) |
{ |
NavigatorGamepad* supplement = static_cast<NavigatorGamepad*>(Supplement<Navigator>::from(navigator, supplementName())); |
if (!supplement) { |
supplement = new NavigatorGamepad(); |
provideTo(navigator, supplementName(), adoptPtr(supplement)); |
} |
- return supplement; |
+ return *supplement; |
} |
-GamepadList* NavigatorGamepad::webkitGetGamepads(Navigator* navigator) |
+GamepadList* NavigatorGamepad::webkitGetGamepads(Navigator& navigator) |
{ |
- return NavigatorGamepad::from(navigator)->gamepads(); |
+ return NavigatorGamepad::from(navigator).gamepads(); |
} |
GamepadList* NavigatorGamepad::gamepads() |