Title: [123267] trunk/Source
Revision
123267
Author
dgro...@chromium.org
Date
2012-07-20 14:56:04 -0700 (Fri, 20 Jul 2012)

Log Message

IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types
https://bugs.webkit.org/show_bug.cgi?id=91414

Reviewed by Adam Barth.

Source/WebCore:

No new tests because no new behavior.

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::metadata):
No behavior change, this just needs a dummy parameter to match the
modified API.

* Modules/indexeddb/IDBMetadata.h:
(WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
(IDBDatabaseMetadata):

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:
* src/WebIDBMetadata.cpp:
(WebKit::WebIDBMetadata::WebIDBMetadata):
(WebKit::WebIDBMetadata::operator IDBDatabaseMetadata):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (123266 => 123267)


--- trunk/Source/WebCore/ChangeLog	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebCore/ChangeLog	2012-07-20 21:56:04 UTC (rev 123267)
@@ -1,3 +1,21 @@
+2012-07-20  David Grogan  <dgro...@chromium.org>
+
+        IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types
+        https://bugs.webkit.org/show_bug.cgi?id=91414
+
+        Reviewed by Adam Barth.
+
+        No new tests because no new behavior.
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::metadata):
+        No behavior change, this just needs a dummy parameter to match the
+        modified API.
+
+        * Modules/indexeddb/IDBMetadata.h:
+        (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
+        (IDBDatabaseMetadata):
+
 2012-07-18  Gustavo Noronha Silva  <gustavo.noro...@collabora.com>
 
         [Soup] Unnecessary RefPtr usage and null check

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp (123266 => 123267)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-07-20 21:56:04 UTC (rev 123267)
@@ -136,7 +136,7 @@
 
 IDBDatabaseMetadata IDBDatabaseBackendImpl::metadata() const
 {
-    IDBDatabaseMetadata metadata(m_name, m_version);
+    IDBDatabaseMetadata metadata(m_name, m_version, IDBDatabaseMetadata::NoIntVersion);
     for (ObjectStoreMap::const_iterator it = m_objectStores.begin(); it != m_objectStores.end(); ++it)
         metadata.objectStores.set(it->first, it->second->metadata());
     return metadata;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBMetadata.h (123266 => 123267)


--- trunk/Source/WebCore/Modules/indexeddb/IDBMetadata.h	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBMetadata.h	2012-07-20 21:56:04 UTC (rev 123267)
@@ -42,12 +42,24 @@
 struct IDBIndexMetadata;
 
 struct IDBDatabaseMetadata {
-    IDBDatabaseMetadata() { }
-    IDBDatabaseMetadata(const String& name, const String& version)
+    enum {
+        NoIntVersion = -1
+    };
+
+    IDBDatabaseMetadata()
+        : intVersion(NoIntVersion)
+    {
+    }
+    IDBDatabaseMetadata(const String& name, const String& version, int64_t intVersion)
         : name(name)
-        , version(version) { }
+        , version(version)
+        , intVersion(intVersion)
+    {
+    }
+
     String name;
     String version;
+    int64_t intVersion;
 
     typedef HashMap<String, IDBObjectStoreMetadata> ObjectStoreMap;
     ObjectStoreMap objectStores;

Modified: trunk/Source/WebKit/chromium/ChangeLog (123266 => 123267)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-20 21:56:04 UTC (rev 123267)
@@ -1,3 +1,15 @@
+2012-07-20  David Grogan  <dgro...@chromium.org>
+
+        IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types
+        https://bugs.webkit.org/show_bug.cgi?id=91414
+
+        Reviewed by Adam Barth.
+
+        * src/AssertMatchingEnums.cpp:
+        * src/WebIDBMetadata.cpp:
+        (WebKit::WebIDBMetadata::WebIDBMetadata):
+        (WebKit::WebIDBMetadata::operator IDBDatabaseMetadata):
+
 2012-07-20  Robert Sesek  <rse...@chromium.org>
 
         [chromium][Mac] Switch the MACOSX_DEPLOYMENT_TARGET to 10.6

Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (123266 => 123267)


--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2012-07-20 21:56:04 UTC (rev 123267)
@@ -53,6 +53,7 @@
 #include "IDBFactoryBackendInterface.h"
 #include "IDBKey.h"
 #include "IDBKeyPath.h"
+#include "IDBMetadata.h"
 #include "IceOptions.h"
 #include "IconURL.h"
 #include "MediaPlayer.h"
@@ -87,6 +88,7 @@
 #include "WebIDBFactory.h"
 #include "WebIDBKey.h"
 #include "WebIDBKeyPath.h"
+#include "WebIDBMetadata.h"
 #include "WebIconURL.h"
 #include "WebInputElement.h"
 #include "WebMediaPlayer.h"
@@ -461,6 +463,8 @@
 COMPILE_ASSERT_MATCHING_ENUM(WebIDBKeyPath::NullType, IDBKeyPath::NullType);
 COMPILE_ASSERT_MATCHING_ENUM(WebIDBKeyPath::StringType, IDBKeyPath::StringType);
 COMPILE_ASSERT_MATCHING_ENUM(WebIDBKeyPath::ArrayType, IDBKeyPath::ArrayType);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebIDBMetadata::NoIntVersion, IDBDatabaseMetadata::NoIntVersion);
 #endif
 
 #if ENABLE(FILE_SYSTEM)

Modified: trunk/Source/WebKit/chromium/src/WebIDBMetadata.cpp (123266 => 123267)


--- trunk/Source/WebKit/chromium/src/WebIDBMetadata.cpp	2012-07-20 21:45:21 UTC (rev 123266)
+++ trunk/Source/WebKit/chromium/src/WebIDBMetadata.cpp	2012-07-20 21:56:04 UTC (rev 123267)
@@ -41,6 +41,7 @@
 {
     name = metadata.name;
     version = metadata.version;
+    intVersion = metadata.intVersion;
     objectStores = WebVector<ObjectStore>(static_cast<size_t>(metadata.objectStores.size()));
 
     size_t i = 0;
@@ -68,7 +69,7 @@
 
 WebIDBMetadata::operator IDBDatabaseMetadata() const
 {
-    IDBDatabaseMetadata db(name, version);
+    IDBDatabaseMetadata db(name, version, intVersion);
     for (size_t i = 0; i < objectStores.size(); ++i) {
         const ObjectStore webObjectStore = objectStores[i];
         IDBObjectStoreMetadata objectStore(webObjectStore.name, webObjectStore.keyPath, webObjectStore.autoIncrement);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to