Index: Source/modules/gamepad/GamepadDispatcher.cpp |
diff --git a/Source/modules/gamepad/GamepadDispatcher.cpp b/Source/modules/gamepad/GamepadDispatcher.cpp |
index 8a626789dc6e6a536a468060245a8e9e6a4f311d..9be3ac58f326e6d73f77b284438187ecdaa3ea5e 100644 |
--- a/Source/modules/gamepad/GamepadDispatcher.cpp |
+++ b/Source/modules/gamepad/GamepadDispatcher.cpp |
@@ -13,8 +13,8 @@ namespace blink { |
GamepadDispatcher& GamepadDispatcher::instance() |
{ |
- DEFINE_STATIC_LOCAL(GamepadDispatcher, gamepadDispatcher, ()); |
- return gamepadDispatcher; |
+ DEFINE_STATIC_LOCAL(Persistent<GamepadDispatcher>, gamepadDispatcher, (new GamepadDispatcher())); |
+ return *gamepadDispatcher; |
} |
void GamepadDispatcher::sampleGamepads(WebGamepads& gamepads) |
@@ -30,6 +30,11 @@ GamepadDispatcher::~GamepadDispatcher() |
{ |
} |
+void GamepadDispatcher::trace(Visitor* visitor) |
+{ |
+ PlatformEventDispatcher::trace(visitor); |
+} |
+ |
void GamepadDispatcher::didConnectGamepad(unsigned index, const WebGamepad& gamepad) |
{ |
dispatchDidConnectOrDisconnectGamepad(index, gamepad, true); |