Diff
Modified: trunk/LayoutTests/ChangeLog (192697 => 192698)
--- trunk/LayoutTests/ChangeLog 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/LayoutTests/ChangeLog 2015-11-20 22:14:56 UTC (rev 192698)
@@ -1,3 +1,13 @@
+2015-11-20 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: In the VersionChangeEvent for delete database calls, oldVersion should be null instead of 0.
+ https://bugs.webkit.org/show_bug.cgi?id=151481
+
+ Reviewed by Sam Weinig.
+
+ * storage/indexeddb/modern/deletedatabase-1-expected.txt:
+ * storage/indexeddb/modern/deletedatabase-2-expected.txt:
+
2015-11-20 Chris Dumez <cdu...@apple.com>
Caching of properties on objects that have named property getters is sometimes incorrect
Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt (192697 => 192698)
--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt 2015-11-20 22:14:56 UTC (rev 192698)
@@ -2,8 +2,8 @@
Initial upgrade old version - 0 new version - 1
Version change complete
Requesting deleteDatabase
-First connection received versionchange event: oldVersion 1, newVersion 0
-Delete database success: oldVersion 1, newVersion 0
+First connection received versionchange event: oldVersion 1, newVersion null
+Delete database success: oldVersion 1, newVersion null
Recreating database to make sure it's new and empty
Second upgrade old version - 0 new version - 1
Unable to get object store in second upgrade transaction (which is correct because it should not be there)
Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt (192697 => 192698)
--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt 2015-11-20 22:14:56 UTC (rev 192698)
@@ -2,9 +2,9 @@
That open connection also has an in-progress transaction at the time it gets the versionChange event.
Initial upgrade old version - 0 new version - 1
Requesting deleteDatabase
-First connection received versionchange event: oldVersion 0, newVersion 0
+First connection received versionchange event: oldVersion 0, newVersion null
First version change complete
-Delete database success: oldVersion 1, newVersion 0
+Delete database success: oldVersion 1, newVersion null
Recreating database to make sure it's new and empty
Second upgrade old version - 0 new version - 1
Unable to get object store in second upgrade transaction (which is correct because it should not be there)
Modified: trunk/Source/WebCore/ChangeLog (192697 => 192698)
--- trunk/Source/WebCore/ChangeLog 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/ChangeLog 2015-11-20 22:14:56 UTC (rev 192698)
@@ -1,5 +1,27 @@
2015-11-20 Brady Eidson <beid...@apple.com>
+ Modern IDB: In the VersionChangeEvent for delete database calls, oldVersion should be null instead of 0.
+ https://bugs.webkit.org/show_bug.cgi?id=151481
+
+ Reviewed by Sam Weinig.
+
+ No new tests, covered by changes to:
+ storage/indexeddb/modern/deletedatabase-1.html
+ storage/indexeddb/modern/deletedatabase-2.html
+
+ * Modules/indexeddb/IDBVersionChangeEvent.h:
+ * Modules/indexeddb/IDBVersionChangeEvent.idl:
+
+ * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
+ (WebCore::IDBClient::IDBVersionChangeEvent::newVersion):
+ * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
+
+ * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
+ (WebCore::LegacyVersionChangeEvent::newVersion):
+ * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h:
+
+2015-11-20 Brady Eidson <beid...@apple.com>
+
Addressing missed review feedback for:
Modern IDB: Make in-memory ObjectStore cursors work.
https://bugs.webkit.org/show_bug.cgi?id=151196
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h 2015-11-20 22:14:56 UTC (rev 192698)
@@ -40,7 +40,7 @@
virtual ~IDBVersionChangeEvent() { }
virtual uint64_t oldVersion() const = 0;
- virtual uint64_t newVersion() const = 0;
+ virtual uint64_t newVersion(bool& isNull) const = 0;
protected:
IDBVersionChangeEvent(const AtomicString&);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2015-11-20 22:14:56 UTC (rev 192698)
@@ -28,5 +28,5 @@
EnabledAtRuntime=IndexedDB,
] interface IDBVersionChangeEvent : Event {
readonly attribute unsigned long long oldVersion;
- readonly attribute unsigned long long newVersion;
+ readonly attribute unsigned long long? newVersion;
};
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp 2015-11-20 22:14:56 UTC (rev 192698)
@@ -38,6 +38,12 @@
{
}
+uint64_t IDBVersionChangeEvent::newVersion(bool& isNull) const
+{
+ isNull = !m_newVersion;
+ return m_newVersion;
+}
+
EventInterface IDBVersionChangeEvent::eventInterface() const
{
return IDBVersionChangeEventInterfaceType;
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h 2015-11-20 22:14:56 UTC (rev 192698)
@@ -41,7 +41,7 @@
}
virtual uint64_t oldVersion() const override final { return m_oldVersion; }
- virtual uint64_t newVersion() const override final { return m_newVersion; }
+ virtual uint64_t newVersion(bool& isNull) const override final;
virtual EventInterface eventInterface() const override final;
Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp 2015-11-20 22:14:56 UTC (rev 192698)
@@ -41,6 +41,12 @@
{
}
+uint64_t LegacyVersionChangeEvent::newVersion(bool& isNull) const
+{
+ isNull = false;
+ return m_newVersion;
+}
+
EventInterface LegacyVersionChangeEvent::eventInterface() const
{
return IDBVersionChangeEventInterfaceType;
Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h (192697 => 192698)
--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h 2015-11-20 22:10:52 UTC (rev 192697)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h 2015-11-20 22:14:56 UTC (rev 192698)
@@ -43,7 +43,7 @@
virtual ~LegacyVersionChangeEvent();
virtual uint64_t oldVersion() const override final { return m_oldVersion; }
- virtual uint64_t newVersion() const override final { return m_newVersion; }
+ virtual uint64_t newVersion(bool& isNull) const override final;
virtual EventInterface eventInterface() const override final;