Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: Source/modules/device_light/DeviceLightDispatcher.cpp

Issue 619383002: Move PlatformEventDispatcher implementations to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix non-Oilpan allocation of DeviceLightDispatcher singleton Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « Source/modules/device_light/DeviceLightDispatcher.h ('k') | Source/modules/device_orientation/DeviceMotionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698