MessagePortChannel::EventData should not be exposed
        https://bugs.webkit.org/show_bug.cgi?id=112635

        Reviewed by Geoff Garen.

        MessagePortChannel::EventData is an implementation detail that's only needed to
        store events in MessageQueue. Other existing code already gets away without it,
        just passing message and ports separately.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::postMessage):
        (WebCore::MessagePort::dispatchMessages):
        * dom/MessagePortChannel.cpp:
        * dom/MessagePortChannel.h:
        * dom/default/PlatformMessagePortChannel.cpp:
        (WebCore::PlatformMessagePortChannel::EventData::create):
        (WebCore::PlatformMessagePortChannel::EventData::EventData):
        (WebCore::MessagePortChannel::postMessageToRemote):
        (WebCore::MessagePortChannel::tryGetMessageFromRemote):
        * dom/default/PlatformMessagePortChannel.h:
        (WebCore::PlatformMessagePortChannel::EventData::message):
        (WebCore::PlatformMessagePortChannel::EventData::channels):
        (PlatformMessagePortChannel):
        (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
        (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
        * dom/default/chromium/PlatformMessagePortChannelChromium.cpp:
        (WebCore::MessagePortChannel::postMessageToRemote):
        (WebCore::MessagePortChannel::tryGetMessageFromRemote):
        (WebCore::PlatformMessagePortChannel::postMessageToRemote):
        (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
        * dom/default/chromium/PlatformMessagePortChannelChromium.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB Cursor continue moves one item at a time
https://bugs.webkit.org/show_bug.cgi?id=109972

Reviewed by Tony Chang.

IndexedDB: Use seek on the underlying levelDB iterator to implement the continue operation
on a cursor, instead of advancing one item at a time. On a simple test in Chrome - open a
key cursor on an index w/ 100 items, then do continue(50), rinse and repeat - this cuts the
time 50% (850c/s to 1700c/s). (Original patch c/o Pankaj Kakkar <pankaj@google.com>)

Covered by existing storage/indexeddb cursor tests; just a performance optimization.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::Cursor::continueFunction): Special case first iteration w/ key
to use leveldb seek (forward cursors only, since reverse seek isn't exposed).
(WebCore::ObjectStoreKeyCursorImpl::encodeKey): Helper for encoding key to seek to.
(WebCore::ObjectStoreCursorImpl::encodeKey): Ditto.
(WebCore::IndexKeyCursorImpl::encodeKey): Ditto.
(WebCore::IndexCursorImpl::encodeKey): Ditto.
(WebCore::objectStoreCursorOptions): Store IDs for encodeKey() to use.
(WebCore::indexCursorOptions): Ditto.
* Modules/indexeddb/IDBBackingStore.h:
(CursorOptions): Storage for IDs.
(Cursor): Add encodeKey() to interface.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146152 268f45cc-cd09-0410-ab3c-d52691b4dbfc