DeviceOrientationDispatcher& DeviceOrientationDispatcher::instance()
{
- DEFINE_STATIC_LOCAL(DeviceOrientationDispatcher, deviceOrientationDispatcher, ());
- return deviceOrientationDispatcher;
+ DEFINE_STATIC_LOCAL(Persistent<DeviceOrientationDispatcher>, deviceOrientationDispatcher, (new DeviceOrientationDispatcher()));
+ return *deviceOrientationDispatcher;
}
DeviceOrientationDispatcher::DeviceOrientationDispatcher()
{
}
+void DeviceOrientationDispatcher::trace(Visitor* visitor)
+{
+ visitor->trace(m_lastDeviceOrientationData);
+ PlatformEventDispatcher::trace(visitor);
+}
+
void DeviceOrientationDispatcher::startListening()
{
Platform::current()->startListening(WebPlatformEventDeviceOrientation, this);