Index: third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp |
diff --git a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp |
index 911ea9067ad1dc4d314f6560203f1d1a28ecf691..1a0ca9f71ad9acf216b0ecd2c3394b600da28ddc 100644 |
--- a/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp |
@@ -6,27 +6,18 @@ |
namespace blink { |
-SensorReadingEvent::~SensorReadingEvent() |
-{ |
-} |
- |
-SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType) |
- : Event(eventType, true, false) // let default be bubbles but is not cancelable. |
- , m_reading(SensorReading::create()) |
-{ |
-} |
+SensorReadingEvent::~SensorReadingEvent() = default; |
-SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, SensorReading& reading) |
- : Event(eventType, true, false) // let default be bubbles but is not cancelable. |
+SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, SensorReading* reading) |
+ : Event(eventType, false, false) // Does not bubble and is not cancelable. |
, m_reading(reading) |
{ |
+ DCHECK(m_reading); |
} |
SensorReadingEvent::SensorReadingEvent(const AtomicString& eventType, const SensorReadingEventInit& initializer) |
- : Event(eventType, initializer) |
- , m_reading(SensorReading::create()) |
+ : SensorReadingEvent(eventType, initializer.reading()) |
{ |
- setCanBubble(true); |
} |
const AtomicString& SensorReadingEvent::interfaceName() const |