| Index: Source/core/frame/DeviceSensorEventDispatcher.cpp
|
| diff --git a/Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp b/Source/core/frame/DeviceSensorEventDispatcher.cpp
|
| similarity index 92%
|
| rename from Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp
|
| rename to Source/core/frame/DeviceSensorEventDispatcher.cpp
|
| index b5cd6ffaf0e3d161b4249679df4d94179d4d84a7..a992f0aa2e5246d1cce865668bee49ce393a8975 100644
|
| --- a/Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp
|
| +++ b/Source/core/frame/DeviceSensorEventDispatcher.cpp
|
| @@ -29,7 +29,7 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "modules/device_orientation/DeviceSensorEventDispatcher.h"
|
| +#include "core/frame/DeviceSensorEventDispatcher.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -57,9 +57,10 @@ void DeviceSensorEventDispatcher::removeController(DeviceSensorEventController*
|
| // Do not actually remove the controller from the vector, instead zero them out.
|
| // The zeros are removed in these two cases:
|
| // 1. either immediately if we are not dispatching any events,
|
| - // 2. or after didChangeDeviceMotion/Orientation has dispatched all events.
|
| + // 2. or after events to all controllers have dispatched
|
| + // (see e.g. DeviceOrientationDispatcher::didChangeDeviceOrientation).
|
| // This is to correctly handle the re-entrancy case when a controller is destroyed
|
| - // while in the didChangeDeviceMotion/Orientation method.
|
| + // while the events are still being dispatched.
|
| size_t index = m_controllers.find(controller);
|
| if (index == kNotFound)
|
| return;
|
|
|