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

Unified Diff: Source/modules/indexeddb/IDBVersionChangeEvent.cpp

Issue 386883008: Converted IDBVersionChangeEvent.dataLoss to an enumeration: IDBDataLossAmount (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Bindings no longer know about IDB enumeration Created 6 years, 5 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: 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);
}
« no previous file with comments | « Source/modules/indexeddb/IDBVersionChangeEvent.h ('k') | Source/modules/indexeddb/IDBVersionChangeEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698