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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp

Issue 2384273004: [Sensors] 'onerror' event implementation (Closed)
Patch Set: updated global-interface-listing-expected.txt Created 4 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: third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp
index 64637d643efda4b42f867dc465787d4795d4f326..2a39eb4eaace72e103168e476896a73626480d0f 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp
@@ -11,23 +11,24 @@ namespace blink {
SensorErrorEvent::~SensorErrorEvent() {}
-SensorErrorEvent::SensorErrorEvent(const AtomicString& eventType)
- : Event(eventType,
- true,
- false) // let default be bubbles but is not cancelable.
-{}
+SensorErrorEvent::SensorErrorEvent(const AtomicString& eventType,
+ DOMException* error)
+ : Event(eventType, false, false) // does not bubble, is not cancelable.
+ ,
+ m_error(error) {
+ DCHECK(m_error);
+}
SensorErrorEvent::SensorErrorEvent(const AtomicString& eventType,
const SensorErrorEventInit& initializer)
- : Event(eventType, initializer) {
- setCanBubble(true);
-}
+ : Event(eventType, initializer) {}
const AtomicString& SensorErrorEvent::interfaceName() const {
return EventNames::SensorErrorEvent;
}
DEFINE_TRACE(SensorErrorEvent) {
+ visitor->trace(m_error);
Event::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698