Title: [123683] trunk/Source/WebCore
- Revision
- 123683
- Author
- [email protected]
- Date
- 2012-07-25 17:24:57 -0700 (Wed, 25 Jul 2012)
Log Message
IndexedDB: Make db.version return an integer if appropriate
https://bugs.webkit.org/show_bug.cgi?id=92195
Reviewed by Tony Chang.
Make use of the existing IDBAny mechanism to return an integer if
integer versions have been used.
No new tests - no change in behavior expected.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::version):
(WebCore):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123682 => 123683)
--- trunk/Source/WebCore/ChangeLog 2012-07-26 00:12:58 UTC (rev 123682)
+++ trunk/Source/WebCore/ChangeLog 2012-07-26 00:24:57 UTC (rev 123683)
@@ -1,3 +1,22 @@
+2012-07-25 David Grogan <[email protected]>
+
+ IndexedDB: Make db.version return an integer if appropriate
+ https://bugs.webkit.org/show_bug.cgi?id=92195
+
+ Reviewed by Tony Chang.
+
+ Make use of the existing IDBAny mechanism to return an integer if
+ integer versions have been used.
+
+ No new tests - no change in behavior expected.
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::version):
+ (WebCore):
+ * Modules/indexeddb/IDBDatabase.h:
+ (IDBDatabase):
+ * Modules/indexeddb/IDBDatabase.idl:
+
2012-07-25 Michael Saboff <[email protected]>
Convert HTML parser to handle 8-bit resources without converting to UChar*
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (123682 => 123683)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2012-07-26 00:12:58 UTC (rev 123682)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2012-07-26 00:24:57 UTC (rev 123683)
@@ -111,6 +111,14 @@
return objectStoreNames.release();
}
+PassRefPtr<IDBAny> IDBDatabase::version() const
+{
+ int64_t intVersion = m_metadata.intVersion;
+ if (intVersion == IDBDatabaseMetadata::NoIntVersion)
+ return IDBAny::createString(m_metadata.version);
+ return IDBAny::create(SerializedScriptValue::numberValue(intVersion));
+}
+
PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const Dictionary& options, ExceptionCode& ec)
{
if (!m_versionChangeTransaction) {
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (123682 => 123683)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h 2012-07-26 00:12:58 UTC (rev 123682)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h 2012-07-26 00:24:57 UTC (rev 123683)
@@ -59,7 +59,7 @@
// Implement the IDL
const String name() const { return m_metadata.name; }
- const String version() const { return m_metadata.version; }
+ PassRefPtr<IDBAny> version() const;
PassRefPtr<DOMStringList> objectStoreNames() const;
// FIXME: Try to modify the code generator so this is unneeded.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (123682 => 123683)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2012-07-26 00:12:58 UTC (rev 123682)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2012-07-26 00:24:57 UTC (rev 123683)
@@ -32,7 +32,7 @@
EventTarget
] IDBDatabase {
readonly attribute DOMString name;
- readonly attribute DOMString version;
+ readonly attribute IDBAny version;
readonly attribute DOMStringList objectStoreNames;
attribute EventListener onabort;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes