angler-fishThe Vulnerability History Project

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):
    
commit 4a6e97130def2b7f2827e5f0a2da58af857fee1d
-11
+1 -1
-83
-4
-49
-44
-61
-7
+1 -10
-10
-2
-13
-3
+2 -18
-1
-2
-8
-1
-12
-50
-44
-60
-2
-58
-90
-34
-157
-5
-1
-5
-1
expand_less