LayoutTests/imported/w3c:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jan 2016 21:37:35 +0000 (21:37 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jan 2016 21:37:35 +0000 (21:37 +0000)
commit9b2054f9556f9adb6c869c0f25a70324ff476f2b
tree4484d6f3f43728990f9db886da056ea2791c33ef
parentd57968d63d0e349cbd4ea112c886ab8666e15f1b
LayoutTests/imported/w3c:
Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
https://bugs.webkit.org/show_bug.cgi?id=152921

Reviewed by Alex Christensen.

* indexeddb/keygenerator-overflow-expected.txt:

Source/WebCore:
Modern IDB: storage/indexeddb/key-generator.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152981

Reviewed by Alex Christensen.

No new tests (One failing test now passes, and one test's results get a progression).

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current
  value is already over 2^53.
(WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t
  conversions properly when calculating the next key.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function
  any time it goes out of scope.
(WebCore::IDBServer::ScopeGuard::~ScopeGuard):
(WebCore::IDBServer::ScopeGuard::enable):
(WebCore::IDBServer::ScopeGuard::disable):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if
  the put/add operation ends in error.

LayoutTests:
Modern IDB: storage/indexeddb/key-generator.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152981

Reviewed by Alex Christensen.

* platform/mac-wk1/TestExpectations:
* platform/wk2/imported/w3c/indexeddb/keygenerator-overflow-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/keygenerator-overflow-expected.txt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/indexeddb/keygenerator-overflow-expected.txt
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/wk2/imported/w3c/indexeddb/keygenerator-overflow-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h
Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp