Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / device_orientation / DeviceOrientationDispatcher.cpp
index 9b24851..07ddc56 100644 (file)
@@ -39,8 +39,8 @@ namespace blink {
 
 DeviceOrientationDispatcher& DeviceOrientationDispatcher::instance()
 {
-    DEFINE_STATIC_LOCAL(DeviceOrientationDispatcher, deviceOrientationDispatcher, ());
-    return deviceOrientationDispatcher;
+    DEFINE_STATIC_LOCAL(Persistent<DeviceOrientationDispatcher>, deviceOrientationDispatcher, (new DeviceOrientationDispatcher()));
+    return *deviceOrientationDispatcher;
 }
 
 DeviceOrientationDispatcher::DeviceOrientationDispatcher()
@@ -51,6 +51,12 @@ DeviceOrientationDispatcher::~DeviceOrientationDispatcher()
 {
 }
 
+void DeviceOrientationDispatcher::trace(Visitor* visitor)
+{
+    visitor->trace(m_lastDeviceOrientationData);
+    PlatformEventDispatcher::trace(visitor);
+}
+
 void DeviceOrientationDispatcher::startListening()
 {
     Platform::current()->startListening(WebPlatformEventDeviceOrientation, this);