Index: Source/modules/device_light/DeviceLightDispatcher.cpp |
diff --git a/Source/modules/device_light/DeviceLightDispatcher.cpp b/Source/modules/device_light/DeviceLightDispatcher.cpp |
index d56a0a03d95d705c0a6e799d277596521f511f88..51dc7590d460bda40cd0abe506c5022e4f4dc8a6 100644 |
--- a/Source/modules/device_light/DeviceLightDispatcher.cpp |
+++ b/Source/modules/device_light/DeviceLightDispatcher.cpp |
@@ -12,8 +12,8 @@ namespace blink { |
DeviceLightDispatcher& DeviceLightDispatcher::instance() |
{ |
- DEFINE_STATIC_LOCAL(DeviceLightDispatcher, deviceLightDispatcher, ()); |
- return deviceLightDispatcher; |
+ DEFINE_STATIC_LOCAL(Persistent<DeviceLightDispatcher>, deviceLightDispatcher, (new DeviceLightDispatcher())); |
+ return *deviceLightDispatcher; |
} |
DeviceLightDispatcher::DeviceLightDispatcher() |
@@ -25,6 +25,11 @@ DeviceLightDispatcher::~DeviceLightDispatcher() |
{ |
} |
+void DeviceLightDispatcher::trace(Visitor* visitor) |
+{ |
+ PlatformEventDispatcher::trace(visitor); |
+} |
+ |
void DeviceLightDispatcher::startListening() |
{ |
Platform::current()->startListening(WebPlatformEventDeviceLight, this); |