| Index: Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
|
| diff --git a/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp b/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
|
| index 9b24851d369621eb80763bedb61755bc1a58a621..07ddc56e075ee730358b9852ac1b0a95522c95da 100644
|
| --- a/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
|
| +++ b/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp
|
| @@ -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);
|
|
|