Chromium Code Reviews| Index: Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
| diff --git a/Source/modules/indexeddb/IDBVersionChangeEvent.cpp b/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
| index e55fdfca2febe05a495a1d15b9a8b6c59ba666f5..a4ac5b06eba04b973f94f882c6fe34cbd898fb0b 100644 |
| --- a/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
| +++ b/Source/modules/indexeddb/IDBVersionChangeEvent.cpp |
| @@ -26,8 +26,6 @@ |
| #include "config.h" |
| #include "modules/indexeddb/IDBVersionChangeEvent.h" |
| -#include "bindings/modules/v8/IDBBindingUtilities.h" |
| - |
| namespace WebCore { |
| @@ -58,6 +56,12 @@ IDBVersionChangeEvent::IDBVersionChangeEvent(const AtomicString& eventType, cons |
| , m_newVersion(initializer.newVersion) |
| , m_dataLoss(blink::WebIDBDataLossNone) |
| { |
| + if (initializer.dataLoss.isEmpty() || initializer.dataLoss == "none") |
| + m_dataLoss = blink::WebIDBDataLossNone; |
| + else if (initializer.dataLoss == "total") |
| + m_dataLoss = blink::WebIDBDataLossTotal; |
| + else |
| + ASSERT_NOT_REACHED(); // Should have been validated by the bindings |
|
jsbell
2014/07/16 22:48:36
Is this actually enforced by the bindings now? (I
bashi
2014/07/17 01:47:57
IIUC, the bindings checks whether the value is val
cmumford
2014/07/17 17:14:24
Not checked - That's my follow-up change (crbug.co
|
| ScriptWrappable::init(this); |
| } |