Index: Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
diff --git a/Source/modules/indexeddb/IDBVersionChangeEvent.cpp b/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
index 76528aa5d6f6f03216e97302aa872a14eacda4af..85e1a7058e28798d0fbfa4146a5aa24e44b412af 100644 |
--- a/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
+++ b/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
@@ -31,15 +31,16 @@ |
namespace WebCore { |
-PassRefPtr<IDBVersionChangeEvent> IDBVersionChangeEvent::create(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& eventType) |
+PassRefPtr<IDBVersionChangeEvent> IDBVersionChangeEvent::create(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& eventType, WebKit::WebIDBCallbacks::DataLoss dataLoss) |
{ |
- return adoptRef(new IDBVersionChangeEvent(oldVersion, newVersion, eventType)); |
+ return adoptRef(new IDBVersionChangeEvent(oldVersion, newVersion, eventType, dataLoss)); |
} |
-IDBVersionChangeEvent::IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& eventType) |
+IDBVersionChangeEvent::IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& eventType, WebKit::WebIDBCallbacks::DataLoss dataLoss) |
: Event(eventType, false /*canBubble*/, false /*cancelable*/) |
, m_oldVersion(oldVersion) |
, m_newVersion(newVersion) |
+ , m_dataLoss(dataLoss) |
{ |
ScriptWrappable::init(this); |
} |
@@ -48,6 +49,15 @@ IDBVersionChangeEvent::~IDBVersionChangeEvent() |
{ |
} |
+const AtomicString& IDBVersionChangeEvent::dataLoss() |
+{ |
+ DEFINE_STATIC_LOCAL(AtomicString, total, ("total", AtomicString::ConstructFromLiteral)); |
+ if (m_dataLoss == WebKit::WebIDBCallbacks::DataLossTotal) |
+ return total; |
+ DEFINE_STATIC_LOCAL(AtomicString, none, ("none", AtomicString::ConstructFromLiteral)); |
+ return none; |
+} |
+ |
const AtomicString& IDBVersionChangeEvent::interfaceName() const |
{ |
return eventNames().interfaceForIDBVersionChangeEvent; |