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

Unified Diff: Source/modules/device_orientation/DeviceMotionDispatcher.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_orientation/DeviceMotionDispatcher.cpp
diff --git a/Source/modules/device_orientation/DeviceMotionDispatcher.cpp b/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
index b5c51b0a4ae9483f01b18e3e987a65893c535111..92a469b16f098a2e10cba55ae94bb6e905d8742b 100644
--- a/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
+++ b/Source/modules/device_orientation/DeviceMotionDispatcher.cpp
@@ -39,8 +39,8 @@ namespace blink {
DeviceMotionDispatcher& DeviceMotionDispatcher::instance()
{
- DEFINE_STATIC_LOCAL(DeviceMotionDispatcher, deviceMotionDispatcher, ());
- return deviceMotionDispatcher;
+ DEFINE_STATIC_LOCAL(Persistent<DeviceMotionDispatcher>, deviceMotionDispatcher, (new DeviceMotionDispatcher()));
+ return *deviceMotionDispatcher;
}
DeviceMotionDispatcher::DeviceMotionDispatcher()
@@ -51,6 +51,12 @@ DeviceMotionDispatcher::~DeviceMotionDispatcher()
{
}
+void DeviceMotionDispatcher::trace(Visitor* visitor)
+{
+ visitor->trace(m_lastDeviceMotionData);
+ PlatformEventDispatcher::trace(visitor);
+}
+
void DeviceMotionDispatcher::startListening()
{
Platform::current()->startListening(WebPlatformEventDeviceMotion, this);

Powered by Google App Engine
This is Rietveld 408576698