1. 30 Sep, 2013 1 commit
    • beidson@apple.com's avatar
      Remove IDBTracing.h. · 1367e453
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122118
      
      Reviewed by Alexey Proskuryakov.
      
      Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.
      
      * GNUmakefile.list.am:
      
      * Modules/indexeddb/IDBCursor.cpp:
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBFactory.cpp:
      * Modules/indexeddb/IDBIndex.cpp:
      * Modules/indexeddb/IDBObjectStore.cpp:
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBTracing.h: Removed.
      * Modules/indexeddb/IDBTransaction.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/IDBBindingUtilities.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1367e453
  2. 27 Sep, 2013 1 commit
    • beidson@apple.com's avatar
      IndexedDB IDL Refactoring. · 77a081cf
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121996
      
      Reviewed by Alexey Proskuryakov.
      
      This includes:
      1 - Leveraging EventTarget.idl inheritance
      2 - Removing comments
      3 - Reordering to match the spec's IDLs
      4 - Removing nonstandard, WebKit-specific methods
      5 - Updating interfaces to match the spec (versions are only uint64_t's now...)
      6 - Updating implementation code as needed (versions are only uint64_t's now...)
      
      IDL changes:
      * Modules/indexeddb/IDBCursor.idl:
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBFactory.idl:
      * Modules/indexeddb/IDBIndex.idl:
      * Modules/indexeddb/IDBKeyRange.idl:
      * Modules/indexeddb/IDBObjectStore.idl:
      * Modules/indexeddb/IDBRequest.idl:
      * Modules/indexeddb/IDBTransaction.idl:
      * Modules/indexeddb/IDBVersionChangeEvent.idl:
      
      * Modules/indexeddb/IndexedDB.h: Add new enum to represent version nullness.
      
      Adapt to new IDLs, and also refactor representation of initial, null versioning:
      * Modules/indexeddb/IDBCallbacks.h:
      (WebCore::IDBCallbacks::onBlocked):
      (WebCore::IDBCallbacks::onUpgradeNeeded):
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::version):
      (WebCore::IDBDatabase::onVersionChange):
      * Modules/indexeddb/IDBDatabase.h:
      
      * Modules/indexeddb/IDBDatabaseCallbacks.h:
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
      (WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
      
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::open):
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBFactory.h:
      
      * Modules/indexeddb/IDBMetadata.h:
      (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
      
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::create):
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      (WebCore::IDBOpenDBRequest::onBlocked):
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.h:
      
      * Modules/indexeddb/IDBTransaction.cpp:
      * Modules/indexeddb/IDBTransaction.h:
      
      * Modules/indexeddb/IDBVersionChangeEvent.cpp:
      (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      (WebCore::IDBVersionChangeEvent::create):
      (WebCore::IDBVersionChangeEvent::oldVersion):
      (WebCore::IDBVersionChangeEvent::newVersion):
      
      Keep leveldb building with minimal adaptations to the new IDLs,
      but note that the LevelDB implementation is now incompatible with the spec:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      
      * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
      (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
      (WebCore::IDBDatabaseBackendLevelDB::openInternal):
      (WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendLevelDB::processPendingCalls):
      (WebCore::IDBDatabaseBackendLevelDB::openConnection):
      (WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
      (WebCore::IDBDatabaseBackendLevelDB::deleteDatabase):
      (WebCore::IDBDatabaseBackendLevelDB::deleteDatabaseFinal):
      (WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform):
      
      * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
      (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
      
      * inspector/InspectorIndexedDBAgent.cpp: Update for metadata change.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77a081cf
  3. 25 Sep, 2013 2 commits
  4. 21 Sep, 2013 1 commit
  5. 09 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Tighten up EventQueue classes a bit, less indirection and memory allocation · 7ba1e57c
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121016
      
      Reviewed by Andreas Kling.
      
      * Modules/encryptedmedia/MediaKeySession.cpp:
      (WebCore::MediaKeySession::MediaKeySession): Updated since event queue is now
      a member rather than an OwnPtr.
      (WebCore::MediaKeySession::close): Ditto.
      (WebCore::MediaKeySession::keyRequestTimerFired): Ditto.
      (WebCore::MediaKeySession::addKeyTimerFired): Ditto.
      * Modules/encryptedmedia/MediaKeySession.h: Ditto.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::closeConnection): Updated since ScriptExecutionContext's
      eventQueue function now returns a reference rather than a pointer. Also, the
      cancelEvent function takes a reference instead of a pointer.
      (WebCore::IDBDatabase::enqueueEvent): Ditto.
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::abort): Ditto.
      (WebCore::IDBRequest::enqueueEvent): Ditto.
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::enqueueEvent): Ditto.
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::MediaSource): Updated since event queue is now a
      member rather than an OwnPtr. Also use initialization instead of assignment
      to set up source buffers.
      (WebCore::MediaSource::hasPendingActivity): Ditto.
      (WebCore::MediaSource::stop): Ditto.
      (WebCore::MediaSource::scheduleEvent): Ditto.
      * Modules/mediasource/MediaSource.h: Ditto.
      
      * Modules/mediasource/SourceBufferList.cpp:
      (WebCore::SourceBufferList::SourceBufferList): Take references instead of
      pointers.
      (WebCore::SourceBufferList::length): Changed type to unsigned instead of
      unsigned long. This is an IDL "unsigned long", which corresponds to "unsigned"
      in our C++ DOM implementation.
      (WebCore::SourceBufferList::createAndFireEvent): Updated since event queue is
      now a reference.
      (WebCore::SourceBufferList::scriptExecutionContext): Updated since script
      execution context is now a reference.
      * Modules/mediasource/SourceBufferList.h: Ditto.
      
      * dom/Document.cpp:
      (WebCore::Document::Document): Updated since event queue is now a member rather
      than a RefPtr.
      (WebCore::Document::detach): Ditto.
      (WebCore::Document::enqueueWindowEvent): Ditto.
      (WebCore::Document::enqueueDocumentEvent): Ditto.
      * dom/Document.h: Ditto.
      
      * dom/DocumentEventQueue.cpp: Renamed DocumentEventQueueTimer to just Timer and
      made it a class member of DocumentEventQueue. Also changed it to use references
      instead of pointers and removed unneeded ScriptExecutionContext argument.
      (WebCore::DocumentEventQueue::DocumentEventQueue): Updated to take a document
      reference instead of a script execution context pointer.
      (WebCore::DocumentEventQueue::enqueueEvent): Wrote the assertions in a clearer
      style and do the assertions even when the queue is closed.
      (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): Removed the unneeded
      ScrollEventTargetType argument, since the policy is specific to the document node.
      Made the argument a reference instead of a PassRefPtr, and rewrote the function
      to be more straightforward and readable.
      (WebCore::DocumentEventQueue::cancelEvent): Use the return value recently added to
      the remove function to avoid the need for use of iterators and a find/remove pair.
      (WebCore::DocumentEventQueue::pendingEventTimerFired): Rewrote this to use the
      recently added ListHashSet takeFirst function. Also protect the document instead
      of protecting just this object during the dispatch. Can't really protect the
      event queue since it's no longer separately reference counted.
      (WebCore::DocumentEventQueue::dispatchEvent): Changed this to take a reference and
      added a FIXME about some curious code in here that needs a "why" comment.
      * dom/DocumentEventQueue.h: Removed many unneeded includes, some unneeded forward
      declarations, marked the class final, made it no longer derive from RefCounted,
      removed ScrollEventTargetType and create, and did the other changes mentioned above.
      
      * dom/EventQueue.h: Got rid of many uneeded includes, changed the argument type
      of cancelEvent to Event& and rewrote the comment for close.
      
      * dom/GenericEventQueue.cpp:
      (WebCore::GenericEventQueue::GenericEventQueue): Updated to take a reference.
      (WebCore::GenericEventQueue::enqueueEvent): Ditto.
      (WebCore::GenericEventQueue::timerFired): Ditto.
      * dom/GenericEventQueue.h: Changed this class to no longer derive from EventQueue
      since there was no value coming from that polymorphism. Removed all the virtual
      keywords from the class. Switched from pointers to references. Removed the unused
      cancelEvent function. Removed the create function since this is always used as a
      data member, not a pointer on the heap.
      
      * dom/ScriptExecutionContext.h: Changed the return type of eventQueue to a reference.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Updated since event queue is now a
      member rather than an OwnPtr.
      (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
      (WebCore::HTMLMediaElement::scheduleEvent): Ditto.
      (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Ditto.
      (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto.
      (WebCore::HTMLMediaElement::mediaPlayerKeyAdded): Ditto.
      (WebCore::HTMLMediaElement::mediaPlayerKeyError): Ditto.
      (WebCore::HTMLMediaElement::mediaPlayerKeyMessage): Ditto.
      (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): Ditto.
      (WebCore::HTMLMediaElement::stop): Ditto.
      (WebCore::HTMLMediaElement::hasPendingActivity): Ditto.
      * html/HTMLMediaElement.h: Ditto.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::sendScrollEvent): Updated to remove the now-uneeded
      ScrollEventTargetType argument, and also to use references instead of pointers.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollTo): Ditto.
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::scrollTo): Ditto.
      
      * workers/WorkerEventQueue.cpp:
      (WebCore::WorkerEventQueue::WorkerEventQueue): Updated to work with references
      instead of pointers.
      (WebCore::WorkerEventQueue::enqueueEvent): Ditto.
      (WebCore::WorkerEventQueue::cancelEvent): Use the take function instead of a
      get/remove pair, to eliminate double hashing.
      * workers/WorkerEventQueue.h: Removed unneeded includes, forward declarations,
      the create function, and the private removeEvent function. Marked class final.
      
      * workers/WorkerGlobalScope.cpp:
      (WebCore::WorkerGlobalScope::WorkerGlobalScope): Updated since eventQueue is
      now a data member.
      (WebCore::WorkerGlobalScope::eventQueue): Ditto.
      * workers/WorkerGlobalScope.h: Made m_eventQueue a queue instead of a pointer
      to a queue. Also made the eventQueue function private and final.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ba1e57c
  6. 11 Aug, 2013 1 commit
    • akling@apple.com's avatar
      Make some things that return never-null pointers return references instead. · ad1137cb
      akling@apple.com authored
      <http://webkit.org/b/119660>
      
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      These functions never return null anyway, so remove any ambiguity by letting
      them return references instead of pointers.
      
      - Node::ensureRareData()
      - Element::ensureUniqueElementData()
      - Element::ensureShadow()
      - Element::ensureUserAgentShadowRoot()
      - StyledElement::ensureMutableInlineStyle()
      - NodeRareData::ensureNodeLists()
      - NodeRareData::ensureMutationObserverData()
      - EventTarget::ensureEventTargetData()
      - Document::ensureStyleResolver()
      - Document::selectorQueryCache()
      - Document::mediaQueryMatcher()
      - FlowThreadController::ensureRenderFlowThreadWithName()
      - HTMLTrackElement::ensureTrack()
      - SVGElement::ensureSVGRareData()
      - AnimationControllerPrivate::ensureCompositeAnimation()
      
      Source/WebKit/qt:
      
      * Api/qwebelement.cpp:
      (QWebElement::styleProperty):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad1137cb
  7. 27 Mar, 2013 1 commit
    • charles.wei@torchmobile.com.cn's avatar
      Remove build warning for unused function parameters in indexeddb. · 7a8f3122
      charles.wei@torchmobile.com.cn authored
      https://bugs.webkit.org/show_bug.cgi?id=113043
      
      Reviewed by Tony Chang.
      
      No new tests, just remove build warning.
      
      * Modules/indexeddb/IDBCallbacks.h:
      (WebCore::IDBCallbacks::onBlocked):
      (WebCore::IDBCallbacks::onUpgradeNeeded):
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::stringToDirection):
      * Modules/indexeddb/IDBCursor.h:
      (IDBCursor):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::prefetchReset):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::openKeyCursor):
      * Modules/indexeddb/IDBLevelDBCoding.cpp:
      (IDBLevelDBCoding):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::stringToMode):
      * Modules/indexeddb/IDBTransaction.h:
      (IDBTransaction):
      * inspector/InspectorIndexedDBAgent.cpp:
      (WebCore):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a8f3122
  8. 21 Mar, 2013 4 commits
    • jsbell@chromium.org's avatar
      IndexedDB: Ensure script wrappers can be collected after context is stopped · 1a377faf
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112976
      
      Reviewed by Adam Barth.
      
      ActiveDOMObject::hasPendingActivity is called to see if script wrappers
      can be disposed of. Once the script execution context has stopped they
      should be free to go - include this in the checks.
      
      No new tests - suggestions welcome.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
      (WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
      (WebCore::IDBRequest::stop): Don't bother calling empty super impl.
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
      (WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a377faf
    • commit-queue@webkit.org's avatar
      Remove upcastPointer from ActiveDOMObject constructor · 433a0b5e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112858
      
      Patch by Russell McClellan <russell.mcclellan@gmail.com> on 2013-03-21
      Reviewed by Alexey Proskuryakov.
      
      Removed pesky argument to ActiveDOMObject constructor that is no longer
      used.
      
      No new tests (no change in behavior).
      
      * Modules/battery/BatteryManager.cpp:
      (WebCore::BatteryManager::BatteryManager):
      * Modules/filesystem/DOMFileSystem.cpp:
      (WebCore::DOMFileSystem::DOMFileSystem):
      * Modules/filesystem/FileWriter.cpp:
      (WebCore::FileWriter::FileWriter):
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::Geolocation):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::IDBDatabase):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::IDBTransaction):
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::MediaSource):
      * Modules/mediastream/MediaStreamTrack.cpp:
      (WebCore::MediaStreamTrack::MediaStreamTrack):
      * Modules/mediastream/RTCDTMFSender.cpp:
      (WebCore::RTCDTMFSender::RTCDTMFSender):
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::RTCPeerConnection):
      * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
      (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
      * Modules/mediastream/RTCStatsRequestImpl.cpp:
      (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
      * Modules/mediastream/RTCVoidRequestImpl.cpp:
      (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
      * Modules/networkinfo/NetworkInfoConnection.cpp:
      (WebCore::NetworkInfoConnection::NetworkInfoConnection):
      * Modules/notifications/Notification.cpp:
      (WebCore::Notification::Notification):
      * Modules/notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::NotificationCenter):
      * Modules/speech/SpeechRecognition.cpp:
      (WebCore::SpeechRecognition::SpeechRecognition):
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::AudioContext):
      * Modules/webdatabase/DatabaseContext.cpp:
      (WebCore::DatabaseContext::DatabaseContext):
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::WebSocket):
      * css/FontLoader.cpp:
      (WebCore::FontLoader::FontLoader):
      * dom/ActiveDOMObject.cpp:
      (WebCore::ActiveDOMObject::ActiveDOMObject):
      * dom/ActiveDOMObject.h:
      (ActiveDOMObject):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
      (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
      (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
      (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
      (WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
      * dom/ScriptExecutionContext.h:
      (ScriptExecutionContext):
      (WebCore::ScriptExecutionContext::activeDOMObjects):
      * fileapi/FileReader.cpp:
      (WebCore::FileReader::FileReader):
      * html/HTMLMarqueeElement.cpp:
      (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::WebGLRenderingContext):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::Prerenderer):
      * page/EventSource.cpp:
      (WebCore::EventSource::EventSource):
      * page/SuspendableTimer.cpp:
      (WebCore::SuspendableTimer::SuspendableTimer):
      * workers/AbstractWorker.cpp:
      (WebCore::AbstractWorker::AbstractWorker):
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::hasPendingActivity):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::XMLHttpRequest):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      433a0b5e
    • jsbell@chromium.org's avatar
      IndexedDB: Ensure all API methods have IDB_TRACE macros · 49ac829d
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112963
      
      Reviewed by Tony Chang.
      
      Anntotate methods and callbacks that weren't already annotated
      with IDB_TRACE macros to assist in debugging, e.g. when using
      the chromium port's chrome://tracing visualization.
      
      No new tests - just harmless diagnostic sprinkles.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
      (WebCore::IDBDatabase::deleteObjectStore): ...and here.
      (WebCore::IDBDatabase::transaction): ...etc.
      (WebCore::IDBDatabase::close):
      (WebCore::IDBDatabase::onVersionChange):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::getDatabaseNames):
      (WebCore::IDBFactory::open):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
      (WebCore::IDBFactoryBackendImpl::deleteDatabase):
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onBlocked):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49ac829d
    • jsbell@chromium.org's avatar
      IndexedDB: Remove onVersionChange(string) plumbing · 0e6a82c1
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112712
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Delete unused onVersionChange(string) overload.
      
      No new tests - just deleting dead code.
      
      * Modules/indexeddb/IDBDatabase.cpp: Delete onVersionChange(string) overload.
      * Modules/indexeddb/IDBDatabase.h: Ditto.
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Ditto.
      * Modules/indexeddb/IDBDatabaseCallbacks.h: Ditto.
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: Ditto.
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: Ditto.
      
      Source/WebKit/chromium:
      
      * public/WebIDBDatabaseCallbacks.h: Remove onVersionChange(string) overload.
      * src/IDBDatabaseCallbacksProxy.cpp: Ditto.
      * src/IDBDatabaseCallbacksProxy.h: Ditto.
      * src/WebIDBDatabaseCallbacksImpl.cpp: Ditto.
      * src/WebIDBDatabaseCallbacksImpl.h: Ditto.
      * tests/IDBAbortOnCorruptTest.cpp: Ditto.
      * tests/IDBDatabaseBackendTest.cpp: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e6a82c1
  9. 19 Mar, 2013 1 commit
  10. 05 Mar, 2013 3 commits
    • alecflett@chromium.org's avatar
      IndexedDB: Properly refactor frontend/backend code by #includes · db5a6f7b
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110653
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      IndexedDB has a distinct backend and frontend, with well defined
      *Interface / *Callbacks classes distinguishing them, respectively.
      
      This makes sure that the frontend and backend do not include each
      other and fixes build problems that occurred as a result.
      
      Specifically this moves enums out of IDBCursor and IDBTransaction
      into IndexedDB.h in a new WebCore::IndexedDB namespace.
      
      No new tests, as this is just a refactor.
      
      Source/WebKit/chromium:
      
      Clean up the frontend/backend WebIDB* implementations to
      match the changes to webkit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db5a6f7b
    • dpranke@chromium.org's avatar
      Unreviewed, rolling out r144798. · 3a929ca2
      dpranke@chromium.org authored
      http://trac.webkit.org/changeset/144798
      https://bugs.webkit.org/show_bug.cgi?id=111478
      
      "broke chromium windows build" (Requested by dpranke on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-05
      
      Source/WebCore:
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IDBBackingStore::Cursor::continueFunction):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      (WebCore::IDBBackingStore::openObjectStoreCursor):
      (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStore::openIndexKeyCursor):
      (WebCore::IDBBackingStore::openIndexCursor):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::create):
      (WebCore::IDBCursor::IDBCursor):
      (WebCore::IDBCursor::continueFunction):
      (WebCore::IDBCursor::stringToDirection):
      (WebCore::IDBCursor::directionToString):
      * Modules/indexeddb/IDBCursor.h:
      (IDBCursor):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      (WebCore::IDBCursorBackendImpl::deleteFunction):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (WebCore::IDBCursorBackendImpl::value):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendInterface.h:
      (WebCore):
      * Modules/indexeddb/IDBCursorWithValue.cpp:
      (WebCore::IDBCursorWithValue::create):
      (WebCore::IDBCursorWithValue::IDBCursorWithValue):
      * Modules/indexeddb/IDBCursorWithValue.h:
      (IDBCursorWithValue):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (GetOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (OpenCursorOperation):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (WebCore::IDBDatabaseBackendImpl::get):
      (WebCore::GetOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::put):
      (WebCore::PutOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::openCursor):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteRange):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::clear):
      (WebCore::IDBDatabaseBackendImpl::transactionStarted):
      (WebCore::IDBDatabaseBackendImpl::transactionFinished):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBFactory.h:
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore):
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::openKeyCursor):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::IDBRequest):
      (WebCore::IDBRequest::setCursorDetails):
      (WebCore::IDBRequest::setResultCursor):
      (WebCore::IDBRequest::onSuccess):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::create):
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::stringToMode):
      (WebCore::IDBTransaction::modeToString):
      * Modules/indexeddb/IDBTransaction.h:
      (WebCore::IDBTransaction::isReadOnly):
      (WebCore::IDBTransaction::isVersionChange):
      (IDBTransaction):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::mode):
      * Modules/indexeddb/IDBTransactionCoordinator.cpp:
      (WebCore::IDBTransactionCoordinator::processStartedTransactions):
      (WebCore::IDBTransactionCoordinator::canRunTransaction):
      * Modules/indexeddb/IndexedDB.h: Removed.
      * Target.pri:
      * WebCore.gypi:
      
      Source/WebKit/chromium:
      
      * src/AssertMatchingEnums.cpp:
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::openCursor):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBCallbacksImpl.cpp:
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::openCursor):
      * tests/IDBAbortOnCorruptTest.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      * tests/IDBFakeBackingStore.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a929ca2
    • alecflett@chromium.org's avatar
      IndexedDB: Properly refactor frontend/backend code by #includes · d608211e
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110653
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      IndexedDB has a distinct backend and frontend, with well defined
      *Interface / *Callbacks classes distinguishing them, respectively.
      
      This makes sure that the frontend and backend do not include each
      other and fixes build problems that occurred as a result.
      
      Specifically this moves enums out of IDBCursor and IDBTransaction
      into IndexedDB.h in a new WebCore::IndexedDB namespace.
      
      No new tests, as this is just a refactor.
      
      Source/WebKit/chromium:
      
      Clean up the frontend/backend WebIDB* implementations to
      match the changes to webkit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d608211e
  11. 11 Feb, 2013 1 commit
    • jsbell@chromium.org's avatar
      [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler · 5323fa0e
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108670
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
      listeners, as those listeners may close the database in response to events.
      
      Also, removed extraneous super-calls from hasPendingActivity() overrides.
      
      Test: storage/indexeddb/database-wrapper.html
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::hasPendingActivity): Implemented.
      * Modules/indexeddb/IDBDatabase.h: Declared.
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::hasPendingActivity): Simplified.
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::hasPendingActivity): Simplified.
      
      LayoutTests:
      
      * storage/indexeddb/database-wrapper-expected.txt: Added.
      * storage/indexeddb/database-wrapper.html: Added.
      * storage/indexeddb/resources/database-wrapper.js: Added.
      (test):
      (openDB):
      (onUpgradeNeeded):
      (openSuccess.get request.onsuccess):
      (onVersionChange):
      (collectGarbage):
      (openAgain):
      (onBlocked):
      (openAgainSuccess):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5323fa0e
  12. 09 Feb, 2013 1 commit
    • mkwst@chromium.org's avatar
      Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes. · d15dbe65
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109295
      
      Reviewed by Darin Adler.
      
      The monster patch in http://wkbug.com/108771 missed an entire class of
      ignored exceptions. It only dealt with call sites that never initialized
      the ExceptionCode variable, on the assumption that only such call sites
      would ignore the variable's value.
      
      That was a flawed assumption: a large number of sites that initialize the
      ExceptionCode to 0 ignore it regardless. This patch deals with the
      almost-as-large set of callsites that initialize the variable, pass it to
      a function, and then never touch it again.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::forceClose):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
      (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
      (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
      * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
      (getSelectionOffsetsForObject):
      * accessibility/atk/WebKitAccessibleUtil.cpp:
      (selectionBelongsToObject):
      * dom/Node.cpp:
      (WebCore::Node::textRects):
      * editing/DeleteButtonController.cpp:
      (WebCore::DeleteButtonController::hide):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::styleAtSelectionStart):
      * editing/Editor.cpp:
      (WebCore::Editor::canDeleteRange):
      (WebCore::Editor::pasteAsPlainText):
      (WebCore::Editor::pasteAsFragment):
      (WebCore::Editor::shouldDeleteRange):
      (WebCore::Editor::dispatchCPPEvent):
      (WebCore::Editor::setComposition):
      (WebCore::Editor::advanceToNextMisspelling):
      (WebCore::isFrameInRange):
      * editing/EditorCommand.cpp:
      (WebCore::expandSelectionToGranularity):
      * editing/MergeIdenticalElementsCommand.cpp:
      (WebCore::MergeIdenticalElementsCommand::doApply):
      * editing/SplitElementCommand.cpp:
      (WebCore::SplitElementCommand::doUnapply):
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doApply):
      * editing/TextCheckingHelper.cpp:
      (WebCore::expandToParagraphBoundary):
      (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
      (WebCore::TextCheckingHelper::isUngrammatical):
      (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
      * editing/TextInsertionBaseCommand.cpp:
      (WebCore::dispatchBeforeTextInsertedEvent):
      (WebCore::canAppendNewLineFeedToSelection):
      * editing/TextIterator.cpp:
      (WebCore::findPlainText):
      * editing/htmlediting.cpp:
      (WebCore::extendRangeToWrappingNodes):
      (WebCore::isNodeVisiblyContainedWithin):
      * editing/visible_units.cpp:
      (WebCore::nextBoundary):
      * html/FileInputType.cpp:
      (WebCore::FileInputType::createShadowSubtree):
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::HTMLKeygenElement):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::setText):
      * html/HTMLTitleElement.cpp:
      (WebCore::HTMLTitleElement::setText):
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::didCompleteLoad):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::createShadowSubtree):
      * html/SearchInputType.cpp:
      (WebCore::SearchInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      * html/track/TextTrackList.cpp:
      (TextTrackList::asyncEventTimerFired):
      * inspector/DOMPatchSupport.cpp:
      (WebCore::DOMPatchSupport::patchDocument):
      * inspector/InspectorDatabaseAgent.cpp:
      (WebCore):
      * inspector/InspectorFileSystemAgent.cpp:
      (WebCore):
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::addRange):
      * page/DragController.cpp:
      (WebCore::DragController::dispatchTextInputEventFor):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::dispatchMouseEvent):
      (WebCore::EventHandler::handleTouchEvent):
      * page/FrameActionScheduler.cpp:
      (WebCore::EventFrameAction::fire):
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
      * svg/SVGDocument.cpp:
      (WebCore::SVGDocument::dispatchZoomEvent):
      (WebCore::SVGDocument::dispatchScrollEvent):
      * svg/SVGLength.cpp:
      (WebCore::SVGLength::SVGLength):
      (WebCore::SVGLength::value):
      * xml/parser/XMLDocumentParser.cpp:
      (WebCore::XMLDocumentParser::exitText):
      * xml/parser/XMLDocumentParserQt.cpp:
      (WebCore::XMLDocumentParser::parse):
      (WebCore::XMLDocumentParser::startDocument):
      (WebCore::XMLDocumentParser::parseCharacters):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d15dbe65
  13. 03 Feb, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Adds usage instrumentation for indexedDB · 73a2ffee
      commit-queue@webkit.org authored
      Includes new header file in project files
      
      https://bugs.webkit.org/show_bug.cgi?id=107772
      
      Patch by Kassy Coan <kassycoan@chromium.org> on 2013-02-03
      Reviewed by Tony Chang.
      
      Currently untestable. Has zero effect apart from histogramming.
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBHistograms.h: Added.
      (WebCore):
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      73a2ffee
  14. 28 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r140934, r140935, and r140937. · 1b629091
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/140934
      http://trac.webkit.org/changeset/140935
      http://trac.webkit.org/changeset/140937
      https://bugs.webkit.org/show_bug.cgi?id=108117
      
      Re-land some speculative rollouts - see wkbug.com/108048 for
      context (Requested by jsbell on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-28
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBCallbacks.h:
      (IDBCallbacks):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::onVersionChange):
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBFactory.h:
      (WebCore):
      (IDBFactory):
      * Modules/indexeddb/IDBFactory.idl:
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::openCursor):
      (IDBObjectStore):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::create):
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      (WebCore::IDBOpenDBRequest::onBlocked):
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      (WebCore::IDBOpenDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::create):
      (WebCore::IDBRequest::IDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      (WebCore::IDBRequest::taskType):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.h: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Removed.
      * Modules/indexeddb/IDBVersionChangeEvent.cpp:
      (WebCore::IDBVersionChangeEvent::create):
      (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      (IDBVersionChangeEvent):
      (WebCore::IDBVersionChangeEvent::oldVersion):
      (WebCore::IDBVersionChangeEvent::newVersion):
      * Modules/indexeddb/IDBVersionChangeEvent.idl:
      * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/EventNames.in:
      * dom/EventTarget.h:
      (WebCore):
      * dom/EventTargetFactory.in:
      
      Source/WebKit/chromium:
      
      * public/WebIDBCallbacks.h:
      (WebIDBCallbacks):
      * src/AssertMatchingEnums.cpp:
      * src/IDBCallbacksProxy.cpp:
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      * src/WebIDBCallbacksImpl.cpp:
      * src/WebIDBCallbacksImpl.h:
      (WebIDBCallbacksImpl):
      * tests/IDBAbortOnCorruptTest.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-blocked-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-not-blocked-expected.txt:
      * storage/indexeddb/events-expected.txt: Added.
      * storage/indexeddb/events.html: Added.
      * storage/indexeddb/intversion-gated-on-delete-expected.txt:
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/intversion-upgrades-expected.txt:
      * storage/indexeddb/removed-expected.txt:
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/deletedatabase-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
      (prepareDatabase.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-versionchange.js:
      (h1OpenSuccess.h1.onversionchange.h1OnVersionChange.h1.onversionchange):
      (h1OpenSuccess.h1.onversionchange):
      (h1OpenSuccess.request.onsuccess.h2OpenSuccess.h2.onversionchange):
      * storage/indexeddb/resources/deletedatabase-not-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/events.js: Added.
      (test):
      * storage/indexeddb/resources/intversion-gated-on-delete.js:
      (firstSuccessCallback):
      (connection1VersionChangeCallback):
      * storage/indexeddb/resources/intversion-long-queue.js:
      (connection1VersionChangeCallback):
      (deleteDatabaseBlockedCallback):
      (deleteDatabaseSuccessCallback):
      (connection2VersionChangeEvent):
      * storage/indexeddb/resources/removed.js:
      (test):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b629091
  15. 27 Jan, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r140602. · 6935ae64
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/140602
      https://bugs.webkit.org/show_bug.cgi?id=108045
      
      Caused 8 indexed tests to crash. (Requested by keishi on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-27
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBCallbacks.h:
      (WebCore::IDBCallbacks::onBlocked):
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabase.h:
      (WebCore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBFactory.h:
      (WebCore):
      (IDBFactory):
      * Modules/indexeddb/IDBFactory.idl:
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::create):
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
      (WebCore::IDBOpenDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBVersionChangeRequest.cpp: Copied from Source/WebKit/chromium/src/WebIDBCallbacksImpl.h.
      (WebCore):
      (WebCore::IDBVersionChangeRequest::create):
      (WebCore::IDBVersionChangeRequest::IDBVersionChangeRequest):
      (WebCore::IDBVersionChangeRequest::~IDBVersionChangeRequest):
      (WebCore::IDBVersionChangeRequest::interfaceName):
      (WebCore::IDBVersionChangeRequest::onBlocked):
      * Modules/indexeddb/IDBVersionChangeRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
      (WebCore):
      (IDBVersionChangeRequest):
      * Modules/indexeddb/IDBVersionChangeRequest.idl: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/EventTarget.h:
      (WebCore):
      * dom/EventTargetFactory.in:
      
      Source/WebKit/chromium:
      
      * public/WebIDBCallbacks.h:
      * src/IDBCallbacksProxy.cpp:
      (WebKit::IDBCallbacksProxy::onBlocked):
      (WebKit):
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      * src/WebIDBCallbacksImpl.cpp:
      (WebKit::WebIDBCallbacksImpl::onBlocked):
      (WebKit):
      * src/WebIDBCallbacksImpl.h:
      (WebIDBCallbacksImpl):
      * tests/IDBAbortOnCorruptTest.cpp:
      (WebCore::MockIDBCallbacks::onBlocked):
      * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/intversion-upgrades-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6935ae64
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r140741. · 946db2c5
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/140741
      https://bugs.webkit.org/show_bug.cgi?id=108044
      
      Caused 8 indexed tests to fail on Mac and Win. (Requested by
      keishi on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-27
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::onVersionChange):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onBlocked):
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
      (WebCore):
      (WebCore::IDBUpgradeNeededEvent::create):
      (WebCore::IDBUpgradeNeededEvent::IDBUpgradeNeededEvent):
      (WebCore::IDBUpgradeNeededEvent::~IDBUpgradeNeededEvent):
      (WebCore::IDBUpgradeNeededEvent::oldVersion):
      (WebCore::IDBUpgradeNeededEvent::newVersion):
      (WebCore::IDBUpgradeNeededEvent::interfaceName):
      * Modules/indexeddb/IDBUpgradeNeededEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
      (WebCore):
      (IDBUpgradeNeededEvent):
      * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl.
      * Modules/indexeddb/IDBVersionChangeEvent.cpp:
      (WebCore::IDBVersionChangeEvent::create):
      (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
      (WebCore::IDBVersionChangeEvent::version):
      (WebCore):
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      (WebCore):
      (IDBVersionChangeEvent):
      * Modules/indexeddb/IDBVersionChangeEvent.idl:
      * WebCore.gypi:
      * dom/EventNames.in:
      
      LayoutTests:
      
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-blocked-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-not-blocked-expected.txt:
      * storage/indexeddb/events-expected.txt: Removed.
      * storage/indexeddb/events.html: Removed.
      * storage/indexeddb/intversion-gated-on-delete-expected.txt:
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/removed-expected.txt:
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js:
      (versionChangeCallback):
      * storage/indexeddb/resources/deletedatabase-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
      (prepareDatabase.h.onversionchange):
      * storage/indexeddb/resources/deletedatabase-delayed-by-versionchange.js:
      (h1OpenSuccess.h1.onversionchange):
      (h1OpenSuccess.request.onsuccess.h2OpenSuccess.h2.onversionchange):
      * storage/indexeddb/resources/deletedatabase-not-blocked.js:
      (test.request.onsuccess.openOnSuccess.h.onversionchange):
      * storage/indexeddb/resources/events.js: Removed.
      * storage/indexeddb/resources/intversion-gated-on-delete.js:
      (firstSuccessCallback):
      (connection1VersionChangeCallback):
      * storage/indexeddb/resources/intversion-long-queue.js:
      (connection1VersionChangeCallback):
      (deleteDatabaseBlockedCallback):
      (deleteDatabaseSuccessCallback):
      (connection2VersionChangeEvent):
      * storage/indexeddb/resources/removed.js:
      (test):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      946db2c5
  16. 24 Jan, 2013 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Remove IDBUpgradeNeededEvent, merge with IDBVersionChangeEvent · cd4af9db
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107754
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      The IndexedDB spec calls deleteDatabase() to fire a "blocked" event with the
      IDBVersionChangeEvent interface which we were doing, but with an older interface - just
      a "version" property. We were already firing an event on "versionchange" with the new
      "oldVersion" and "newVersion" properties, but with an IDBUpgradeNeededEvent interface that
      doesn't exist in the spec. This patch merges the event types to match the spec, including
      that the newVersion property is null when deleting.
      
      Test: storage/indexeddb/events.html
            storage/indexeddb/deletedatabase-*.html
      
      * CMakeLists.txt: Remove references to deleted files.
      * GNUmakefile.list.am: Ditto.
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::onVersionChange): Generate IDBVersionChangeEvent.
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onBlocked): Ditto.
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Ditto.
      * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.h: Removed.
      * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Removed.
      * Modules/indexeddb/IDBVersionChangeEvent.cpp:
      (WebCore::IDBVersionChangeEvent::create): Take IDBAny's as old/new versions
      may be integers, strings (for legacy databases), or null (when deleting).
      (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      (IDBVersionChangeEvent): Remove version property.
      (WebCore::IDBVersionChangeEvent::oldVersion): Added new property.
      (WebCore::IDBVersionChangeEvent::newVersion): Added new property.
      * Modules/indexeddb/IDBVersionChangeEvent.idl: Updated properties.
      * WebCore.gypi: Remove references to deleted files.
      * dom/EventNames.in: Ditto.
      
      LayoutTests:
      
      Updated expectations, and new test file. In most cases, just switch test from
      looking at event.target.version and event.version to event.oldVersion and event.newVersion,
      in some cases verifying the old properties as well as a sanity check.
      
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-blocked-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-not-blocked-expected.txt:
      * storage/indexeddb/events-expected.txt: Added.
      * storage/indexeddb/events.html: Added.
      * storage/indexeddb/intversion-gated-on-delete-expected.txt:
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/removed-expected.txt:
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:
      * storage/indexeddb/resources/deletedatabase-blocked.js:
      * storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
      * storage/indexeddb/resources/deletedatabase-delayed-by-versionchange.js:
      * storage/indexeddb/resources/deletedatabase-not-blocked.js:
      * storage/indexeddb/resources/events.js: Added.
      * storage/indexeddb/resources/intversion-gated-on-delete.js:
      * storage/indexeddb/resources/intversion-long-queue.js:
      * storage/indexeddb/resources/removed.js: Verify that old Event type and property are gone.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd4af9db
  17. 23 Jan, 2013 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Remove IDBVersionChangeRequest · d57bce8b
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107711
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      When the setVersion() API was removed from the Indexed DB spec the IDBVersionChangeRequest
      interface was replaced with IDBOpenDBRequest. We switched over for open(), this completes
      the work by switching over for deleteDatabase() and removing the old code. (On the Event
      side we still need to combine IDBVersionChangeEvent and IDBUpgradeNeededEvent.)
      
      Test: storage/indexeddb/intversion-long-queue.html
            storage/indexeddb/intversion-upgrades.html
      
      * CMakeLists.txt: Remove references to deleted code.
      * DerivedSources.make: Ditto.
      * GNUmakefile.list.am: Ditto.
      * Modules/indexeddb/IDBCallbacks.h: Remove unused onBlocked() overload.
      * Modules/indexeddb/IDBDatabase.cpp: Remove references to deleted code.
      * Modules/indexeddb/IDBDatabase.h: Ditto.
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Fire onBlocked with current version.
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal): Don't need to specify source.
      (WebCore::IDBFactory::deleteDatabase): Use an IDBOpenDBRequest.
      * Modules/indexeddb/IDBFactory.h: Change return type of deleteDatabase()
      * Modules/indexeddb/IDBFactory.idl: Ditto.
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::create): Always use a null source.
      (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): Pass null source to base class.
      (WebCore::IDBOpenDBRequest::dispatchEvent): Don't assume result is a database in existing
      special case.
      * Modules/indexeddb/IDBOpenDBRequest.h: Don't need a source argument (always null).
      * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
      * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
      * WebCore.gypi: Remove references to deleted code.
      * WebCore.xcodeproj/project.pbxproj: Remove references to deleted code.
      * dom/EventTarget.h: Remove references to deleted code.
      * dom/EventTargetFactory.in: Ditto.
      
      Source/WebKit/chromium:
      
      * public/WebIDBCallbacks.h: Note to delete onBlocked() once Chromium is cleaned up.
      * src/IDBCallbacksProxy.cpp: Remove unused onBlocked() overload.
      * src/IDBCallbacksProxy.h: Ditto.
      * src/WebIDBCallbacksImpl.cpp: Ditto.
      * src/WebIDBCallbacksImpl.h: Ditto.
      * tests/IDBAbortOnCorruptTest.cpp: Ditto.
      * tests/IDBDatabaseBackendTest.cpp: Ditto.
      
      LayoutTests:
      
      Update expectations - change a handful of FAIL to PASS because past-us were awesome.
      
      * storage/indexeddb/intversion-long-queue-expected.txt:
      * storage/indexeddb/intversion-upgrades-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d57bce8b
  18. 18 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Switch to new createTransaction call · 26393b19
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107311
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Convert frontend callers to use the new backend createTransaction
      call which is the final divorce between the frontend and backend
      transaction objects. This allows an asynchronous call in Chromium
      and allows the front and backend to have their own lifecycle,
      allowing the backend to be cleaned up as soon as a transaction is complete,
      rather than waiting for the JS object to get cleaned up.
      
      No new tests, this is a refactor covered by existing tests.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::commit):
      (WebCore::IDBDatabaseBackendImpl::abort):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
      (WebCore::IDBDatabaseCallbacksImpl::onAbort):
      (WebCore::IDBDatabaseCallbacksImpl::onComplete):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::create):
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::setActive):
      (WebCore::IDBTransaction::abort):
      * Modules/indexeddb/IDBTransaction.h:
      (WebCore):
      (IDBTransaction):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::setCallbacks):
      
      Source/WebKit/chromium:
      
      * public/WebIDBTransaction.h:
      
      Remove an old method that nobody calls.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26393b19
  19. 14 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Remove IDBObjectStore/IndexBackendImpl and support functions · 621a1e38
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106605
      
      Source/WebCore:
      
      Remove all uses of IDBObjectStoreBackendInterface and IDBIndexBackend*,
      as they are no longer used after recent refactoring.
      
      Reviewed by Darin Fisher.
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBCallbacks.h:
      (WebCore):
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::update):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (WebCore):
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBFactoryBackendImpl.h:
      (IDBFactoryBackendImpl):
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      (IDBFactoryBackendInterface):
      * Modules/indexeddb/IDBIndex.cpp:
      * Modules/indexeddb/IDBIndexBackendInterface.h: Removed.
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::add):
      (WebCore::IDBObjectStore::put):
      * Modules/indexeddb/IDBObjectStore.h:
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::makeIndexWriters):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (WebCore::IDBObjectStoreBackendImpl::IndexWriter::IndexWriter):
      (IndexWriter):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Removed.
      * Modules/indexeddb/IDBTransaction.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      (WebCore):
      * Modules/indexeddb/IDBTransactionCoordinator.cpp:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      Remove all references to IDBObjectStoreBackend* and IDBIndexBackend*
      as they no longer exist in WebCore.
      
      Reviewed by Darin Fisher.
      
      * WebKit.gyp:
      * public/WebIDBCallbacks.h:
      (WebKit):
      * public/WebIDBDatabase.h:
      (WebKit):
      (WebKit::WebIDBDatabase::metadata):
      * public/WebIDBFactory.h:
      (WebIDBFactory):
      * public/WebIDBIndex.h: Removed.
      * public/WebIDBObjectStore.h: Removed.
      * public/WebIDBTransaction.h:
      * src/IDBCallbacksProxy.cpp:
      * src/IDBDatabaseBackendProxy.cpp:
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/IDBFactoryBackendProxy.cpp:
      * src/IDBFactoryBackendProxy.h:
      (IDBFactoryBackendProxy):
      * src/IDBIndexBackendProxy.cpp: Removed.
      * src/IDBIndexBackendProxy.h: Removed.
      * src/IDBObjectStoreBackendProxy.cpp: Removed.
      * src/IDBObjectStoreBackendProxy.h: Removed.
      * src/IDBTransactionBackendProxy.cpp:
      * src/IDBTransactionBackendProxy.h:
      (IDBTransactionBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::put):
      (WebKit::WebIDBDatabaseImpl::setIndexKeys):
      * src/WebIDBDatabaseImpl.h:
      (WebKit):
      (WebIDBDatabaseImpl):
      * src/WebIDBFactoryImpl.cpp:
      (WebKit::WebIDBFactoryImpl::getDatabaseNames):
      * src/WebIDBFactoryImpl.h:
      (WebIDBFactoryImpl):
      * src/WebIDBIndexImpl.cpp: Removed.
      * src/WebIDBIndexImpl.h: Removed.
      * src/WebIDBObjectStoreImpl.cpp: Removed.
      * src/WebIDBObjectStoreImpl.h: Removed.
      * src/WebIDBTransactionImpl.cpp:
      * src/WebIDBTransactionImpl.h:
      * tests/IDBAbortOnCorruptTest.cpp:
      (WebCore::TEST):
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      621a1e38
  20. 10 Jan, 2013 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: Allow createIndex/createObjectStore to be asynchronous · 6d7e1488
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106377
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Migrate implementations of createIndex/deleteIndex,
      createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
      so that they can be asynchronous in multi-process ports.
      
      Has the side effect of removing the last consumers of
      IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
      is removed complete and the latter becomes a temporary namespace
      pending a further more mechanical code shuffle.
      
      A key refactoring effect is that the IDBDatabaseBackendImpl
      now contains the authoritative IDBDatabaseMetadata hierarchy,
      and updates to it are consolidated in one place rather than
      scattered across a parallel object tree.
      
      No new tests as this is just refactoring.
      
      * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::IDBBackingStore::getIndexes):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
      * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
      (WebCore):
      * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (DeleteObjectStoreOperation):
      (WebCore::CreateObjectStoreAbortOperation::create):
      (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (CreateObjectStoreAbortOperation):
      (WebCore::DeleteObjectStoreAbortOperation::create):
      (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (DeleteObjectStoreAbortOperation):
      (CreateIndexOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore):
      (DeleteIndexOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (CreateIndexAbortOperation):
      (WebCore::CreateIndexAbortOperation::create):
      (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (DeleteIndexAbortOperation):
      (WebCore::DeleteIndexAbortOperation::create):
      (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::GetOperation::GetOperation):
      (WebCore::IDBDatabaseBackendImpl::addObjectStore):
      (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
      (WebCore::IDBDatabaseBackendImpl::addIndex):
      (WebCore::IDBDatabaseBackendImpl::removeIndex):
      (WebCore::IDBDatabaseBackendImpl::openInternal):
      (WebCore::IDBDatabaseBackendImpl::metadata):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::get):
      (WebCore::IDBDatabaseBackendImpl::put):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::count):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
      (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
      (WebCore::CreateObjectStoreAbortOperation::perform):
      (WebCore::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (WebCore):
      (IDBDatabaseBackendImpl):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
      * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::deleteIndex):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::create):
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (WebCore):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::objectStore):
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::objectStore):
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      Remove this test as it makes no sense once the objectstore/index
      hierarchy is gone.
      
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d7e1488
  21. 18 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      IndexedDB: Implement custom bindings for parsing options · 41e22baa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96614
      
      Patch by Michael Pruett <michael@68k.org> on 2012-12-18
      Reviewed by Darin Adler.
      
      Parsing the options dictionary in IDBDatabase.createObjectStore()
      and IDBObjectStore.createIndex() requires custom bindings in JSC.
      
      Tests: storage/indexeddb/*
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore):
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore):
      * Modules/indexeddb/IDBObjectStore.h:
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStore.idl:
      * UseJSC.cmake:
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
      (WebCore):
      * bindings/js/IDBBindingUtilities.h:
      (WebCore):
      * bindings/js/JSIDBDatabaseCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBDatabase::createObjectStore):
      * bindings/js/JSIDBObjectStoreCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBObjectStore::createIndex):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41e22baa
  22. 07 Dec, 2012 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: propagate transaction_ids through open/upgradeneeded · 7210eac4
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103922
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Make sure front-end is always generating the transaction id,
      so that it can be relied upon as an alternative to the
      to-be-deprecated IDBTransactionBackendInterface pointer.
      
      No new tests, this is one stage in a larger refactor.
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
      (IDBDatabaseBackendImpl::VersionChangeOperation):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
      (IDBDatabaseBackendImpl::PendingOpenCall):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
      (IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::open):
      
      Source/WebKit/chromium:
      
      Update test to account for pre-generated transaction ids.
      
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7210eac4
  23. 05 Dec, 2012 2 commits
    • alecflett@chromium.org's avatar
      IndexedDB: Stub out transaction-backend methods · d653faa0
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103921
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      In preparation for a refactoring. Legacy methods
      will be removed in https://bugs.webkit.org/show_bug.cgi?id=103923.
      
      No new tests, just adding unused methods for refactoring.
      
      * Modules/indexeddb/IDBCallbacks.h:
      (WebCore::IDBCallbacks::onUpgradeNeeded):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::onAbort):
      (WebCore):
      (WebCore::IDBDatabase::onComplete):
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      (WebCore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      (WebCore::IDBDatabaseBackendImpl::commit):
      (WebCore::IDBDatabaseBackendImpl::abort):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBDatabaseCallbacks.h:
      (IDBDatabaseCallbacks):
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
      (WebCore::IDBDatabaseCallbacksImpl::onAbort):
      (WebCore):
      (WebCore::IDBDatabaseCallbacksImpl::onComplete):
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
      (IDBDatabaseCallbacksImpl):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBFactoryBackendImpl.h:
      (WebCore::IDBFactoryBackendImpl::open):
      (IDBFactoryBackendImpl):
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      (IDBFactoryBackendInterface):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
      (WebCore):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      (WebCore):
      * Modules/indexeddb/IDBTransactionCoordinator.h:
      
      Source/WebKit/chromium:
      
      Add new signatures for refactoring, to allow
      transaction_ids to make is through the open/onUpgradeNeeded
      loop.
      
      * public/WebIDBCallbacks.h:
      (WebKit::WebIDBCallbacks::onUpgradeNeeded):
      * public/WebIDBDatabase.h:
      (WebKit::WebIDBDatabase::createTransaction):
      (WebKit::WebIDBDatabase::abort):
      (WebKit::WebIDBDatabase::commit):
      (WebIDBDatabase):
      * public/WebIDBDatabaseCallbacks.h:
      (WebIDBDatabaseCallbacks):
      (WebKit::WebIDBDatabaseCallbacks::onAbort):
      (WebKit::WebIDBDatabaseCallbacks::onComplete):
      * public/WebIDBFactory.h:
      (WebKit::WebIDBFactory::open):
      * src/IDBCallbacksProxy.cpp:
      (WebKit::IDBCallbacksProxy::onUpgradeNeeded):
      (WebKit):
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::createTransaction):
      (WebKit):
      (WebKit::IDBDatabaseBackendProxy::commit):
      (WebKit::IDBDatabaseBackendProxy::abort):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/IDBDatabaseCallbacksProxy.cpp:
      (WebKit::IDBDatabaseCallbacksProxy::onAbort):
      (WebKit):
      (WebKit::IDBDatabaseCallbacksProxy::onComplete):
      * src/IDBDatabaseCallbacksProxy.h:
      (IDBDatabaseCallbacksProxy):
      * src/IDBFactoryBackendProxy.cpp:
      (WebKit::IDBFactoryBackendProxy::open):
      (WebKit):
      * src/IDBFactoryBackendProxy.h:
      (IDBFactoryBackendProxy):
      * src/WebIDBCallbacksImpl.cpp:
      (WebKit::WebIDBCallbacksImpl::onUpgradeNeeded):
      (WebKit):
      * src/WebIDBCallbacksImpl.h:
      (WebIDBCallbacksImpl):
      * src/WebIDBDatabaseCallbacksImpl.cpp:
      (WebKit::WebIDBDatabaseCallbacksImpl::onAbort):
      (WebKit):
      (WebKit::WebIDBDatabaseCallbacksImpl::onComplete):
      * src/WebIDBDatabaseCallbacksImpl.h:
      (WebIDBDatabaseCallbacksImpl):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createTransaction):
      (WebKit):
      (WebKit::WebIDBDatabaseImpl::abort):
      (WebKit::WebIDBDatabaseImpl::commit):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      * src/WebIDBFactoryImpl.cpp:
      (WebKit::WebIDBFactoryImpl::open):
      (WebKit):
      * src/WebIDBFactoryImpl.h:
      (WebIDBFactoryImpl):
      * tests/IDBAbortOnCorruptTest.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d653faa0
    • jsbell@chromium.org's avatar
      IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2) · d7b6d0fb
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103931
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
      ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
      for operations; storage of per-operation data becomes explicit.
      
      No new tests - just a refactor.
      
      * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
      (IDBCursorBackendImpl::CursorIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
      (IDBCursorBackendImpl::CursorAdvanceOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
      (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
      (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
      (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
      (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
      (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
      (IDBDatabaseBackendImpl::VersionChangeOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
      (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
      (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
      (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
      (IDBIndexBackendImpl::OpenIndexCursorOperation):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
      (IDBIndexBackendImpl::IndexCountOperation):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
      (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
      (IDBIndexBackendImpl::IndexValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
      (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
      (IDBKey):
      * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
      (IDBObjectStoreBackendImpl::CreateIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
      (IDBObjectStoreBackendImpl::DeleteIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
      (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
      (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
      (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
      (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore):
      (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::count):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
      * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
      * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
      (IDBRequest):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::taskTimerFired):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (Operation):
      (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::scheduleTask):
      * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
      
      Source/WebKit/chromium:
      
      Now that IDBCallbacks uses real RefPtr<> a mock class needs to be heap allocated.
      
      * tests/IDBAbortOnCorruptTest.cpp:
      (WebCore::MockIDBCallbacks::create):
      (WebCore::MockIDBCallbacks::MockIDBCallbacks):
      (MockIDBCallbacks):
      (WebCore::TEST):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7b6d0fb
  24. 04 Dec, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Correct database version after aborted upgrade · ef0ca77a
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103763
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      After an aborted "versionchange" transaction, the IDBDatabase would fetch a fresh snapshot
      of the metadata from the back end. If the back end had already started a new "versionchange"
      transaction the snapshot would be bogus. Instead, save a copy of the IDBDatabase's metadata
      and roll back to that, as is done for IDBObjectStore.
      
      Tests: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html
             storage/indexeddb/mozilla/versionchange-abort.html
             storage/indexeddb/unblocked-version-changes.html
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::IDBDatabase):
      (WebCore::IDBDatabase::transactionCreated):
      * Modules/indexeddb/IDBDatabase.h:
      (WebCore::IDBDatabase::setMetadata): Let IDBOpenDBRequest and IDBTransaction tinker.
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Fetch new and compute old metadata.
      (WebCore::IDBOpenDBRequest::onSuccess): Fetch new metadata, in case upgrade changed it.
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::create): Stash the old metadata, in case of rollback.
      (WebCore::IDBTransaction::IDBTransaction):
      (WebCore::IDBTransaction::onAbort): Revert the database as well as the stores.
      * Modules/indexeddb/IDBTransaction.h:
      (IDBTransaction):
      
      Source/WebKit/chromium:
      
      Pass previously created proxy along in an open onSuccess, rather than a useless wrapper.
      
      * src/WebIDBCallbacksImpl.cpp:
      (WebKit::WebIDBCallbacksImpl::WebIDBCallbacksImpl):
      (WebKit::WebIDBCallbacksImpl::onSuccess):
      (WebKit::WebIDBCallbacksImpl::onUpgradeNeeded):
      * src/WebIDBCallbacksImpl.h:
      (WebCore):
      (WebIDBCallbacksImpl):
      
      LayoutTests:
      
      Update test expectations and tweak a test so it's testing what it claimed.
      
      * storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt:
      * storage/indexeddb/mozilla/resources/versionchange-abort.js:
      (postAbort):
      * storage/indexeddb/mozilla/versionchange-abort-expected.txt:
      * storage/indexeddb/resources/unblocked-version-changes.js:
      (onUpgradeNeeded):
      * storage/indexeddb/unblocked-version-changes-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef0ca77a
  25. 03 Dec, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Rename exception enum members from UGLY_ERR to PrettyError · e9e60209
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103759
      
      Reviewed by Darin Fisher.
      
      Source/WebCore:
      
      Now that IDBDatabaseException isn't exposed to script with constants, the exception types
      can be renamed to match the much friendlier names used in newer iterations of the spec. Also
      remove the legacy/unused types.
      
      No new tests, just constant renames.
      
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::update):
      (WebCore::IDBCursor::advance):
      (WebCore::IDBCursor::continueFunction):
      (WebCore::IDBCursor::deleteFunction):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::continueFunction):
      (WebCore::IDBCursorBackendImpl::advance):
      (WebCore::IDBCursorBackendImpl::prefetchContinue):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      (WebCore::IDBDatabaseBackendImpl::close):
      * Modules/indexeddb/IDBDatabaseException.cpp: Tidying and renaming.
      (WebCore):
      (WebCore::getErrorEntry):
      * Modules/indexeddb/IDBDatabaseException.h:
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::cmp):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
      (WebCore::IDBFactoryBackendImpl::deleteDatabase):
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::count):
      (WebCore::IDBIndex::openKeyCursor):
      (WebCore::IDBIndex::get):
      (WebCore::IDBIndex::getKey):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      * Modules/indexeddb/IDBKeyRange.cpp:
      (WebCore::IDBKeyRange::only):
      (WebCore::IDBKeyRange::lowerBound):
      (WebCore::IDBKeyRange::upperBound):
      (WebCore::IDBKeyRange::bound):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::get):
      (WebCore::IDBObjectStore::put):
      (WebCore::IDBObjectStore::deleteFunction):
      (WebCore::IDBObjectStore::clear):
      (WebCore):
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::index):
      (WebCore::IDBObjectStore::deleteIndex):
      (WebCore::IDBObjectStore::openCursor):
      (WebCore::IDBObjectStore::count):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore):
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::count):
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::dispatchEvent):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::result):
      (WebCore::IDBRequest::error):
      (WebCore::IDBRequest::errorCode):
      (WebCore::IDBRequest::webkitErrorMessage):
      (WebCore::IDBRequest::abort):
      (WebCore::IDBRequest::dispatchEvent):
      (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::objectStore):
      (WebCore::IDBTransaction::abort):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::objectStore):
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      
      Source/WebKit/chromium:
      
      Update IDBDatabaseException enum names/values to match WebCore.
      
      * public/WebIDBDatabaseException.h:
      * src/AssertMatchingEnums.cpp:
      * src/IDBFactoryBackendProxy.cpp:
      (WebKit::IDBFactoryBackendProxy::allowIndexedDB):
      * tests/IDBRequestTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9e60209
  26. 28 Nov, 2012 1 commit
  27. 27 Nov, 2012 2 commits
    • dgrogan@chromium.org's avatar
      IndexedDB: Remove IDBDatabase.setVersion API · 58f1aeb6
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94972
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      This has been out of the spec for over a year. No other browser has
      implemented it for close to a year.
      
      Tests - removed.html
      
      * Modules/indexeddb/IDBCallbacks.h:
      (IDBCallbacks):
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::IDBDatabase):
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.h:
      
      Source/WebKit/chromium:
      
      * src/IDBCallbacksProxy.cpp:
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      * src/IDBDatabaseBackendProxy.cpp:
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBCallbacksImpl.cpp:
      * src/WebIDBCallbacksImpl.h:
      (WebIDBCallbacksImpl):
      * src/WebIDBDatabaseImpl.cpp:
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      
      LayoutTests:
      
      * storage/indexeddb/removed-expected.txt:
      * storage/indexeddb/resources/removed.js:
      (test):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58f1aeb6
    • alecflett@chromium.org's avatar
      IndexedDB: stub out IDBDatabaseBackendInterface::createTransaction · 34e21655
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102730
      
      Reviewed by Darin Fisher.
      
      Source/WebCore:
      
      Stub out and support passing a 64-bit transaction id
      so the frontend can refer to transactions by id rather than
      a proxy object or a direct pointer reference. This will ultimately
      loosen ownership and lifetime of transactions from the frontend
      and backend.
      
      No new tests, this is just part of a refactor.
      
      * Modules/indexeddb/IDBDatabase.cpp:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore):
      (WebCore::IDBDatabaseBackendImpl::transaction):
      (WebCore::IDBDatabaseBackendImpl::createTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::create):
      (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (IDBTransactionBackendImpl):
      (WebCore::IDBTransactionBackendImpl::id):
      
      Source/WebKit/chromium:
      
      Add support for new createTransaction() method in both sides
      of the WebKit API.
      
      * public/WebIDBDatabase.h:
      (WebIDBDatabase):
      (WebKit::WebIDBDatabase::createTransaction):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit):
      (WebKit::IDBDatabaseBackendProxy::createTransaction):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createTransaction):
      (WebKit):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34e21655
  28. 14 Nov, 2012 2 commits
    • commit-queue@webkit.org's avatar
      IndexedDB: Replace int64 with int64_t · a51a4e72
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102270
      
      Patch by Michael Pruett <michael@68k.org> on 2012-11-14
      Reviewed by Tony Chang.
      
      Cleaning up coding inconsistencies, no change in behavior.
      
      Tests: storage/indexeddb/*
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::deleteObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::putInternal):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a51a4e72
    • jsbell@chromium.org's avatar
      Rename NATIVE_TYPE_ERR to TypeError · 00c51d8c
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102114
      
      Reviewed by Kentaro Hara.
      
      Defines names (mostly) matching WebIDL exception types for use by dom (etc) code.
      V8 binding code had colliding enum members, which required prefixing.
      
      No new tests - just internal renames.
      
      * Modules/indexeddb/IDBCursor.cpp: s/NATIVE_TYPE_ERR/TypeError/g
      (WebCore::IDBCursor::advance):
      (WebCore::IDBCursor::stringToDirection):
      (WebCore::IDBCursor::directionToString):
      * Modules/indexeddb/IDBDatabase.cpp: Ditto.
      (WebCore::IDBDatabase::setVersion):
      * Modules/indexeddb/IDBFactory.cpp: Ditto.
      (WebCore::IDBFactory::open):
      (WebCore::IDBFactory::openInternal):
      (WebCore::IDBFactory::deleteDatabase):
      * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
      (WebCore::IDBObjectStore::createIndex):
      * Modules/indexeddb/IDBTransaction.cpp: Ditto.
      (WebCore::IDBTransaction::stringToMode):
      (WebCore::IDBTransaction::modeToString):
      * bindings/js/JSDOMBinding.cpp: Ditto.
      (WebCore::setDOMException):
      * bindings/v8/DateExtension.cpp: Prefix ErrorType enum/members w/ V8/v8.
      (WebCore::DateExtension::OnSleepDetected):
      * bindings/v8/NPV8Object.cpp: Ditto.
      (_NPN_SetException):
      * bindings/v8/V8Binding.cpp: Ditto.
      (WebCore::throwError):
      (WebCore::handleMaxRecursionDepthExceeded):
      * bindings/v8/V8Binding.h: Ditto.
      (WebCore):
      * bindings/v8/V8NPObject.cpp: Ditto.
      (WebCore::npObjectInvokeImpl):
      (WebCore::npObjectGetProperty):
      (WebCore::npObjectSetProperty):
      (WebCore::npObjectPropertyEnumerator):
      * bindings/v8/V8ThrowException.cpp: Rename ALL the errors!
      (WebCore::V8ThrowException::setDOMException):
      (WebCore::V8ThrowException::throwError):
      (WebCore::V8ThrowException::throwTypeError):
      (WebCore::V8ThrowException::throwNotEnoughArgumentsError):
      * bindings/v8/V8ThrowException.h:
      (V8ThrowException):
      * bindings/v8/WorkerContextExecutionProxy.cpp: Prefixing (continued)
      (WebCore::WorkerContextExecutionProxy::evaluate):
      * bindings/v8/custom/V8ArrayBufferCustom.cpp: Ditto.
      (WebCore::V8ArrayBuffer::constructorCallback):
      * bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto.
      (WebCore::constructWebGLArrayWithArrayBufferArgument):
      (WebCore::constructWebGLArray):
      (WebCore::setWebGLArrayHelper):
      * bindings/v8/custom/V8AudioContextCustom.cpp: Ditto.
      (WebCore::V8AudioContext::constructorCallback):
      * bindings/v8/custom/V8BlobCustom.cpp: Ditto.
      (WebCore::V8Blob::constructorCallback):
      * bindings/v8/custom/V8ClipboardCustom.cpp: Ditto.
      (WebCore::V8Clipboard::clearDataCallback):
      (WebCore::V8Clipboard::setDragImageCallback):
      * bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto.
      (WebCore::V8DOMFormData::appendCallback):
      * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: Ditto.
      (WebCore::V8SQLResultSetRowList::itemCallback):
      * dom/ExceptionCode.h: Add WebIDL exception types.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00c51d8c
  29. 12 Nov, 2012 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: Use sequence<> instead of DOMString[] in IDL · f9ad3f4f
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=100539
      
      Reviewed by Adam Barth.
      
      In the binding layer, DOMString[] is implemented as an alias for DOMStringList.
      WebIDL usage is tending towards sequence<DOMString> anyway for inputs, so switch
      to that. Note webkit.org/b/100537 which requires sequence<String> instead.
      
      Covered by storage/indexeddb/transaction-basics.html and objectstore-basics.html
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction): DOMStringList -> Vector<String>
      * Modules/indexeddb/IDBDatabase.h:
      (WebCore::IDBDatabase::transaction):
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl: DOMString[] -> sequence<String>
      * Modules/indexeddb/IDBObjectStore.cpp: Move trivial impls to header.
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::createIndex):
      * Modules/indexeddb/IDBObjectStore.idl: DOMString[] -> sequence<String>
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9ad3f4f
  30. 09 Nov, 2012 1 commit
    • alecflett@chromium.org's avatar
      IndexedDB: switch frontend to use int64_t-based references · 0e11d584
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=100426
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Remove String-based objectStore/index references, obsoleted by
      https://bugs.webkit.org/show_bug.cgi?id=100425.
      
      No new tests as this is the second half of a refactor.
      
      * Modules/indexeddb/IDBCallbacks.h:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::deleteObjectStore):
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::setVersion):
      (WebCore::IDBDatabaseBackendImpl::transaction):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      * Modules/indexeddb/IDBMetadata.h:
      (WebCore::IDBObjectStoreMetadata::findIndex):
      (IDBObjectStoreMetadata):
      (WebCore::IDBObjectStoreMetadata::containsIndex):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::put):
      (WebCore):
      (WebCore::IDBObjectStore::index):
      (WebCore::IDBObjectStore::deleteIndex):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
      * inspector/Inspector-1.0.json:
      * inspector/Inspector.json:
      * inspector/InspectorIndexedDBAgent.cpp:
      (WebCore):
      (WebCore::InspectorIndexedDBAgent::requestData):
      * inspector/InspectorIndexedDBAgent.h:
      (InspectorIndexedDBAgent):
      
      Source/WebKit/chromium:
      
      Remove implementation stubs from chromium API for
      methods obsoleted by https://bugs.webkit.org/show_bug.cgi?id=100425
      
      * src/IDBObjectStoreBackendProxy.cpp:
      * src/IDBObjectStoreBackendProxy.h:
      (IDBObjectStoreBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      * src/WebIDBObjectStoreImpl.cpp:
      * src/WebIDBObjectStoreImpl.h:
      (WebIDBObjectStoreImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e11d584