2010-06-26 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Dumitru Daniliuc.
Support for keys and in-memory storage for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=41252
Set the role to Private.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-06-26 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Dumitru Daniliuc.
Support for keys and in-memory storage for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=41252
It'll take some time to get data persistence working for IndexedDB,
so until then, we'll just store everything in an in memory tree.
The tree uses WTF::AVLTree and is a template so that it can be used by
object stores (IDBKey -> SerializedScriptValue) and indexes (IDBKey ->
IDBKey). This class will be used in a subsequent patch.
Also add an IDBKey type that represents one of these keys. We use a
custom toJS function in a way similar to IDBAny to convert from WebCore
to a JS value. For converting the other way, we have to teach the code
generators what to do (unfortunately). This is done in a way similar
to serialized script value. Unlike serialized script value, IDBKey is
in WebCore and only a helper function is JS engine specific.
This code is not accessable from layout tests. (Will fix in
https://bugs.webkit.org/show_bug.cgi?id=41250) The bindings tests
show us that the generated bindings are what we expect.
* ForwardingHeaders/wtf/AVLTree.h: Added.
* bindings/js/IDBBindingUtilities.cpp: Added.
(WebCore::createIDBKeyFromValue):
* bindings/js/IDBBindingUtilities.h: Added.
* bindings/js/JSIDBKeyCustom.cpp: Added.
(WebCore::toJS):
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::idbKey):