<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[198762] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198762">198762</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-03-28 15:49:04 -0700 (Mon, 28 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Remove abstract base classes for all IDB DOM classes.
https://bugs.webkit.org/show_bug.cgi?id=155951

Reviewed by Alex Christensen.

Source/WebCore:

Refactor - No behavior change.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* Modules/indexeddb/IDBAny.cpp:
(WebCore::IDBAny::IDBAny):
(WebCore::IDBAny::~IDBAny):
(WebCore::IDBAny::idbDatabase):
(WebCore::IDBAny::domStringList):
(WebCore::IDBAny::idbCursor):
(WebCore::IDBAny::idbCursorWithValue):
(WebCore::IDBAny::idbFactory):
(WebCore::IDBAny::idbIndex):
(WebCore::IDBAny::idbObjectStore):
(WebCore::IDBAny::idbTransaction):
(WebCore::IDBAny::scriptValue):
(WebCore::IDBAny::integer):
(WebCore::IDBAny::string):
(WebCore::IDBAny::keyPath):
* Modules/indexeddb/IDBAny.h:
(WebCore::IDBAny::create):
(WebCore::IDBAny::createUndefined):
(WebCore::IDBAny::type):
(WebCore::IDBAny::~IDBAny): Deleted.
(WebCore::IDBAny::isLegacy): Deleted.
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::create):
(WebCore::IDBCursor::IDBCursor):
(WebCore::IDBCursor::~IDBCursor):
(WebCore::IDBCursor::sourcesDeleted):
(WebCore::IDBCursor::effectiveObjectStore):
(WebCore::IDBCursor::transaction):
(WebCore::IDBCursor::direction):
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::source):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):
(WebCore::IDBCursor::activeDOMObjectName):
(WebCore::IDBCursor::canSuspendForDocumentSuspension):
(WebCore::IDBCursor::hasPendingActivity):
(WebCore::IDBCursor::decrementOutstandingRequestCount):
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::info):
(WebCore::IDBCursor::setRequest):
(WebCore::IDBCursor::clearRequest):
(WebCore::IDBCursor::request):
(WebCore::IDBCursor::isKeyCursor):
(WebCore::IDBCursor::~IDBCursor): Deleted.
(WebCore::IDBCursor::continueFunction): Deleted.
(WebCore::IDBCursor::isModernCursor): Deleted.
(WebCore::IDBCursor::hasPendingActivity): Deleted.
* Modules/indexeddb/IDBCursorWithValue.cpp:
(WebCore::IDBCursorWithValue::create):
(WebCore::IDBCursorWithValue::IDBCursorWithValue):
(WebCore::IDBCursorWithValue::~IDBCursorWithValue):
* Modules/indexeddb/IDBCursorWithValue.h:
(WebCore::IDBCursorWithValue::~IDBCursorWithValue): Deleted.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::create):
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::~IDBDatabase):
(WebCore::IDBDatabase::hasPendingActivity):
(WebCore::IDBDatabase::name):
(WebCore::IDBDatabase::version):
(WebCore::IDBDatabase::objectStoreNames):
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::close):
(WebCore::IDBDatabase::maybeCloseInServer):
(WebCore::IDBDatabase::activeDOMObjectName):
(WebCore::IDBDatabase::canSuspendForDocumentSuspension):
(WebCore::IDBDatabase::stop):
(WebCore::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBDatabase::didStartTransaction):
(WebCore::IDBDatabase::willCommitTransaction):
(WebCore::IDBDatabase::didCommitTransaction):
(WebCore::IDBDatabase::willAbortTransaction):
(WebCore::IDBDatabase::didAbortTransaction):
(WebCore::IDBDatabase::didCommitOrAbortTransaction):
(WebCore::IDBDatabase::fireVersionChangeEvent):
(WebCore::IDBDatabase::dispatchEvent):
(WebCore::IDBDatabase::didCreateIndexInfo):
(WebCore::IDBDatabase::didDeleteIndexInfo):
* Modules/indexeddb/IDBDatabase.h:
(WebCore::IDBDatabase::info):
(WebCore::IDBDatabase::databaseConnectionIdentifier):
(WebCore::IDBDatabase::serverConnection):
(WebCore::IDBDatabase::isClosingOrClosed):
(WebCore::IDBDatabase::~IDBDatabase): Deleted.
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::shouldThrowSecurityException):
(WebCore::IDBFactory::create):
(WebCore::IDBFactory::IDBFactory):
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBFactory.h:
(WebCore::IDBFactory::~IDBFactory): Deleted.
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::IDBIndex):
(WebCore::IDBIndex::~IDBIndex):
(WebCore::IDBIndex::activeDOMObjectName):
(WebCore::IDBIndex::canSuspendForDocumentSuspension):
(WebCore::IDBIndex::hasPendingActivity):
(WebCore::IDBIndex::name):
(WebCore::IDBIndex::objectStore):
(WebCore::IDBIndex::keyPathAny):
(WebCore::IDBIndex::keyPath):
(WebCore::IDBIndex::unique):
(WebCore::IDBIndex::multiEntry):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::markAsDeleted):
(WebCore::IDBIndex::ref):
(WebCore::IDBIndex::deref):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::info):
(WebCore::IDBIndex::modernObjectStore):
(WebCore::IDBIndex::isDeleted):
(WebCore::IDBIndex::~IDBIndex): Deleted.
(WebCore::IDBIndex::isModern): Deleted.
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::create):
(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::~IDBObjectStore):
(WebCore::IDBObjectStore::activeDOMObjectName):
(WebCore::IDBObjectStore::canSuspendForDocumentSuspension):
(WebCore::IDBObjectStore::hasPendingActivity):
(WebCore::IDBObjectStore::name):
(WebCore::IDBObjectStore::keyPathAny):
(WebCore::IDBObjectStore::keyPath):
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::autoIncrement):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::markAsDeleted):
(WebCore::IDBObjectStore::rollbackInfoForVersionChangeAbort):
(WebCore::IDBObjectStore::visitReferencedIndexes):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::isDeleted):
(WebCore::IDBObjectStore::info):
(WebCore::IDBObjectStore::modernTransaction):
(WebCore::IDBObjectStore::~IDBObjectStore): Deleted.
(WebCore::IDBObjectStore::isModern): Deleted.
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::~IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::onError):
(WebCore::IDBOpenDBRequest::versionChangeTransactionDidFinish):
(WebCore::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
(WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
(WebCore::IDBOpenDBRequest::dispatchEvent):
(WebCore::IDBOpenDBRequest::onSuccess):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBOpenDBRequest::onDeleteDatabaseSuccess):
(WebCore::IDBOpenDBRequest::requestCompleted):
(WebCore::IDBOpenDBRequest::requestBlocked):
* Modules/indexeddb/IDBOpenDBRequest.h:
(WebCore::IDBOpenDBRequest::databaseIdentifier):
(WebCore::IDBOpenDBRequest::version):
(WebCore::IDBOpenDBRequest::~IDBOpenDBRequest): Deleted.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::create):
(WebCore::IDBRequest::createCount):
(WebCore::IDBRequest::createGet):
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::~IDBRequest):
(WebCore::IDBRequest::result):
(WebCore::IDBRequest::errorCode):
(WebCore::IDBRequest::error):
(WebCore::IDBRequest::source):
(WebCore::IDBRequest::setSource):
(WebCore::IDBRequest::setVersionChangeTransaction):
(WebCore::IDBRequest::transaction):
(WebCore::IDBRequest::readyState):
(WebCore::IDBRequest::sourceObjectStoreIdentifier):
(WebCore::IDBRequest::sourceIndexIdentifier):
(WebCore::IDBRequest::requestedIndexRecordType):
(WebCore::IDBRequest::eventTargetInterface):
(WebCore::IDBRequest::activeDOMObjectName):
(WebCore::IDBRequest::canSuspendForDocumentSuspension):
(WebCore::IDBRequest::hasPendingActivity):
(WebCore::IDBRequest::stop):
(WebCore::IDBRequest::enqueueEvent):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::resultCursor):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::requestCompleted):
(WebCore::IDBRequest::onError):
(WebCore::IDBRequest::onSuccess):
* Modules/indexeddb/IDBRequest.h:
(WebCore::IDBRequest::resourceIdentifier):
(WebCore::IDBRequest::connection):
(WebCore::IDBRequest::modernResult):
(WebCore::IDBRequest::pendingCursor):
(WebCore::IDBRequest::requestType):
(WebCore::IDBRequest::isOpenDBRequest):
(WebCore::IDBRequest::~IDBRequest): Deleted.
* Modules/indexeddb/IDBRequestCompletionEvent.cpp:
(WebCore::IDBRequestCompletionEvent::IDBRequestCompletionEvent):
* Modules/indexeddb/IDBRequestCompletionEvent.h:
(WebCore::IDBRequestCompletionEvent::create):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::~IDBTransaction):
(WebCore::IDBTransaction::mode):
(WebCore::IDBTransaction::db):
(WebCore::IDBTransaction::serverConnection):
(WebCore::IDBTransaction::error):
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBTransaction::transitionedToFinishing):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::activeDOMObjectName):
(WebCore::IDBTransaction::canSuspendForDocumentSuspension):
(WebCore::IDBTransaction::hasPendingActivity):
(WebCore::IDBTransaction::stop):
(WebCore::IDBTransaction::isActive):
(WebCore::IDBTransaction::isFinishedOrFinishing):
(WebCore::IDBTransaction::addRequest):
(WebCore::IDBTransaction::removeRequest):
(WebCore::IDBTransaction::scheduleOperation):
(WebCore::IDBTransaction::scheduleOperationTimer):
(WebCore::IDBTransaction::operationTimerFired):
(WebCore::IDBTransaction::commit):
(WebCore::IDBTransaction::commitOnServer):
(WebCore::IDBTransaction::finishAbortOrCommit):
(WebCore::IDBTransaction::didStart):
(WebCore::IDBTransaction::notifyDidAbort):
(WebCore::IDBTransaction::didAbort):
(WebCore::IDBTransaction::didCommit):
(WebCore::IDBTransaction::fireOnComplete):
(WebCore::IDBTransaction::fireOnAbort):
(WebCore::IDBTransaction::enqueueEvent):
(WebCore::IDBTransaction::dispatchEvent):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::createObjectStoreOnServer):
(WebCore::IDBTransaction::didCreateObjectStoreOnServer):
(WebCore::IDBTransaction::createIndex):
(WebCore::IDBTransaction::createIndexOnServer):
(WebCore::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBTransaction::requestOpenCursor):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::openCursorOnServer):
(WebCore::IDBTransaction::didOpenCursorOnServer):
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::iterateCursorOnServer):
(WebCore::IDBTransaction::didIterateCursorOnServer):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestGetValue):
(WebCore::IDBTransaction::requestGetKey):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::getRecordOnServer):
(WebCore::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::getCountOnServer):
(WebCore::IDBTransaction::didGetCountOnServer):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::deleteRecordOnServer):
(WebCore::IDBTransaction::didDeleteRecordOnServer):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::clearObjectStoreOnServer):
(WebCore::IDBTransaction::didClearObjectStoreOnServer):
(WebCore::IDBTransaction::requestPutOrAdd):
(WebCore::IDBTransaction::putOrAddOnServer):
(WebCore::IDBTransaction::didPutOrAddOnServer):
(WebCore::IDBTransaction::deleteObjectStore):
(WebCore::IDBTransaction::deleteObjectStoreOnServer):
(WebCore::IDBTransaction::didDeleteObjectStoreOnServer):
(WebCore::IDBTransaction::deleteIndex):
(WebCore::IDBTransaction::deleteIndexOnServer):
(WebCore::IDBTransaction::didDeleteIndexOnServer):
(WebCore::IDBTransaction::operationDidComplete):
(WebCore::IDBTransaction::establishOnServer):
(WebCore::IDBTransaction::activate):
(WebCore::IDBTransaction::deactivate):
* Modules/indexeddb/IDBTransaction.h:
(WebCore::IDBTransaction::info):
(WebCore::IDBTransaction::database):
(WebCore::IDBTransaction::originalDatabaseInfo):
(WebCore::IDBTransaction::isVersionChange):
(WebCore::IDBTransaction::isReadOnly):
(WebCore::IDBTransaction::isFinished):
(WebCore::TransactionActivator::TransactionActivator):
(WebCore::TransactionActivator::~TransactionActivator):
(WebCore::IDBTransaction::~IDBTransaction): Deleted.
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
(WebCore::IDBVersionChangeEvent::newVersion):
(WebCore::IDBVersionChangeEvent::eventInterface):
(WebCore::IDBVersionChangeEvent::create): Deleted.
* Modules/indexeddb/IDBVersionChangeEvent.h:
(isType):
* Modules/indexeddb/client/IDBAnyImpl.cpp: Removed.
* Modules/indexeddb/client/IDBAnyImpl.h: Removed.
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBCursorImpl.cpp: Removed.
* Modules/indexeddb/client/IDBCursorImpl.h: Removed.
* Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Removed.
* Modules/indexeddb/client/IDBCursorWithValueImpl.h: Removed.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp: Removed.
* Modules/indexeddb/client/IDBDatabaseImpl.h: Removed.
* Modules/indexeddb/client/IDBFactoryImpl.cpp: Removed.
* Modules/indexeddb/client/IDBFactoryImpl.h: Removed.
* Modules/indexeddb/client/IDBIndexImpl.cpp: Removed.
* Modules/indexeddb/client/IDBIndexImpl.h: Removed.
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Removed.
* Modules/indexeddb/client/IDBObjectStoreImpl.h: Removed.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Removed.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Removed.
* Modules/indexeddb/client/IDBRequestImpl.cpp: Removed.
* Modules/indexeddb/client/IDBRequestImpl.h: Removed.
* Modules/indexeddb/client/IDBTransactionImpl.cpp: Removed.
* Modules/indexeddb/client/IDBTransactionImpl.h: Removed.
* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp: Removed.
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed.
* Modules/indexeddb/client/TransactionOperation.cpp:
* Modules/indexeddb/client/TransactionOperation.h:
* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::objectStoreCursor):
(WebCore::IDBCursorInfo::indexCursor):
(WebCore::IDBCursorInfo::IDBCursorInfo):
* Modules/indexeddb/shared/IDBCursorInfo.h:
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
* Modules/indexeddb/shared/InProcessIDBServer.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSIDBCursorCustom.cpp:
(WebCore::JSIDBCursor::visitAdditionalChildren):
* bindings/js/JSIDBCursorWithValueCustom.cpp:
* bindings/js/JSIDBIndexCustom.cpp:
(WebCore::JSIDBIndex::visitAdditionalChildren):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::visitAdditionalChildren):
* inspector/InspectorIndexedDBAgent.cpp:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBAnycpp">trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBAnyh">trunk/Source/WebCore/Modules/indexeddb/IDBAny.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorWithValuecpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorWithValueh">trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryh">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexh">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBOpenDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestCompletionEventcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestCompletionEventh">trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventcpp">trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh">trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientTransactionOperationcpp">trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientTransactionOperationh">trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorWithValueCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorWithValueCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBIndexCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBIndexCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBAnyImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBAnyImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorWithValueImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorWithValueImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBIndexImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -853,18 +853,7 @@
</span><span class="cx">     Modules/indexeddb/IDBVersionChangeEvent.cpp
</span><span class="cx">     Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
</span><span class="cx"> 
</span><del>-    Modules/indexeddb/client/IDBAnyImpl.cpp
</del><span class="cx">     Modules/indexeddb/client/IDBConnectionToServer.cpp
</span><del>-    Modules/indexeddb/client/IDBCursorImpl.cpp
-    Modules/indexeddb/client/IDBCursorWithValueImpl.cpp
-    Modules/indexeddb/client/IDBDatabaseImpl.cpp
-    Modules/indexeddb/client/IDBFactoryImpl.cpp
-    Modules/indexeddb/client/IDBIndexImpl.cpp
-    Modules/indexeddb/client/IDBObjectStoreImpl.cpp
-    Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
-    Modules/indexeddb/client/IDBRequestImpl.cpp
-    Modules/indexeddb/client/IDBTransactionImpl.cpp
-    Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp
</del><span class="cx">     Modules/indexeddb/client/TransactionOperation.cpp
</span><span class="cx"> 
</span><span class="cx">     Modules/indexeddb/server/IDBConnectionToClient.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/ChangeLog        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,3 +1,393 @@
</span><ins>+2016-03-28  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Remove abstract base classes for all IDB DOM classes.
+        https://bugs.webkit.org/show_bug.cgi?id=155951
+
+        Reviewed by Alex Christensen.
+
+        Refactor - No behavior change.
+
+        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+        (WebCore::DOMWindowIndexedDatabase::indexedDB):
+        * Modules/indexeddb/IDBAny.cpp:
+        (WebCore::IDBAny::IDBAny):
+        (WebCore::IDBAny::~IDBAny):
+        (WebCore::IDBAny::idbDatabase):
+        (WebCore::IDBAny::domStringList):
+        (WebCore::IDBAny::idbCursor):
+        (WebCore::IDBAny::idbCursorWithValue):
+        (WebCore::IDBAny::idbFactory):
+        (WebCore::IDBAny::idbIndex):
+        (WebCore::IDBAny::idbObjectStore):
+        (WebCore::IDBAny::idbTransaction):
+        (WebCore::IDBAny::scriptValue):
+        (WebCore::IDBAny::integer):
+        (WebCore::IDBAny::string):
+        (WebCore::IDBAny::keyPath):
+        * Modules/indexeddb/IDBAny.h:
+        (WebCore::IDBAny::create):
+        (WebCore::IDBAny::createUndefined):
+        (WebCore::IDBAny::type):
+        (WebCore::IDBAny::~IDBAny): Deleted.
+        (WebCore::IDBAny::isLegacy): Deleted.
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::create):
+        (WebCore::IDBCursor::IDBCursor):
+        (WebCore::IDBCursor::~IDBCursor):
+        (WebCore::IDBCursor::sourcesDeleted):
+        (WebCore::IDBCursor::effectiveObjectStore):
+        (WebCore::IDBCursor::transaction):
+        (WebCore::IDBCursor::direction):
+        (WebCore::IDBCursor::key):
+        (WebCore::IDBCursor::primaryKey):
+        (WebCore::IDBCursor::value):
+        (WebCore::IDBCursor::source):
+        (WebCore::IDBCursor::update):
+        (WebCore::IDBCursor::advance):
+        (WebCore::IDBCursor::continueFunction):
+        (WebCore::IDBCursor::uncheckedIterateCursor):
+        (WebCore::IDBCursor::deleteFunction):
+        (WebCore::IDBCursor::setGetResult):
+        (WebCore::IDBCursor::activeDOMObjectName):
+        (WebCore::IDBCursor::canSuspendForDocumentSuspension):
+        (WebCore::IDBCursor::hasPendingActivity):
+        (WebCore::IDBCursor::decrementOutstandingRequestCount):
+        * Modules/indexeddb/IDBCursor.h:
+        (WebCore::IDBCursor::info):
+        (WebCore::IDBCursor::setRequest):
+        (WebCore::IDBCursor::clearRequest):
+        (WebCore::IDBCursor::request):
+        (WebCore::IDBCursor::isKeyCursor):
+        (WebCore::IDBCursor::~IDBCursor): Deleted.
+        (WebCore::IDBCursor::continueFunction): Deleted.
+        (WebCore::IDBCursor::isModernCursor): Deleted.
+        (WebCore::IDBCursor::hasPendingActivity): Deleted.
+        * Modules/indexeddb/IDBCursorWithValue.cpp:
+        (WebCore::IDBCursorWithValue::create):
+        (WebCore::IDBCursorWithValue::IDBCursorWithValue):
+        (WebCore::IDBCursorWithValue::~IDBCursorWithValue):
+        * Modules/indexeddb/IDBCursorWithValue.h:
+        (WebCore::IDBCursorWithValue::~IDBCursorWithValue): Deleted.
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::create):
+        (WebCore::IDBDatabase::IDBDatabase):
+        (WebCore::IDBDatabase::~IDBDatabase):
+        (WebCore::IDBDatabase::hasPendingActivity):
+        (WebCore::IDBDatabase::name):
+        (WebCore::IDBDatabase::version):
+        (WebCore::IDBDatabase::objectStoreNames):
+        (WebCore::IDBDatabase::createObjectStore):
+        (WebCore::IDBDatabase::transaction):
+        (WebCore::IDBDatabase::deleteObjectStore):
+        (WebCore::IDBDatabase::close):
+        (WebCore::IDBDatabase::maybeCloseInServer):
+        (WebCore::IDBDatabase::activeDOMObjectName):
+        (WebCore::IDBDatabase::canSuspendForDocumentSuspension):
+        (WebCore::IDBDatabase::stop):
+        (WebCore::IDBDatabase::startVersionChangeTransaction):
+        (WebCore::IDBDatabase::didStartTransaction):
+        (WebCore::IDBDatabase::willCommitTransaction):
+        (WebCore::IDBDatabase::didCommitTransaction):
+        (WebCore::IDBDatabase::willAbortTransaction):
+        (WebCore::IDBDatabase::didAbortTransaction):
+        (WebCore::IDBDatabase::didCommitOrAbortTransaction):
+        (WebCore::IDBDatabase::fireVersionChangeEvent):
+        (WebCore::IDBDatabase::dispatchEvent):
+        (WebCore::IDBDatabase::didCreateIndexInfo):
+        (WebCore::IDBDatabase::didDeleteIndexInfo):
+        * Modules/indexeddb/IDBDatabase.h:
+        (WebCore::IDBDatabase::info):
+        (WebCore::IDBDatabase::databaseConnectionIdentifier):
+        (WebCore::IDBDatabase::serverConnection):
+        (WebCore::IDBDatabase::isClosingOrClosed):
+        (WebCore::IDBDatabase::~IDBDatabase): Deleted.
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::shouldThrowSecurityException):
+        (WebCore::IDBFactory::create):
+        (WebCore::IDBFactory::IDBFactory):
+        (WebCore::IDBFactory::getDatabaseNames):
+        (WebCore::IDBFactory::open):
+        (WebCore::IDBFactory::openInternal):
+        (WebCore::IDBFactory::deleteDatabase):
+        (WebCore::IDBFactory::cmp):
+        * Modules/indexeddb/IDBFactory.h:
+        (WebCore::IDBFactory::~IDBFactory): Deleted.
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::IDBIndex):
+        (WebCore::IDBIndex::~IDBIndex):
+        (WebCore::IDBIndex::activeDOMObjectName):
+        (WebCore::IDBIndex::canSuspendForDocumentSuspension):
+        (WebCore::IDBIndex::hasPendingActivity):
+        (WebCore::IDBIndex::name):
+        (WebCore::IDBIndex::objectStore):
+        (WebCore::IDBIndex::keyPathAny):
+        (WebCore::IDBIndex::keyPath):
+        (WebCore::IDBIndex::unique):
+        (WebCore::IDBIndex::multiEntry):
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::count):
+        (WebCore::IDBIndex::doCount):
+        (WebCore::IDBIndex::openKeyCursor):
+        (WebCore::IDBIndex::get):
+        (WebCore::IDBIndex::doGet):
+        (WebCore::IDBIndex::getKey):
+        (WebCore::IDBIndex::doGetKey):
+        (WebCore::IDBIndex::markAsDeleted):
+        (WebCore::IDBIndex::ref):
+        (WebCore::IDBIndex::deref):
+        * Modules/indexeddb/IDBIndex.h:
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::openKeyCursor):
+        (WebCore::IDBIndex::info):
+        (WebCore::IDBIndex::modernObjectStore):
+        (WebCore::IDBIndex::isDeleted):
+        (WebCore::IDBIndex::~IDBIndex): Deleted.
+        (WebCore::IDBIndex::isModern): Deleted.
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::create):
+        (WebCore::IDBObjectStore::IDBObjectStore):
+        (WebCore::IDBObjectStore::~IDBObjectStore):
+        (WebCore::IDBObjectStore::activeDOMObjectName):
+        (WebCore::IDBObjectStore::canSuspendForDocumentSuspension):
+        (WebCore::IDBObjectStore::hasPendingActivity):
+        (WebCore::IDBObjectStore::name):
+        (WebCore::IDBObjectStore::keyPathAny):
+        (WebCore::IDBObjectStore::keyPath):
+        (WebCore::IDBObjectStore::indexNames):
+        (WebCore::IDBObjectStore::transaction):
+        (WebCore::IDBObjectStore::autoIncrement):
+        (WebCore::IDBObjectStore::openCursor):
+        (WebCore::IDBObjectStore::get):
+        (WebCore::IDBObjectStore::add):
+        (WebCore::IDBObjectStore::put):
+        (WebCore::IDBObjectStore::putForCursorUpdate):
+        (WebCore::IDBObjectStore::putOrAdd):
+        (WebCore::IDBObjectStore::deleteFunction):
+        (WebCore::IDBObjectStore::doDelete):
+        (WebCore::IDBObjectStore::modernDelete):
+        (WebCore::IDBObjectStore::clear):
+        (WebCore::IDBObjectStore::createIndex):
+        (WebCore::IDBObjectStore::index):
+        (WebCore::IDBObjectStore::deleteIndex):
+        (WebCore::IDBObjectStore::count):
+        (WebCore::IDBObjectStore::doCount):
+        (WebCore::IDBObjectStore::markAsDeleted):
+        (WebCore::IDBObjectStore::rollbackInfoForVersionChangeAbort):
+        (WebCore::IDBObjectStore::visitReferencedIndexes):
+        * Modules/indexeddb/IDBObjectStore.h:
+        (WebCore::IDBObjectStore::isDeleted):
+        (WebCore::IDBObjectStore::info):
+        (WebCore::IDBObjectStore::modernTransaction):
+        (WebCore::IDBObjectStore::~IDBObjectStore): Deleted.
+        (WebCore::IDBObjectStore::isModern): Deleted.
+        * Modules/indexeddb/IDBOpenDBRequest.cpp:
+        (WebCore::IDBOpenDBRequest::createDeleteRequest):
+        (WebCore::IDBOpenDBRequest::createOpenRequest):
+        (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
+        (WebCore::IDBOpenDBRequest::~IDBOpenDBRequest):
+        (WebCore::IDBOpenDBRequest::onError):
+        (WebCore::IDBOpenDBRequest::versionChangeTransactionDidFinish):
+        (WebCore::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
+        (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
+        (WebCore::IDBOpenDBRequest::dispatchEvent):
+        (WebCore::IDBOpenDBRequest::onSuccess):
+        (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
+        (WebCore::IDBOpenDBRequest::onDeleteDatabaseSuccess):
+        (WebCore::IDBOpenDBRequest::requestCompleted):
+        (WebCore::IDBOpenDBRequest::requestBlocked):
+        * Modules/indexeddb/IDBOpenDBRequest.h:
+        (WebCore::IDBOpenDBRequest::databaseIdentifier):
+        (WebCore::IDBOpenDBRequest::version):
+        (WebCore::IDBOpenDBRequest::~IDBOpenDBRequest): Deleted.
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::create):
+        (WebCore::IDBRequest::createCount):
+        (WebCore::IDBRequest::createGet):
+        (WebCore::IDBRequest::IDBRequest):
+        (WebCore::IDBRequest::~IDBRequest):
+        (WebCore::IDBRequest::result):
+        (WebCore::IDBRequest::errorCode):
+        (WebCore::IDBRequest::error):
+        (WebCore::IDBRequest::source):
+        (WebCore::IDBRequest::setSource):
+        (WebCore::IDBRequest::setVersionChangeTransaction):
+        (WebCore::IDBRequest::transaction):
+        (WebCore::IDBRequest::readyState):
+        (WebCore::IDBRequest::sourceObjectStoreIdentifier):
+        (WebCore::IDBRequest::sourceIndexIdentifier):
+        (WebCore::IDBRequest::requestedIndexRecordType):
+        (WebCore::IDBRequest::eventTargetInterface):
+        (WebCore::IDBRequest::activeDOMObjectName):
+        (WebCore::IDBRequest::canSuspendForDocumentSuspension):
+        (WebCore::IDBRequest::hasPendingActivity):
+        (WebCore::IDBRequest::stop):
+        (WebCore::IDBRequest::enqueueEvent):
+        (WebCore::IDBRequest::dispatchEvent):
+        (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
+        (WebCore::IDBRequest::setResult):
+        (WebCore::IDBRequest::setResultToStructuredClone):
+        (WebCore::IDBRequest::setResultToUndefined):
+        (WebCore::IDBRequest::resultCursor):
+        (WebCore::IDBRequest::willIterateCursor):
+        (WebCore::IDBRequest::didOpenOrIterateCursor):
+        (WebCore::IDBRequest::requestCompleted):
+        (WebCore::IDBRequest::onError):
+        (WebCore::IDBRequest::onSuccess):
+        * Modules/indexeddb/IDBRequest.h:
+        (WebCore::IDBRequest::resourceIdentifier):
+        (WebCore::IDBRequest::connection):
+        (WebCore::IDBRequest::modernResult):
+        (WebCore::IDBRequest::pendingCursor):
+        (WebCore::IDBRequest::requestType):
+        (WebCore::IDBRequest::isOpenDBRequest):
+        (WebCore::IDBRequest::~IDBRequest): Deleted.
+        * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
+        (WebCore::IDBRequestCompletionEvent::IDBRequestCompletionEvent):
+        * Modules/indexeddb/IDBRequestCompletionEvent.h:
+        (WebCore::IDBRequestCompletionEvent::create):
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::create):
+        (WebCore::IDBTransaction::IDBTransaction):
+        (WebCore::IDBTransaction::~IDBTransaction):
+        (WebCore::IDBTransaction::mode):
+        (WebCore::IDBTransaction::db):
+        (WebCore::IDBTransaction::serverConnection):
+        (WebCore::IDBTransaction::error):
+        (WebCore::IDBTransaction::objectStore):
+        (WebCore::IDBTransaction::abortDueToFailedRequest):
+        (WebCore::IDBTransaction::transitionedToFinishing):
+        (WebCore::IDBTransaction::abort):
+        (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
+        (WebCore::IDBTransaction::activeDOMObjectName):
+        (WebCore::IDBTransaction::canSuspendForDocumentSuspension):
+        (WebCore::IDBTransaction::hasPendingActivity):
+        (WebCore::IDBTransaction::stop):
+        (WebCore::IDBTransaction::isActive):
+        (WebCore::IDBTransaction::isFinishedOrFinishing):
+        (WebCore::IDBTransaction::addRequest):
+        (WebCore::IDBTransaction::removeRequest):
+        (WebCore::IDBTransaction::scheduleOperation):
+        (WebCore::IDBTransaction::scheduleOperationTimer):
+        (WebCore::IDBTransaction::operationTimerFired):
+        (WebCore::IDBTransaction::commit):
+        (WebCore::IDBTransaction::commitOnServer):
+        (WebCore::IDBTransaction::finishAbortOrCommit):
+        (WebCore::IDBTransaction::didStart):
+        (WebCore::IDBTransaction::notifyDidAbort):
+        (WebCore::IDBTransaction::didAbort):
+        (WebCore::IDBTransaction::didCommit):
+        (WebCore::IDBTransaction::fireOnComplete):
+        (WebCore::IDBTransaction::fireOnAbort):
+        (WebCore::IDBTransaction::enqueueEvent):
+        (WebCore::IDBTransaction::dispatchEvent):
+        (WebCore::IDBTransaction::createObjectStore):
+        (WebCore::IDBTransaction::createObjectStoreOnServer):
+        (WebCore::IDBTransaction::didCreateObjectStoreOnServer):
+        (WebCore::IDBTransaction::createIndex):
+        (WebCore::IDBTransaction::createIndexOnServer):
+        (WebCore::IDBTransaction::didCreateIndexOnServer):
+        (WebCore::IDBTransaction::requestOpenCursor):
+        (WebCore::IDBTransaction::doRequestOpenCursor):
+        (WebCore::IDBTransaction::openCursorOnServer):
+        (WebCore::IDBTransaction::didOpenCursorOnServer):
+        (WebCore::IDBTransaction::iterateCursor):
+        (WebCore::IDBTransaction::iterateCursorOnServer):
+        (WebCore::IDBTransaction::didIterateCursorOnServer):
+        (WebCore::IDBTransaction::requestGetRecord):
+        (WebCore::IDBTransaction::requestGetValue):
+        (WebCore::IDBTransaction::requestGetKey):
+        (WebCore::IDBTransaction::requestIndexRecord):
+        (WebCore::IDBTransaction::getRecordOnServer):
+        (WebCore::IDBTransaction::didGetRecordOnServer):
+        (WebCore::IDBTransaction::requestCount):
+        (WebCore::IDBTransaction::getCountOnServer):
+        (WebCore::IDBTransaction::didGetCountOnServer):
+        (WebCore::IDBTransaction::requestDeleteRecord):
+        (WebCore::IDBTransaction::deleteRecordOnServer):
+        (WebCore::IDBTransaction::didDeleteRecordOnServer):
+        (WebCore::IDBTransaction::requestClearObjectStore):
+        (WebCore::IDBTransaction::clearObjectStoreOnServer):
+        (WebCore::IDBTransaction::didClearObjectStoreOnServer):
+        (WebCore::IDBTransaction::requestPutOrAdd):
+        (WebCore::IDBTransaction::putOrAddOnServer):
+        (WebCore::IDBTransaction::didPutOrAddOnServer):
+        (WebCore::IDBTransaction::deleteObjectStore):
+        (WebCore::IDBTransaction::deleteObjectStoreOnServer):
+        (WebCore::IDBTransaction::didDeleteObjectStoreOnServer):
+        (WebCore::IDBTransaction::deleteIndex):
+        (WebCore::IDBTransaction::deleteIndexOnServer):
+        (WebCore::IDBTransaction::didDeleteIndexOnServer):
+        (WebCore::IDBTransaction::operationDidComplete):
+        (WebCore::IDBTransaction::establishOnServer):
+        (WebCore::IDBTransaction::activate):
+        (WebCore::IDBTransaction::deactivate):
+        * Modules/indexeddb/IDBTransaction.h:
+        (WebCore::IDBTransaction::info):
+        (WebCore::IDBTransaction::database):
+        (WebCore::IDBTransaction::originalDatabaseInfo):
+        (WebCore::IDBTransaction::isVersionChange):
+        (WebCore::IDBTransaction::isReadOnly):
+        (WebCore::IDBTransaction::isFinished):
+        (WebCore::TransactionActivator::TransactionActivator):
+        (WebCore::TransactionActivator::~TransactionActivator):
+        (WebCore::IDBTransaction::~IDBTransaction): Deleted.
+        * Modules/indexeddb/IDBVersionChangeEvent.cpp:
+        (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
+        (WebCore::IDBVersionChangeEvent::newVersion):
+        (WebCore::IDBVersionChangeEvent::eventInterface):
+        (WebCore::IDBVersionChangeEvent::create): Deleted.
+        * Modules/indexeddb/IDBVersionChangeEvent.h:
+        (isType):
+        * Modules/indexeddb/client/IDBAnyImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBAnyImpl.h: Removed.
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        * Modules/indexeddb/client/IDBCursorImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBCursorImpl.h: Removed.
+        * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBCursorWithValueImpl.h: Removed.
+        * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBDatabaseImpl.h: Removed.
+        * Modules/indexeddb/client/IDBFactoryImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBFactoryImpl.h: Removed.
+        * Modules/indexeddb/client/IDBIndexImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBIndexImpl.h: Removed.
+        * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBObjectStoreImpl.h: Removed.
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Removed.
+        * Modules/indexeddb/client/IDBRequestImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBRequestImpl.h: Removed.
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBTransactionImpl.h: Removed.
+        * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp: Removed.
+        * Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed.
+        * Modules/indexeddb/client/TransactionOperation.cpp:
+        * Modules/indexeddb/client/TransactionOperation.h:
+        * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+        (WebCore::IDBCursorInfo::objectStoreCursor):
+        (WebCore::IDBCursorInfo::indexCursor):
+        (WebCore::IDBCursorInfo::IDBCursorInfo):
+        * Modules/indexeddb/shared/IDBCursorInfo.h:
+        * Modules/indexeddb/shared/IDBRequestData.cpp:
+        (WebCore::IDBRequestData::IDBRequestData):
+        * Modules/indexeddb/shared/IDBRequestData.h:
+        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
+        (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
+        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
+        * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
+        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+        * Modules/indexeddb/shared/InProcessIDBServer.h:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSIDBCursorCustom.cpp:
+        (WebCore::JSIDBCursor::visitAdditionalChildren):
+        * bindings/js/JSIDBCursorWithValueCustom.cpp:
+        * bindings/js/JSIDBIndexCustom.cpp:
+        (WebCore::JSIDBIndex::visitAdditionalChildren):
+        * bindings/js/JSIDBObjectStoreCustom.cpp:
+        (WebCore::JSIDBObjectStore::visitAdditionalChildren):
+        * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2016-03-28  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [RTL Scrollbars] Position:sticky can be positioned under vertical RTL scrollbar
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;DatabaseProvider.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><del>-#include &quot;IDBFactoryImpl.h&quot;
</del><ins>+#include &quot;IDBFactory.h&quot;
</ins><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (!m_idbFactory)
</span><del>-        m_idbFactory = IDBClient::IDBFactory::create(page-&gt;idbConnection());
</del><ins>+        m_idbFactory = IDBFactory::create(page-&gt;idbConnection());
</ins><span class="cx"> 
</span><span class="cx">     return m_idbFactory.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,12 +28,131 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMStringList.h&quot;
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBFactory.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBTransaction.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBAny::IDBAny()
</del><ins>+IDBAny::IDBAny(IDBAny::Type type)
+    : m_type(type)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBAny::IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
+    : m_type(IDBAny::Type::IDBDatabase)
+    , m_database(WTFMove(database))
+{
+}
+
+IDBAny::IDBAny(Ref&lt;IDBObjectStore&gt;&amp;&amp; objectStore)
+    : m_type(IDBAny::Type::IDBObjectStore)
+    , m_objectStore(WTFMove(objectStore))
+{
+}
+
+IDBAny::IDBAny(Ref&lt;IDBIndex&gt;&amp;&amp; index)
+    : m_type(IDBAny::Type::IDBIndex)
+    , m_index(WTFMove(index))
+{
+}
+
+IDBAny::IDBAny(Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
+{
+    if (cursor-&gt;isKeyCursor()) {
+        m_type = IDBAny::Type::IDBCursor;
+        m_cursor = WTFMove(cursor);
+    } else {
+        m_type = IDBAny::Type::IDBCursorWithValue;
+        m_cursorWithValue = static_cast&lt;IDBCursorWithValue*&gt;(&amp;cursor.get());
+    }
+}
+
+IDBAny::IDBAny(const IDBKeyPath&amp; keyPath)
+    : m_type(IDBAny::Type::KeyPath)
+    , m_idbKeyPath(keyPath)
+{
+}
+
+IDBAny::IDBAny(const Deprecated::ScriptValue&amp; value)
+    : m_type(IDBAny::Type::ScriptValue)
+    , m_scriptValue(value)
+{
+}
+
+IDBAny::~IDBAny()
+{
+}
+
+RefPtr&lt;IDBDatabase&gt; IDBAny::idbDatabase()
+{
+    ASSERT(m_type == IDBAny::Type::IDBDatabase);
+    return m_database.get();
+}
+
+RefPtr&lt;DOMStringList&gt; IDBAny::domStringList()
+{
+    return nullptr;
+}
+
+RefPtr&lt;IDBCursor&gt; IDBAny::idbCursor()
+{
+    ASSERT(m_type == IDBAny::Type::IDBCursor || m_type == IDBAny::Type::IDBCursorWithValue);
+    return m_cursor ? m_cursor.get() : m_cursorWithValue.get();
+}
+
+RefPtr&lt;IDBCursorWithValue&gt; IDBAny::idbCursorWithValue()
+{
+    ASSERT(m_type == IDBAny::Type::IDBCursorWithValue);
+    return m_cursorWithValue.get();
+}
+
+RefPtr&lt;IDBFactory&gt; IDBAny::idbFactory()
+{
+    return nullptr;
+}
+
+RefPtr&lt;IDBIndex&gt; IDBAny::idbIndex()
+{
+    ASSERT(m_type == IDBAny::Type::IDBIndex);
+    return m_index.get();
+}
+
+RefPtr&lt;IDBObjectStore&gt; IDBAny::idbObjectStore()
+{
+    ASSERT(m_type == IDBAny::Type::IDBObjectStore);
+    return m_objectStore.get();
+}
+
+RefPtr&lt;IDBTransaction&gt; IDBAny::idbTransaction()
+{
+    return nullptr;
+}
+
+const Deprecated::ScriptValue&amp; IDBAny::scriptValue()
+{
+    return m_scriptValue;
+}
+
+int64_t IDBAny::integer()
+{
+    return m_integer;
+}
+
+const String&amp; IDBAny::string()
+{
+    return m_string;
+}
+
+const IDBKeyPath&amp; IDBAny::keyPath()
+{
+    return m_idbKeyPath;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBAny_h
-#define IDBAny_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="lines">@@ -32,8 +31,6 @@
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><span class="cx"> #include &lt;bindings/ScriptValue.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><del>-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -43,14 +40,48 @@
</span><span class="cx"> class IDBDatabase;
</span><span class="cx"> class IDBFactory;
</span><span class="cx"> class IDBIndex;
</span><del>-class IDBKeyPath;
</del><span class="cx"> class IDBObjectStore;
</span><span class="cx"> class IDBTransaction;
</span><span class="cx"> 
</span><span class="cx"> class IDBAny : public ScriptWrappable, public RefCounted&lt;IDBAny&gt; {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBAny() { }
</del><ins>+    static RefPtr&lt;IDBAny&gt; create(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
+    {
+        return adoptRef(new IDBAny(WTFMove(database)));
+    }
</ins><span class="cx"> 
</span><ins>+    static Ref&lt;IDBAny&gt; create(Ref&lt;IDBObjectStore&gt;&amp;&amp; objectStore)
+    {
+        return adoptRef(*new IDBAny(WTFMove(objectStore)));
+    }
+
+    static Ref&lt;IDBAny&gt; create(Ref&lt;IDBIndex&gt;&amp;&amp; index)
+    {
+        return adoptRef(*new IDBAny(WTFMove(index)));
+    }
+
+    static RefPtr&lt;IDBAny&gt; create(Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
+    {
+        return adoptRef(new IDBAny(WTFMove(cursor)));
+    }
+
+    static RefPtr&lt;IDBAny&gt; create(const IDBKeyPath&amp; keyPath)
+    {
+        return adoptRef(new IDBAny(keyPath));
+    }
+
+    static RefPtr&lt;IDBAny&gt; create(const Deprecated::ScriptValue&amp; value)
+    {
+        return adoptRef(new IDBAny(value));
+    }
+
+    static RefPtr&lt;IDBAny&gt; createUndefined()
+    {
+        return adoptRef(new IDBAny(IDBAny::Type::Undefined));
+    }
+
+    virtual ~IDBAny();
+
</ins><span class="cx">     enum class Type {
</span><span class="cx">         Undefined = 0,
</span><span class="cx">         Null,
</span><span class="lines">@@ -68,30 +99,42 @@
</span><span class="cx">         KeyPath,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    // FIXME: This is a temporary hack to allow casts in WebInspector code while Modern IDB and Legacy IDB live side-by-side.
-    // It should be removed when the legacy implementation is removed as part of https://bugs.webkit.org/show_bug.cgi?id=149117
-    virtual bool isLegacy() const { return false; }
</del><ins>+    Type type() const { return m_type; }
+    RefPtr&lt;DOMStringList&gt; domStringList();
+    RefPtr&lt;IDBCursor&gt; idbCursor();
+    RefPtr&lt;IDBCursorWithValue&gt; idbCursorWithValue();
+    RefPtr&lt;IDBDatabase&gt; idbDatabase();
+    RefPtr&lt;IDBFactory&gt; idbFactory();
+    RefPtr&lt;IDBIndex&gt; idbIndex();
+    RefPtr&lt;IDBObjectStore&gt; idbObjectStore();
+    RefPtr&lt;IDBTransaction&gt; idbTransaction();
+    const Deprecated::ScriptValue&amp; scriptValue();
+    int64_t integer();
+    const String&amp; string();
+    const IDBKeyPath&amp; keyPath();
</ins><span class="cx"> 
</span><del>-    virtual Type type() const = 0;
-    virtual RefPtr&lt;DOMStringList&gt; domStringList() = 0;
-    virtual RefPtr&lt;IDBCursor&gt; idbCursor() = 0;
-    virtual RefPtr&lt;IDBCursorWithValue&gt; idbCursorWithValue() = 0;
-    virtual RefPtr&lt;IDBDatabase&gt; idbDatabase() = 0;
-    virtual RefPtr&lt;IDBFactory&gt; idbFactory() = 0;
-    virtual RefPtr&lt;IDBIndex&gt; idbIndex() = 0;
-    virtual RefPtr&lt;IDBObjectStore&gt; idbObjectStore() = 0;
-    virtual RefPtr&lt;IDBTransaction&gt; idbTransaction() = 0;
-    virtual const Deprecated::ScriptValue&amp; scriptValue() = 0;
-    virtual int64_t integer() = 0;
-    virtual const String&amp; string() = 0;
-    virtual const IDBKeyPath&amp; keyPath() = 0;
</del><ins>+private:
+    explicit IDBAny(IDBAny::Type);
+    explicit IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp;);
+    explicit IDBAny(Ref&lt;IDBObjectStore&gt;&amp;&amp;);
+    explicit IDBAny(Ref&lt;IDBIndex&gt;&amp;&amp;);
+    explicit IDBAny(Ref&lt;IDBCursor&gt;&amp;&amp;);
+    explicit IDBAny(const IDBKeyPath&amp;);
+    explicit IDBAny(const Deprecated::ScriptValue&amp;);
</ins><span class="cx"> 
</span><del>-protected:
-    IDBAny();
</del><ins>+    IDBAny::Type m_type { IDBAny::Type::Undefined };
+    RefPtr&lt;IDBDatabase&gt; m_database;
+    RefPtr&lt;IDBObjectStore&gt; m_objectStore;
+    RefPtr&lt;IDBIndex&gt; m_index;
+    RefPtr&lt;IDBCursor&gt; m_cursor;
+    RefPtr&lt;IDBCursorWithValue&gt; m_cursorWithValue;
+
+    const IDBKeyPath m_idbKeyPath;
+    const Deprecated::ScriptValue m_scriptValue;
+    const String m_string;
+    const int64_t m_integer { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // IDBAny_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,15 +28,20 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMRequestState.h&quot;
</ins><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><ins>+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBGetResult.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
</ins><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBCursor::IDBCursor()
-{
-}
-
</del><span class="cx"> const AtomicString&amp; IDBCursor::directionNext()
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;AtomicString&gt; next(&quot;next&quot;, AtomicString::ConstructFromLiteral);
</span><span class="lines">@@ -97,6 +102,348 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBCursor&gt; IDBCursor::create(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
+{
+    return adoptRef(*new IDBCursor(transaction, index, info));
+}
+
+IDBCursor::IDBCursor(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
+    : ActiveDOMObject(transaction.scriptExecutionContext())
+    , m_info(info)
+    , m_source(IDBAny::create(objectStore).leakRef())
+    , m_objectStore(&amp;objectStore)
+{
+    suspendIfNeeded();
+}
+
+IDBCursor::IDBCursor(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
+    : ActiveDOMObject(transaction.scriptExecutionContext())
+    , m_info(info)
+    , m_source(IDBAny::create(index).leakRef())
+    , m_index(&amp;index)
+{
+    suspendIfNeeded();
+}
+
+IDBCursor::~IDBCursor()
+{
+}
+
+bool IDBCursor::sourcesDeleted() const
+{
+    if (m_objectStore)
+        return m_objectStore-&gt;isDeleted();
+
+    ASSERT(m_index);
+    return m_index-&gt;isDeleted() || m_index-&gt;modernObjectStore().isDeleted();
+}
+
+IDBObjectStore&amp; IDBCursor::effectiveObjectStore() const
+{
+    if (m_objectStore)
+        return *m_objectStore;
+
+    ASSERT(m_index);
+    return m_index-&gt;modernObjectStore();
+}
+
+IDBTransaction&amp; IDBCursor::transaction() const
+{
+    return effectiveObjectStore().modernTransaction();
+}
+
+const String&amp; IDBCursor::direction() const
+{
+    return IDBCursor::directionToString(m_info.cursorDirection());
+}
+
+const Deprecated::ScriptValue&amp; IDBCursor::key() const
+{
+    return m_deprecatedCurrentKey;
+}
+
+const Deprecated::ScriptValue&amp; IDBCursor::primaryKey() const
+{
+    return m_deprecatedCurrentPrimaryKey;
+}
+
+const Deprecated::ScriptValue&amp; IDBCursor::value() const
+{
+    return m_deprecatedCurrentValue;
+}
+
+IDBAny* IDBCursor::source()
+{
+    return &amp;m_source.get();
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::update(JSC::ExecState&amp; exec, Deprecated::ScriptValue&amp; value, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBCursor::update&quot;);
+
+    if (sourcesDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!transaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (transaction().isReadOnly()) {
+        ec.code = IDBDatabaseException::ReadOnlyError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.&quot;);
+        return nullptr;
+    }
+
+    if (!m_gotValue) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
+        return nullptr;
+    }
+
+    if (isKeyCursor()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.&quot;);
+        return nullptr;
+    }
+
+    auto&amp; objectStore = effectiveObjectStore();
+    auto&amp; keyPath = objectStore.info().keyPath();
+    const bool usesInLineKeys = !keyPath.isNull();
+    if (usesInLineKeys) {
+        RefPtr&lt;IDBKey&gt; keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(exec, value, keyPath);
+        IDBKeyData keyPathKeyData(keyPathKey.get());
+        if (!keyPathKey || keyPathKeyData != m_currentPrimaryKeyData) {
+            ec.code = IDBDatabaseException::DataError;
+            ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.&quot;);
+            return nullptr;
+        }
+    }
+
+    auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_deprecatedCurrentPrimaryKey.jsValue(), ec);
+    if (ec.code)
+        return nullptr;
+
+    ASSERT(request);
+    request-&gt;setSource(*this);
+    ++m_outstandingRequestCount;
+
+    return request;
+}
+
+void IDBCursor::advance(unsigned long count, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBCursor::advance&quot;);
+
+    if (!m_request) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+    
+    if (!count) {
+        ec.code = TypeError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.&quot;);
+        return;
+    }
+
+    if (sourcesDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
+        return;
+    }
+
+    if (!transaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.&quot;);
+        return;
+    }
+
+    if (!m_gotValue) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
+        return;
+    }
+
+    m_gotValue = false;
+
+    uncheckedIterateCursor(IDBKeyData(), count);
+}
+
+void IDBCursor::continueFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp; ec)
+{
+    continueFunction(IDBKeyData(), ec);
+}
+
+void IDBCursor::continueFunction(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCodeWithMessage&amp; ec)
+{
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; key;
+    if (!keyValue.jsValue().isUndefined())
+        key = scriptValueToIDBKey(&amp;requestState, keyValue);
+
+    continueFunction(key.get(), ec);
+}
+
+void IDBCursor::continueFunction(const IDBKeyData&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBCursor::continueFunction (to key %s)&quot;, key.loggingString().utf8().data());
+
+    if (!m_request) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+
+    if (sourcesDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
+        return;
+    }
+
+    if (!transaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.&quot;);
+        return;
+    }
+
+    if (!m_gotValue) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
+        return;
+    }
+
+    if (!key.isNull() &amp;&amp; !key.isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key.&quot;);
+        return;
+    }
+
+    if (m_info.isDirectionForward()) {
+        if (!key.isNull() &amp;&amp; key.compare(m_currentKeyData) &lt;= 0) {
+            ec.code = IDBDatabaseException::DataError;
+            ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.&quot;);
+            return;
+        }
+    } else if (!key.isNull() &amp;&amp; key.compare(m_currentKeyData) &gt;= 0) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.&quot;);
+        return;
+    }
+
+    m_gotValue = false;
+
+    uncheckedIterateCursor(key, 0);
+}
+
+void IDBCursor::uncheckedIterateCursor(const IDBKeyData&amp; key, unsigned long count)
+{
+    ++m_outstandingRequestCount;
+
+    m_request-&gt;willIterateCursor(*this);
+    transaction().iterateCursor(*this, key, count);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::deleteFunction(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBCursor::deleteFunction&quot;);
+
+    if (sourcesDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!transaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (transaction().isReadOnly()) {
+        ec.code = IDBDatabaseException::ReadOnlyError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.&quot;);
+        return nullptr;
+    }
+
+    if (!m_gotValue) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
+        return nullptr;
+    }
+
+    if (isKeyCursor()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.&quot;);
+        return nullptr;
+    }
+
+    auto request = effectiveObjectStore().modernDelete(context, m_deprecatedCurrentPrimaryKey.jsValue(), ec);
+    if (ec.code)
+        return nullptr;
+
+    ASSERT(request);
+    request-&gt;setSource(*this);
+    ++m_outstandingRequestCount;
+
+    return request;
+}
+
+void IDBCursor::setGetResult(IDBRequest&amp; request, const IDBGetResult&amp; getResult)
+{
+    LOG(IndexedDB, &quot;IDBCursor::setGetResult - current key %s&quot;, getResult.keyData().loggingString().substring(0, 100).utf8().data());
+
+    auto* context = request.scriptExecutionContext();
+    if (!context)
+        return;
+
+    if (!getResult.isDefined()) {
+        m_deprecatedCurrentKey = { };
+        m_currentKeyData = { };
+        m_deprecatedCurrentPrimaryKey = { };
+        m_currentPrimaryKeyData = { };
+        m_deprecatedCurrentValue = { };
+
+        m_gotValue = false;
+        return;
+    }
+
+    m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
+    m_currentKeyData = getResult.keyData();
+    m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
+    m_currentPrimaryKeyData = getResult.primaryKeyData();
+
+    if (isKeyCursor())
+        m_deprecatedCurrentValue = { };
+    else
+        m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.valueBuffer());
+
+    m_gotValue = true;
+}
+
+const char* IDBCursor::activeDOMObjectName() const
+{
+    return &quot;IDBCursor&quot;;
+}
+
+bool IDBCursor::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+bool IDBCursor::hasPendingActivity() const
+{
+    return m_outstandingRequestCount;
+}
+
+void IDBCursor::decrementOutstandingRequestCount()
+{
+    ASSERT(m_outstandingRequestCount);
+    --m_outstandingRequestCount;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,31 +23,27 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBCursor_h
-#define IDBCursor_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBKey.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;IndexedDB.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;bindings/ScriptValue.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
</del><ins>+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBCursorInfo.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class DOMRequestState;
</del><span class="cx"> class IDBAny;
</span><del>-class IDBCallbacks;
-class IDBRequest;
-class ScriptExecutionContext;
</del><ins>+class IDBGetResult;
+class IDBIndex;
+class IDBObjectStore;
+class IDBTransaction;
</ins><span class="cx"> 
</span><del>-struct ExceptionCodeWithMessage;
</del><ins>+class IDBCursor : public ScriptWrappable, public RefCounted&lt;IDBCursor&gt;, public ActiveDOMObject {
+public:
+    static Ref&lt;IDBCursor&gt; create(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</ins><span class="cx"> 
</span><del>-class IDBCursor : public ScriptWrappable, public RefCounted&lt;IDBCursor&gt; {
-public:
</del><span class="cx">     static const AtomicString&amp; directionNext();
</span><span class="cx">     static const AtomicString&amp; directionNextUnique();
</span><span class="cx">     static const AtomicString&amp; directionPrev();
</span><span class="lines">@@ -55,39 +51,73 @@
</span><span class="cx"> 
</span><span class="cx">     static IndexedDB::CursorDirection stringToDirection(const String&amp; modeString, ExceptionCode&amp;);
</span><span class="cx">     static const AtomicString&amp; directionToString(IndexedDB::CursorDirection mode);
</span><ins>+    
+    virtual ~IDBCursor();
</ins><span class="cx"> 
</span><del>-    virtual ~IDBCursor() { }
-
</del><span class="cx">     // Implement the IDL
</span><del>-    virtual const String&amp; direction() const = 0;
-    virtual const Deprecated::ScriptValue&amp; key() const = 0;
-    virtual const Deprecated::ScriptValue&amp; primaryKey() const = 0;
-    virtual const Deprecated::ScriptValue&amp; value() const = 0;
-    virtual IDBAny* source() = 0;
</del><ins>+    const String&amp; direction() const;
+    const Deprecated::ScriptValue&amp; key() const;
+    const Deprecated::ScriptValue&amp; primaryKey() const;
+    const Deprecated::ScriptValue&amp; value() const;
+    IDBAny* source();
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; update(JSC::ExecState&amp;, Deprecated::ScriptValue&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual void advance(unsigned long, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;WebCore::IDBRequest&gt; update(JSC::ExecState&amp;, Deprecated::ScriptValue&amp;, ExceptionCodeWithMessage&amp;);
+    void advance(unsigned long, ExceptionCodeWithMessage&amp;);
+    void continueFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
+    void continueFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;WebCore::IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    // FIXME: We should not need that method (taking a ScriptExecutionContext pointer and not a reference)
-    // but InspectorIndexedDBAgent wants to call it with a null context. 
-    virtual void continueFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&amp;) = 0;
-    // FIXME: Try to modify the code generator so this overload is unneeded.
-    void continueFunction(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec) { continueFunction(&amp;context, ec); }
-    virtual void continueFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    void continueFunction(const IDBKeyData&amp;, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual bool isKeyCursor() const = 0;
</del><ins>+    const IDBCursorInfo&amp; info() const { return m_info; }
</ins><span class="cx"> 
</span><del>-    virtual bool isModernCursor() const { return false; }
</del><ins>+    void setRequest(IDBRequest&amp; request) { m_request = &amp;request; }
+    void clearRequest() { m_request = nullptr; }
+    IDBRequest* request() { return m_request; }
</ins><span class="cx"> 
</span><del>-    virtual bool hasPendingActivity() const { return false; }
</del><ins>+    void setGetResult(IDBRequest&amp;, const IDBGetResult&amp;);
</ins><span class="cx"> 
</span><ins>+    virtual bool isKeyCursor() const { return true; }
+
+    void decrementOutstandingRequestCount();
+
+    // ActiveDOMObject.
+    const char* activeDOMObjectName() const;
+    bool canSuspendForDocumentSuspension() const;
+    bool hasPendingActivity() const;
+
</ins><span class="cx"> protected:
</span><del>-    IDBCursor();
</del><ins>+    IDBCursor(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
+    IDBCursor(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
+
+private:
+    // Cursors are created with an outstanding iteration request.
+    unsigned m_outstandingRequestCount { 1 };
+
+    IDBCursorInfo m_info;
+    Ref&lt;IDBAny&gt; m_source;
+    IDBObjectStore* m_objectStore { nullptr };
+    IDBIndex* m_index { nullptr };
+    IDBRequest* m_request;
+
+    bool sourcesDeleted() const;
+    IDBObjectStore&amp; effectiveObjectStore() const;
+    IDBTransaction&amp; transaction() const;
+
+    void uncheckedIterateCursor(const IDBKeyData&amp;, unsigned long count);
+
+    bool m_gotValue { false };
+
+    IDBKeyData m_currentKeyData;
+    IDBKeyData m_currentPrimaryKeyData;
+
+    // FIXME: When ditching Legacy IDB and combining this implementation with the abstract IDBCursor,
+    // these Deprecated::ScriptValue members should be JSValues instead.
+    Deprecated::ScriptValue m_deprecatedCurrentKey;
+    Deprecated::ScriptValue m_deprecatedCurrentPrimaryKey;
+    Deprecated::ScriptValue m_deprecatedCurrentValue;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // IDBCursor_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -30,10 +30,30 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBCursorWithValue::IDBCursorWithValue()
</del><ins>+Ref&lt;IDBCursorWithValue&gt; IDBCursorWithValue::create(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
</ins><span class="cx"> {
</span><ins>+    return adoptRef(*new IDBCursorWithValue(transaction, objectStore, info));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBCursorWithValue&gt; IDBCursorWithValue::create(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
+{
+    return adoptRef(*new IDBCursorWithValue(transaction, index, info));
+}
+
+IDBCursorWithValue::IDBCursorWithValue(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
+    : IDBCursor(transaction, objectStore, info)
+{
+}
+
+IDBCursorWithValue::IDBCursorWithValue(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
+    : IDBCursor(transaction, index, info)
+{
+}
+
+IDBCursorWithValue::~IDBCursorWithValue()
+{
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBCursorWithValue_h
-#define IDBCursorWithValue_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="lines">@@ -34,14 +33,18 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBCursorWithValue : public IDBCursor {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBCursorWithValue() { }
</del><ins>+    static Ref&lt;IDBCursorWithValue&gt; create(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
+    static Ref&lt;IDBCursorWithValue&gt; create(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</ins><span class="cx"> 
</span><del>-protected:
-    IDBCursorWithValue();
</del><ins>+    virtual ~IDBCursorWithValue();
+
+    bool isKeyCursor() const final { return false; }
+
+private:
+    IDBCursorWithValue(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
+    IDBCursorWithValue(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // LegacyCursorWithValue_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,13 +28,403 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMStringList.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;IDBConnectionToServer.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;IDBResultData.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IDBVersionChangeEvent.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBDatabase::IDBDatabase(ScriptExecutionContext* context)
-    : ActiveDOMObject(context)
</del><ins>+Ref&lt;IDBDatabase&gt; IDBDatabase::create(ScriptExecutionContext&amp; context, IDBClient::IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
</ins><span class="cx"> {
</span><ins>+    return adoptRef(*new IDBDatabase(context, connection, resultData));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBDatabase::IDBDatabase(ScriptExecutionContext&amp; context, IDBClient::IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
+    : WebCore::ActiveDOMObject(&amp;context)
+    , m_serverConnection(connection)
+    , m_info(resultData.databaseInfo())
+    , m_databaseConnectionIdentifier(resultData.databaseConnectionIdentifier())
+{
+    LOG(IndexedDB, &quot;IDBDatabase::IDBDatabase - Creating database %s with version %&quot; PRIu64 &quot; connection %&quot; PRIu64, m_info.name().utf8().data(), m_info.version(), m_databaseConnectionIdentifier);
+    suspendIfNeeded();
+    relaxAdoptionRequirement();
+    m_serverConnection-&gt;registerDatabaseConnection(*this);
+}
+
+IDBDatabase::~IDBDatabase()
+{
+    m_serverConnection-&gt;unregisterDatabaseConnection(*this);
+}
+
+bool IDBDatabase::hasPendingActivity() const
+{
+    return !m_closedInServer;
+}
+
+const String IDBDatabase::name() const
+{
+    return m_info.name();
+}
+
+uint64_t IDBDatabase::version() const
+{
+    return m_info.version();
+}
+
+RefPtr&lt;DOMStringList&gt; IDBDatabase::objectStoreNames() const
+{
+    RefPtr&lt;DOMStringList&gt; objectStoreNames = DOMStringList::create();
+    for (auto&amp; name : m_info.objectStoreNames())
+        objectStoreNames-&gt;append(name);
+    objectStoreNames-&gt;sort();
+    return objectStoreNames;
+}
+
+RefPtr&lt;WebCore::IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp;, const Dictionary&amp;, ExceptionCodeWithMessage&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::createObjectStore&quot;);
+
+    ASSERT(!m_versionChangeTransaction || m_versionChangeTransaction-&gt;isVersionChange());
+
+    if (!m_versionChangeTransaction) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.&quot;);
+        return nullptr;
+    }
+
+    if (!m_versionChangeTransaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        return nullptr;
+    }
+
+    if (m_info.hasObjectStore(name)) {
+        ec.code = IDBDatabaseException::ConstraintError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.&quot;);
+        return nullptr;
+    }
+
+    if (!keyPath.isNull() &amp;&amp; !keyPath.isValid()) {
+        ec.code = IDBDatabaseException::SyntaxError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.&quot;);
+        return nullptr;
+    }
+
+    if (autoIncrement &amp;&amp; !keyPath.isNull()) {
+        if ((keyPath.type() == IndexedDB::KeyPathType::String &amp;&amp; keyPath.string().isEmpty()) || keyPath.type() == IndexedDB::KeyPathType::Array) {
+            ec.code = IDBDatabaseException::InvalidAccessError;
+            ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.&quot;);
+            return nullptr;
+        }
+    }
+
+    // Install the new ObjectStore into the connection's metadata.
+    IDBObjectStoreInfo info = m_info.createNewObjectStore(name, keyPath, autoIncrement);
+
+    // Create the actual IDBObjectStore from the transaction, which also schedules the operation server side.
+    Ref&lt;IDBObjectStore&gt; objectStore = m_versionChangeTransaction-&gt;createObjectStore(info);
+    return adoptRef(&amp;objectStore.leakRef());
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp; objectStores, const String&amp; modeString, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::transaction&quot;);
+
+    if (m_closePending) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.&quot;);
+        return nullptr;
+    }
+
+    if (objectStores.isEmpty()) {
+        ec.code = IDBDatabaseException::InvalidAccessError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.&quot;);
+        return nullptr;
+    }
+
+    IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec.code);
+    if (ec.code) {
+        ec.message = makeString(ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('&quot;), modeString, ASCIILiteral(&quot;') is not one of 'readonly' or 'readwrite'.&quot;));
+        return nullptr;
+    }
+
+    if (mode != IndexedDB::TransactionMode::ReadOnly &amp;&amp; mode != IndexedDB::TransactionMode::ReadWrite) {
+        ec.code = TypeError;
+        return nullptr;
+    }
+
+    if (m_versionChangeTransaction &amp;&amp; !m_versionChangeTransaction-&gt;isFinishedOrFinishing()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.&quot;);
+        return nullptr;
+    }
+
+    for (auto&amp; objectStoreName : objectStores) {
+        if (m_info.hasObjectStore(objectStoreName))
+            continue;
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.&quot;);
+        return nullptr;
+    }
+
+    auto info = IDBTransactionInfo::clientTransaction(m_serverConnection.get(), objectStores, mode);
+    auto transaction = IDBTransaction::create(*this, info);
+
+    LOG(IndexedDB, &quot;IDBDatabase::transaction - Added active transaction %s&quot;, info.identifier().loggingString().utf8().data());
+
+    m_activeTransactions.set(info.identifier(), &amp;transaction.get());
+
+    return adoptRef(&amp;transaction.leakRef());
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext* context, const String&amp; objectStore, const String&amp; mode, ExceptionCodeWithMessage&amp; ec)
+{
+    Vector&lt;String&gt; objectStores(1);
+    objectStores[0] = objectStore;
+    return transaction(context, objectStores, mode, ec);
+}
+
+void IDBDatabase::deleteObjectStore(const String&amp; objectStoreName, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::deleteObjectStore&quot;);
+
+    if (!m_versionChangeTransaction) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.&quot;);
+        return;
+    }
+
+    if (!m_versionChangeTransaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+
+    if (!m_info.hasObjectStore(objectStoreName)) {
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.&quot;);
+        return;
+    }
+
+    m_info.deleteObjectStore(objectStoreName);
+    m_versionChangeTransaction-&gt;deleteObjectStore(objectStoreName);
+}
+
+void IDBDatabase::close()
+{
+    LOG(IndexedDB, &quot;IDBDatabase::close - %&quot; PRIu64, m_databaseConnectionIdentifier);
+
+    m_closePending = true;
+    maybeCloseInServer();
+}
+
+void IDBDatabase::maybeCloseInServer()
+{
+    LOG(IndexedDB, &quot;IDBDatabase::maybeCloseInServer - %&quot; PRIu64, m_databaseConnectionIdentifier);
+
+    if (m_closedInServer)
+        return;
+
+    // 3.3.9 Database closing steps
+    // Wait for all transactions created using this connection to complete.
+    // Once they are complete, this connection is closed.
+    if (!m_activeTransactions.isEmpty())
+        return;
+
+    m_closedInServer = true;
+    m_serverConnection-&gt;databaseConnectionClosed(*this);
+}
+
+const char* IDBDatabase::activeDOMObjectName() const
+{
+    return &quot;IDBDatabase&quot;;
+}
+
+bool IDBDatabase::canSuspendForDocumentSuspension() const
+{
+    // FIXME: This value will sometimes be false when database operations are actually in progress.
+    // Such database operations do not yet exist.
+    return true;
+}
+
+void IDBDatabase::stop()
+{
+    LOG(IndexedDB, &quot;IDBDatabase::stop - %&quot; PRIu64, m_databaseConnectionIdentifier);
+
+    Vector&lt;IDBResourceIdentifier&gt; transactionIdentifiers;
+    transactionIdentifiers.reserveInitialCapacity(m_activeTransactions.size());
+
+    for (auto&amp; id : m_activeTransactions.keys())
+        transactionIdentifiers.uncheckedAppend(id);
+
+    for (auto&amp; id : transactionIdentifiers) {
+        IDBTransaction* transaction = m_activeTransactions.get(id);
+        if (transaction)
+            transaction-&gt;stop();
+    }
+
+    close();
+}
+
+Ref&lt;IDBTransaction&gt; IDBDatabase::startVersionChangeTransaction(const IDBTransactionInfo&amp; info, IDBOpenDBRequest&amp; request)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::startVersionChangeTransaction %s&quot;, info.identifier().loggingString().utf8().data());
+
+    ASSERT(!m_versionChangeTransaction);
+    ASSERT(info.mode() == IndexedDB::TransactionMode::VersionChange);
+    ASSERT(!m_closePending);
+    ASSERT(scriptExecutionContext());
+
+    Ref&lt;IDBTransaction&gt; transaction = IDBTransaction::create(*this, info, request);
+    m_versionChangeTransaction = &amp;transaction.get();
+
+    m_activeTransactions.set(transaction-&gt;info().identifier(), &amp;transaction.get());
+
+    return transaction;
+}
+
+void IDBDatabase::didStartTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::didStartTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+    ASSERT(!m_versionChangeTransaction);
+
+    // It is possible for the client to have aborted a transaction before the server replies back that it has started.
+    if (m_abortingTransactions.contains(transaction.info().identifier()))
+        return;
+
+    m_activeTransactions.set(transaction.info().identifier(), &amp;transaction);
+}
+
+void IDBDatabase::willCommitTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::willCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+
+    auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
+    ASSERT(refTransaction);
+    m_committingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
+}
+
+void IDBDatabase::didCommitTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::didCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+
+    if (m_versionChangeTransaction == &amp;transaction)
+        m_info.setVersion(transaction.info().newVersion());
+
+    didCommitOrAbortTransaction(transaction);
+}
+
+void IDBDatabase::willAbortTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::willAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+
+    auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
+    if (!refTransaction)
+        refTransaction = m_committingTransactions.take(transaction.info().identifier());
+
+    ASSERT(refTransaction);
+    m_abortingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
+
+    if (transaction.isVersionChange()) {
+        ASSERT(transaction.originalDatabaseInfo());
+        m_info = *transaction.originalDatabaseInfo();
+        m_closePending = true;
+    }
+}
+
+void IDBDatabase::didAbortTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::didAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+
+    if (transaction.isVersionChange()) {
+        ASSERT(transaction.originalDatabaseInfo());
+        ASSERT(m_info.version() == transaction.originalDatabaseInfo()-&gt;version());
+        m_closePending = true;
+        maybeCloseInServer();
+    }
+
+    didCommitOrAbortTransaction(transaction);
+}
+
+void IDBDatabase::didCommitOrAbortTransaction(IDBTransaction&amp; transaction)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::didCommitOrAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
+
+    if (m_versionChangeTransaction == &amp;transaction)
+        m_versionChangeTransaction = nullptr;
+
+#ifndef NDBEBUG
+    unsigned count = 0;
+    if (m_activeTransactions.contains(transaction.info().identifier()))
+        ++count;
+    if (m_committingTransactions.contains(transaction.info().identifier()))
+        ++count;
+    if (m_abortingTransactions.contains(transaction.info().identifier()))
+        ++count;
+
+    ASSERT(count == 1);
+#endif
+
+    m_activeTransactions.remove(transaction.info().identifier());
+    m_committingTransactions.remove(transaction.info().identifier());
+    m_abortingTransactions.remove(transaction.info().identifier());
+
+    if (m_closePending)
+        maybeCloseInServer();
+}
+
+void IDBDatabase::fireVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion)
+{
+    uint64_t currentVersion = m_info.version();
+    LOG(IndexedDB, &quot;IDBDatabase::fireVersionChangeEvent - current version %&quot; PRIu64 &quot;, requested version %&quot; PRIu64 &quot;, connection %&quot; PRIu64, currentVersion, requestedVersion, m_databaseConnectionIdentifier);
+
+    if (!scriptExecutionContext() || m_closePending) {
+        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, requestIdentifier);
+        return;
+    }
+
+    Ref&lt;Event&gt; event = IDBVersionChangeEvent::create(requestIdentifier, currentVersion, requestedVersion, eventNames().versionchangeEvent);
+    event-&gt;setTarget(this);
+    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
+}
+
+bool IDBDatabase::dispatchEvent(Event&amp; event)
+{
+    LOG(IndexedDB, &quot;IDBDatabase::dispatchEvent (%&quot; PRIu64 &quot;)&quot;, m_databaseConnectionIdentifier);
+
+    bool result = EventTargetWithInlineData::dispatchEvent(event);
+
+    if (event.isVersionChangeEvent() &amp;&amp; event.type() == eventNames().versionchangeEvent)
+        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, downcast&lt;IDBVersionChangeEvent&gt;(event).requestIdentifier());
+
+    return result;
+}
+
+void IDBDatabase::didCreateIndexInfo(const IDBIndexInfo&amp; info)
+{
+    auto* objectStore = m_info.infoForExistingObjectStore(info.objectStoreIdentifier());
+    ASSERT(objectStore);
+    objectStore-&gt;addExistingIndex(info);
+}
+
+void IDBDatabase::didDeleteIndexInfo(const IDBIndexInfo&amp; info)
+{
+    auto* objectStore = m_info.infoForExistingObjectStore(info.objectStoreIdentifier());
+    ASSERT(objectStore);
+    objectStore-&gt;deleteIndex(info.name());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,54 +23,101 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBDatabase_h
-#define IDBDatabase_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><del>-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;DOMStringList.h&quot;
</del><ins>+#if ENABLE(INDEXED_DATABASE)
+
</ins><span class="cx"> #include &quot;Dictionary.h&quot;
</span><del>-#include &quot;Event.h&quot;
</del><span class="cx"> #include &quot;EventTarget.h&quot;
</span><del>-#include &quot;IDBObjectStore.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;IndexedDB.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
</del><ins>+#include &quot;ExceptionCode.h&quot;
+#include &quot;IDBConnectionToServer.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseInfo.h&quot;
</ins><span class="cx"> 
</span><del>-#if ENABLE(INDEXED_DATABASE)
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class ScriptExecutionContext;
</del><ins>+class DOMStringList;
+class IDBObjectStore;
+class IDBOpenDBRequest;
+class IDBResultData;
+class IDBTransaction;
+class IDBTransactionInfo;
</ins><span class="cx"> 
</span><del>-struct ExceptionCodeWithMessage;
-
</del><span class="cx"> class IDBDatabase : public RefCounted&lt;IDBDatabase&gt;, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBDatabase() { }
</del><ins>+    static Ref&lt;IDBDatabase&gt; create(ScriptExecutionContext&amp;, IDBClient::IDBConnectionToServer&amp;, const IDBResultData&amp;);
</ins><span class="cx"> 
</span><del>-    // Implement the IDL
-    virtual const String name() const = 0;
-    virtual uint64_t version() const = 0;
-    virtual RefPtr&lt;DOMStringList&gt; objectStoreNames() const = 0;
</del><ins>+    virtual ~IDBDatabase();
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;) = 0;
-    virtual void deleteObjectStore(const String&amp; name, ExceptionCodeWithMessage&amp;) = 0;
-    virtual void close() = 0;
</del><ins>+    // IDBDatabase IDL
+    const String name() const;
+    uint64_t version() const;
+    RefPtr&lt;DOMStringList&gt; objectStoreNames() const;
</ins><span class="cx"> 
</span><ins>+    RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;);
+    void deleteObjectStore(const String&amp; name, ExceptionCodeWithMessage&amp;);
+    void close();
+
+    // EventTarget
+    EventTargetInterface eventTargetInterface() const final { return IDBDatabaseEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+    void refEventTarget() final { RefCounted&lt;IDBDatabase&gt;::ref(); }
+    void derefEventTarget() final { RefCounted&lt;IDBDatabase&gt;::deref(); }
+
</ins><span class="cx">     using RefCounted&lt;IDBDatabase&gt;::ref;
</span><span class="cx">     using RefCounted&lt;IDBDatabase&gt;::deref;
</span><span class="cx"> 
</span><del>-protected:
-    IDBDatabase(ScriptExecutionContext*);
</del><ins>+    const char* activeDOMObjectName() const final;
+    bool canSuspendForDocumentSuspension() const final;
+    void stop() final;
+
+    const IDBDatabaseInfo&amp; info() const { return m_info; }
+    uint64_t databaseConnectionIdentifier() const { return m_databaseConnectionIdentifier; }
+
+    Ref&lt;IDBTransaction&gt; startVersionChangeTransaction(const IDBTransactionInfo&amp;, IDBOpenDBRequest&amp;);
+    void didStartTransaction(IDBTransaction&amp;);
+
+    void willCommitTransaction(IDBTransaction&amp;);
+    void didCommitTransaction(IDBTransaction&amp;);
+    void willAbortTransaction(IDBTransaction&amp;);
+    void didAbortTransaction(IDBTransaction&amp;);
+
+    void fireVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion);
+
+    IDBClient::IDBConnectionToServer&amp; serverConnection() { return m_serverConnection.get(); }
+
+    void didCreateIndexInfo(const IDBIndexInfo&amp;);
+    void didDeleteIndexInfo(const IDBIndexInfo&amp;);
+
+    bool isClosingOrClosed() const { return m_closePending || m_closedInServer; }
+
+    bool dispatchEvent(Event&amp;) final;
+
+    bool hasPendingActivity() const final;
+
+private:
+    IDBDatabase(ScriptExecutionContext&amp;, IDBClient::IDBConnectionToServer&amp;, const IDBResultData&amp;);
+
+    void didCommitOrAbortTransaction(IDBTransaction&amp;);
+
+    void maybeCloseInServer();
+
+    Ref&lt;IDBClient::IDBConnectionToServer&gt; m_serverConnection;
+    IDBDatabaseInfo m_info;
+    uint64_t m_databaseConnectionIdentifier { 0 };
+
+    bool m_closePending { false };
+    bool m_closedInServer { false };
+
+    RefPtr&lt;IDBTransaction&gt; m_versionChangeTransaction;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_activeTransactions;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_committingTransactions;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_abortingTransactions;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // IDBDatabase_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,12 +28,143 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMRequestState.h&quot;
+#include &quot;Document.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBDatabaseIdentifier.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;Page.h&quot;
+#include &quot;SchemeRegistry.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;SecurityOrigin.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBFactory::IDBFactory()
</del><ins>+static bool shouldThrowSecurityException(ScriptExecutionContext&amp; context)
</ins><span class="cx"> {
</span><ins>+    ASSERT(is&lt;Document&gt;(context) || context.isWorkerGlobalScope());
+    if (is&lt;Document&gt;(context)) {
+        Document&amp; document = downcast&lt;Document&gt;(context);
+        if (!document.frame())
+            return true;
+        if (!document.page())
+            return true;
+    }
+
+    if (!context.securityOrigin()-&gt;canAccessDatabase(context.topOrigin()))
+        return true;
+
+    return false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBFactory&gt; IDBFactory::create(IDBClient::IDBConnectionToServer&amp; connection)
+{
+    return adoptRef(*new IDBFactory(connection));
+}
+
+IDBFactory::IDBFactory(IDBClient::IDBConnectionToServer&amp; connection)
+    : m_connectionToServer(connection)
+{
+}
+
+RefPtr&lt;IDBRequest&gt; IDBFactory::getDatabaseNames(ScriptExecutionContext&amp;, ExceptionCode&amp;)
+{
+    return nullptr;
+}
+
+RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBFactory::open&quot;);
+    
+    return openInternal(context, name, 0, ec).release();
+}
+
+RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBFactory::open&quot;);
+    
+    if (!version) {
+        ec = TypeError;
+        return nullptr;
+    }
+
+    return openInternal(context, name, version, ec).release();
+}
+
+RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::openInternal(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
+{
+    if (name.isNull()) {
+        ec = TypeError;
+        return nullptr;
+    }
+
+    if (shouldThrowSecurityException(context)) {
+        ec = SECURITY_ERR;
+        return nullptr;
+    }
+
+    ASSERT(context.securityOrigin());
+    ASSERT(context.topOrigin());
+    IDBDatabaseIdentifier databaseIdentifier(name, *context.securityOrigin(), *context.topOrigin());
+    if (!databaseIdentifier.isValid()) {
+        ec = TypeError;
+        return nullptr;
+    }
+
+    auto request = IDBOpenDBRequest::createOpenRequest(m_connectionToServer.get(), context, databaseIdentifier, version);
+    m_connectionToServer-&gt;openDatabase(request.get());
+
+    return adoptRef(&amp;request.leakRef());
+}
+
+RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::deleteDatabase(ScriptExecutionContext&amp; context, const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBFactory::deleteDatabase - %s&quot;, name.utf8().data());
+
+    if (name.isNull()) {
+        ec = TypeError;
+        return nullptr;
+    }
+    
+    if (shouldThrowSecurityException(context)) {
+        ec = SECURITY_ERR;
+        return nullptr;
+    }
+
+    ASSERT(context.securityOrigin());
+    ASSERT(context.topOrigin());
+    IDBDatabaseIdentifier databaseIdentifier(name, *context.securityOrigin(), *context.topOrigin());
+    if (!databaseIdentifier.isValid()) {
+        ec = TypeError;
+        return nullptr;
+    }
+
+    auto request = IDBOpenDBRequest::createDeleteRequest(m_connectionToServer.get(), context, databaseIdentifier);
+    m_connectionToServer-&gt;deleteDatabase(request.get());
+
+    return adoptRef(&amp;request.leakRef());
+}
+
+short IDBFactory::cmp(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; firstValue, const Deprecated::ScriptValue&amp; secondValue, ExceptionCodeWithMessage&amp; ec)
+{
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; first = scriptValueToIDBKey(&amp;requestState, firstValue);
+    RefPtr&lt;IDBKey&gt; second = scriptValueToIDBKey(&amp;requestState, secondValue);
+
+    ASSERT(first);
+    ASSERT(second);
+
+    if (!first-&gt;isValid() || !second-&gt;isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.&quot;);
+        return 0;
+    }
+
+    return static_cast&lt;short&gt;(first-&gt;compare(second.get()));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,48 +23,39 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBFactory_h
-#define IDBFactory_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><del>-#include &quot;IDBOpenDBRequest.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
</del><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBConnectionToServer.h&quot;
+#include &quot;IDBFactory.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class IDBKey;
-class IDBKeyRange;
-class ScriptExecutionContext;
-
-struct ExceptionCodeWithMessage;
-
-typedef int ExceptionCode;
-
</del><span class="cx"> class IDBFactory : public RefCounted&lt;IDBFactory&gt; {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBFactory() { }
</del><ins>+    static Ref&lt;IDBFactory&gt; create(IDBClient::IDBConnectionToServer&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: getDatabaseNames is no longer a web-facing API, and should be removed from IDBFactory.
</span><span class="cx">     // The Web Inspector currently uses this to enumerate the list of databases, but is more complicated as a result.
</span><span class="cx">     // We should provide a simpler API to the Web Inspector then remove getDatabaseNames.
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; getDatabaseNames(ScriptExecutionContext&amp;, ExceptionCode&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; getDatabaseNames(ScriptExecutionContext&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;) = 0;
-    virtual RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCode&amp;) = 0;
-    virtual RefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;);
+    RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCode&amp;);
+    RefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    virtual short cmp(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    short cmp(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-protected:
-    IDBFactory();
</del><ins>+private:
+    IDBFactory(IDBClient::IDBConnectionToServer&amp;);
+    
+    RefPtr&lt;IDBOpenDBRequest&gt; openInternal(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCode&amp;);
+    
+    Ref&lt;IDBClient::IDBConnectionToServer&gt; m_connectionToServer;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // IDBFactory_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,12 +28,315 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMRequestState.h&quot;
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBKeyRangeData.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;Logging.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBIndex::IDBIndex()
</del><ins>+IDBIndex::IDBIndex(ScriptExecutionContext&amp; context, const IDBIndexInfo&amp; info, IDBObjectStore&amp; objectStore)
+    : ActiveDOMObject(&amp;context)
+    , m_info(info)
+    , m_objectStore(objectStore)
</ins><span class="cx"> {
</span><ins>+    suspendIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBIndex::~IDBIndex()
+{
+}
+
+const char* IDBIndex::activeDOMObjectName() const
+{
+    return &quot;IDBIndex&quot;;
+}
+
+bool IDBIndex::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+bool IDBIndex::hasPendingActivity() const
+{
+    return !m_objectStore.modernTransaction().isFinished();
+}
+
+const String&amp; IDBIndex::name() const
+{
+    return m_info.name();
+}
+
+RefPtr&lt;IDBObjectStore&gt; IDBIndex::objectStore()
+{
+    return &amp;m_objectStore;
+}
+
+RefPtr&lt;IDBAny&gt; IDBIndex::keyPathAny() const
+{
+    return IDBAny::create(m_info.keyPath());
+}
+
+const IDBKeyPath&amp; IDBIndex::keyPath() const
+{
+    return m_info.keyPath();
+}
+
+bool IDBIndex::unique() const
+{
+    return m_info.unique();
+}
+
+bool IDBIndex::multiEntry() const
+{
+    return m_info.multiEntry();
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
+
+    if (m_deleted || m_objectStore.isDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_objectStore.modernTransaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+    if (ec.code) {
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.&quot;);
+        return nullptr;
+    }
+
+    IDBKeyRangeData rangeData = range;
+    if (rangeData.lowerKey.isNull())
+        rangeData.lowerKey = IDBKeyData::minimum();
+    if (rangeData.upperKey.isNull())
+        rangeData.upperKey = IDBKeyData::maximum();
+
+    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), rangeData, direction, IndexedDB::CursorType::KeyAndValue);
+    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
+    if (ec.code) {
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return openCursor(context, keyRange.get(), direction, ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
+
+    return doCount(context, IDBKeyRangeData::allKeys(), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
+
+    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
+
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return doCount(context, IDBKeyRangeData(idbKey.get()), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
+{
+    if (m_deleted || m_objectStore.isDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!range.isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    auto&amp; transaction = m_objectStore.modernTransaction();
+    if (!transaction.isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    return transaction.requestCount(context, *this, range);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
+
+    if (m_deleted || m_objectStore.isDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_objectStore.modernTransaction().isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+    if (ec.code) {
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.&quot;);
+        return nullptr;
+    }
+
+    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
+    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
+    if (ec.code) {
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+    return openKeyCursor(context, keyRange.get(), direction, ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::get&quot;);
+
+    return doGet(context, IDBKeyRangeData(range), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::get&quot;);
+
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return doGet(context, IDBKeyRangeData(idbKey.get()), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::doGet(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
+{
+    if (m_deleted || m_objectStore.isDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (range.isNull) {
+        ec.code = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    auto&amp; transaction = m_objectStore.modernTransaction();
+    if (!transaction.isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    return transaction.requestGetValue(context, *this, range);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
+
+    return doGetKey(context, IDBKeyRangeData(range), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
+
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return doGetKey(context, IDBKeyRangeData(idbKey.get()), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBIndex::doGetKey(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
+{
+    if (m_deleted || m_objectStore.isDeleted()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (range.isNull) {
+        ec.code = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    auto&amp; transaction = m_objectStore.modernTransaction();
+    if (!transaction.isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    return transaction.requestGetKey(context, *this, range);
+}
+
+void IDBIndex::markAsDeleted()
+{
+    ASSERT(!m_deleted);
+    m_deleted = true;
+}
+
+void IDBIndex::ref()
+{
+    m_objectStore.ref();
+}
+
+void IDBIndex::deref()
+{
+    m_objectStore.deref();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,73 +23,90 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBIndex_h
-#define IDBIndex_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><ins>+#include &quot;IDBIndex.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;ExceptionCode.h&quot;
</ins><span class="cx"> #include &quot;IDBCursor.h&quot;
</span><del>-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBKeyPath.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBObjectStore.h&quot;
</del><ins>+#include &quot;IDBIndexInfo.h&quot;
</ins><span class="cx"> #include &quot;IDBRequest.h&quot;
</span><del>-#include &quot;ScriptWrappable.h&quot;
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
</del><ins>+#include &lt;bindings/ScriptValue.h&gt;
</ins><span class="cx"> 
</span><del>-#if ENABLE(INDEXED_DATABASE)
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBAny;
+class IDBKeyRange;
</ins><span class="cx"> class IDBObjectStore;
</span><ins>+struct IDBKeyRangeData;
</ins><span class="cx"> 
</span><del>-class IDBIndex {
</del><ins>+class IDBIndex : public ActiveDOMObject {
</ins><span class="cx"> public:
</span><del>-    virtual ~IDBIndex() { }
</del><ins>+    IDBIndex(ScriptExecutionContext&amp;, const IDBIndexInfo&amp;, IDBObjectStore&amp;);
</ins><span class="cx"> 
</span><ins>+    virtual ~IDBIndex();
+
</ins><span class="cx">     // Implement the IDL
</span><del>-    virtual const String&amp; name() const = 0;
-    virtual RefPtr&lt;IDBObjectStore&gt; objectStore() = 0;
-    virtual RefPtr&lt;IDBAny&gt; keyPathAny() const = 0;
-    virtual const IDBKeyPath&amp; keyPath() const = 0;
-    virtual bool unique() const = 0;
-    virtual bool multiEntry() const = 0;
</del><ins>+    const String&amp; name() const;
+    RefPtr&lt;IDBObjectStore&gt; objectStore();
+    RefPtr&lt;IDBAny&gt; keyPathAny() const;
+    const IDBKeyPath&amp; keyPath() const;
+    bool unique() const;
+    bool multiEntry() const;
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec) { return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec) { return openCursor(context, key, IDBCursor::directionNext(), ec); }
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec) { return openKeyCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec) { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec) { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
+    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    const IDBIndexInfo&amp; info() const { return m_info; }
</ins><span class="cx"> 
</span><del>-    virtual bool isModern() const { return false; }
</del><ins>+    IDBObjectStore&amp; modernObjectStore() { return m_objectStore; }
</ins><span class="cx"> 
</span><del>-    // We use our own ref/deref function because Legacy IDB and Modern IDB have very different
-    // lifetime management of their indexes.
-    // This will go away once Legacy IDB is dropped.
-    virtual void ref() = 0;
-    virtual void deref() = 0;
</del><ins>+    void markAsDeleted();
+    bool isDeleted() const { return m_deleted; }
</ins><span class="cx"> 
</span><del>-protected:
-    IDBIndex();
</del><ins>+    void ref();
+    void deref();
+
+private:
+    RefPtr&lt;IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doGet(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doGetKey(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+
+    // ActiveDOMObject
+    const char* activeDOMObjectName() const;
+    bool canSuspendForDocumentSuspension() const;
+    bool hasPendingActivity() const;
+
+    IDBIndexInfo m_info;
+
+    bool m_deleted { false };
+
+    // IDBIndex objects are always owned by their referencing IDBObjectStore.
+    // Indexes will never outlive ObjectStores so its okay to keep a raw C++ reference here.
+    IDBObjectStore&amp; m_objectStore;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // IDBIndex_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,12 +28,634 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMRequestState.h&quot;
+#include &quot;DOMStringList.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBError.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyRangeData.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;SerializedScriptValue.h&quot;
+#include &lt;wtf/Locker.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBObjectStore::IDBObjectStore()
</del><ins>+Ref&lt;IDBObjectStore&gt; IDBObjectStore::create(ScriptExecutionContext&amp; context, const IDBObjectStoreInfo&amp; info, IDBTransaction&amp; transaction)
</ins><span class="cx"> {
</span><ins>+    return adoptRef(*new IDBObjectStore(context, info, transaction));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBObjectStore::IDBObjectStore(ScriptExecutionContext&amp; context, const IDBObjectStoreInfo&amp; info, IDBTransaction&amp; transaction)
+    : ActiveDOMObject(&amp;context)
+    , m_info(info)
+    , m_originalInfo(info)
+    , m_transaction(transaction)
+{
+    suspendIfNeeded();
+}
+
+IDBObjectStore::~IDBObjectStore()
+{
+}
+
+const char* IDBObjectStore::activeDOMObjectName() const
+{
+    return &quot;IDBObjectStore&quot;;
+}
+
+bool IDBObjectStore::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+bool IDBObjectStore::hasPendingActivity() const
+{
+    return !m_transaction-&gt;isFinished();
+}
+
+const String IDBObjectStore::name() const
+{
+    return m_info.name();
+}
+
+RefPtr&lt;WebCore::IDBAny&gt; IDBObjectStore::keyPathAny() const
+{
+    return IDBAny::create(m_info.keyPath());
+}
+
+const IDBKeyPath IDBObjectStore::keyPath() const
+{
+    return m_info.keyPath();
+}
+
+RefPtr&lt;DOMStringList&gt; IDBObjectStore::indexNames() const
+{
+    RefPtr&lt;DOMStringList&gt; indexNames = DOMStringList::create();
+    for (auto&amp; name : m_info.indexNames())
+        indexNames-&gt;append(name);
+    indexNames-&gt;sort();
+
+    return indexNames;
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBObjectStore::transaction()
+{
+    return &amp;m_transaction.get();
+}
+
+bool IDBObjectStore::autoIncrement() const
+{
+    return m_info.autoIncrement();
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
+{
+    return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
+{
+    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    return openCursor(context, key, IDBCursor::directionNext(), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::openCursor&quot;);
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
+    if (ec.code)
+        return nullptr;
+
+    auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range, direction);
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestOpenCursor(context, *this, info);
+    return WTFMove(request);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
+{
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
+    if (ec.code) {
+        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
+        return 0;
+    }
+
+    return openCursor(context, keyRange.get(), direction, ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(context, *this, idbKey.get());
+    return WTFMove(request);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        return nullptr;
+    }
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    IDBKeyRangeData keyRangeData(keyRange);
+    if (!keyRangeData.isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(context, *this, keyRangeData);
+    return WTFMove(request);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::add(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCodeWithMessage&amp; ec)
+{
+    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::add(JSC::ExecState&amp; execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
+{
+    RefPtr&lt;IDBKey&gt; idbKey;
+    if (!key.isUndefined())
+        idbKey = scriptValueToIDBKey(execState, key);
+    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::put(JSC::ExecState&amp; execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
+{
+    RefPtr&lt;IDBKey&gt; idbKey;
+    if (!key.isUndefined())
+        idbKey = scriptValueToIDBKey(execState, key);
+    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::put(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCodeWithMessage&amp; ec)
+{
+    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBObjectStore::putForCursorUpdate(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
+{
+    return putOrAdd(state, value, scriptValueToIDBKey(state, key), IndexedDB::ObjectStoreOverwriteMode::OverwriteForCursor, InlineKeyCheck::DoNotPerform, ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBObjectStore::putOrAdd(JSC::ExecState&amp; state, JSC::JSValue value, RefPtr&lt;IDBKey&gt; key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, InlineKeyCheck inlineKeyCheck, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::putOrAdd&quot;);
+
+    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
+    // the exception for an object store being deleted.
+    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
+    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
+    // Until this is sorted out, we'll agree with the test and the majority share browsers.
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (m_transaction-&gt;isReadOnly()) {
+        ec.code = IDBDatabaseException::ReadOnlyError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The transaction is read-only.&quot;);
+        return nullptr;
+    }
+
+    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::create(&amp;state, value, nullptr, nullptr);
+    if (state.hadException()) {
+        // Clear the DOM exception from the serializer so we can give a more targeted exception.
+        state.clearException();
+
+        ec.code = IDBDatabaseException::DataCloneError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: An object could not be cloned.&quot;);
+        return nullptr;
+    }
+
+    if (serializedValue-&gt;hasBlobURLs()) {
+        // FIXME: Add Blob/File/FileList support
+        ec.code = IDBDatabaseException::DataCloneError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.&quot;);
+        return nullptr;
+    }
+
+    if (key &amp;&amp; !key-&gt;isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    bool usesInlineKeys = !m_info.keyPath().isNull();
+    bool usesKeyGenerator = autoIncrement();
+    if (usesInlineKeys &amp;&amp; inlineKeyCheck == InlineKeyCheck::Perform) {
+        if (key) {
+            ec.code = IDBDatabaseException::DataError;
+            ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided.&quot;);
+            return nullptr;
+        }
+
+        RefPtr&lt;IDBKey&gt; keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath());
+        if (keyPathKey &amp;&amp; !keyPathKey-&gt;isValid()) {
+            ec.code = IDBDatabaseException::DataError;
+            ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key.&quot;);
+            return nullptr;
+        }
+
+        if (!keyPathKey) {
+            if (usesKeyGenerator) {
+                if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath())) {
+                    ec.code = IDBDatabaseException::DataError;
+                    return nullptr;
+                }
+            } else {
+                ec.code = IDBDatabaseException::DataError;
+                ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.&quot;);
+                return nullptr;
+            }
+        }
+
+        if (keyPathKey) {
+            ASSERT(!key);
+            key = keyPathKey;
+        }
+    } else if (!usesKeyGenerator &amp;&amp; !key) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.&quot;);
+        return nullptr;
+    }
+
+    auto context = scriptExecutionContextFromExecState(&amp;state);
+    if (!context) {
+        ec.code = IDBDatabaseException::UnknownError;
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestPutOrAdd(*context, *this, key.get(), *serializedValue, overwriteMode);
+    return adoptRef(request.leakRef());
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
+{
+    return doDelete(context, keyRange, ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBObjectStore::doDelete(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::deleteFunction&quot;);
+
+    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
+    // the exception for an object store being deleted.
+    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
+    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
+    // Until this is sorted out, we'll agree with the test and the majority share browsers.
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (m_transaction-&gt;isReadOnly()) {
+        ec.code = IDBDatabaseException::ReadOnlyError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.&quot;);
+        return nullptr;
+    }
+
+    IDBKeyRangeData keyRangeData(keyRange);
+    if (!keyRangeData.isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.&quot;);
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestDeleteRecord(context, *this, keyRangeData);
+    return WTFMove(request);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    return modernDelete(context, key.jsValue(), ec);
+}
+
+RefPtr&lt;IDBRequest&gt; IDBObjectStore::modernDelete(ScriptExecutionContext&amp; context, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
+{
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return doDelete(context, &amp;IDBKeyRange::create(idbKey.get()).get(), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::clear(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::clear&quot;);
+
+    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
+    // the exception for an object store being deleted.
+    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
+    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
+    // Until this is sorted out, we'll agree with the test and the majority share browsers.
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (m_transaction-&gt;isReadOnly()) {
+        ec.code = IDBDatabaseException::ReadOnlyError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.&quot;);
+        return nullptr;
+    }
+
+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestClearObjectStore(context, *this);
+    return adoptRef(request.leakRef());
+}
+
+RefPtr&lt;WebCore::IDBIndex&gt; IDBObjectStore::createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::createIndex %s&quot;, name.utf8().data());
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isVersionChange()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        return nullptr;
+    }
+
+    if (!keyPath.isValid()) {
+        ec.code = IDBDatabaseException::SyntaxError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.&quot;);
+        return nullptr;
+    }
+
+    if (name.isNull()) {
+        ec.code = TypeError;
+        return nullptr;
+    }
+
+    if (m_info.hasIndex(name)) {
+        ec.code = IDBDatabaseException::ConstraintError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.&quot;);
+        return nullptr;
+    }
+
+    if (keyPath.type() == IndexedDB::KeyPathType::Array &amp;&amp; multiEntry) {
+        ec.code = IDBDatabaseException::InvalidAccessError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.&quot;);
+        return nullptr;
+    }
+
+    // Install the new Index into the ObjectStore's info.
+    IDBIndexInfo info = m_info.createNewIndex(name, keyPath, unique, multiEntry);
+    m_transaction-&gt;database().didCreateIndexInfo(info);
+
+    // Create the actual IDBObjectStore from the transaction, which also schedules the operation server side.
+    auto index = m_transaction-&gt;createIndex(*this, info);
+    RefPtr&lt;IDBIndex&gt; refIndex = index.get();
+
+    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
+    m_referencedIndexes.set(name, WTFMove(index));
+
+    return WTFMove(refIndex);
+}
+
+RefPtr&lt;WebCore::IDBIndex&gt; IDBObjectStore::index(const String&amp; indexName, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::index&quot;);
+
+    if (!scriptExecutionContext())
+        return nullptr;
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (m_transaction-&gt;isFinishedOrFinishing()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The transaction is finished.&quot;);
+        return nullptr;
+    }
+
+    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
+    auto iterator = m_referencedIndexes.find(indexName);
+    if (iterator != m_referencedIndexes.end())
+        return iterator-&gt;value.get();
+
+    auto* info = m_info.infoForExistingIndex(indexName);
+    if (!info) {
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.&quot;);
+        return nullptr;
+    }
+
+    auto index = std::make_unique&lt;IDBIndex&gt;(*scriptExecutionContext(), *info, *this);
+    RefPtr&lt;IDBIndex&gt; refIndex = index.get();
+    m_referencedIndexes.set(indexName, WTFMove(index));
+
+    return refIndex;
+}
+
+void IDBObjectStore::deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::deleteIndex %s&quot;, name.utf8().data());
+
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return;
+    }
+
+    if (!m_transaction-&gt;isVersionChange()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction.&quot;);
+        return;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return;
+    }
+
+    if (!m_info.hasIndex(name)) {
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.&quot;);
+        return;
+    }
+
+    auto* info = m_info.infoForExistingIndex(name);
+    ASSERT(info);
+    m_transaction-&gt;database().didDeleteIndexInfo(*info);
+
+    m_info.deleteIndex(name);
+
+    {
+        Locker&lt;Lock&gt; locker(m_referencedIndexLock);
+        if (auto index = m_referencedIndexes.take(name)) {
+            index-&gt;markAsDeleted();
+            m_deletedIndexes.add(WTFMove(index));
+        }
+
+    }
+
+    m_transaction-&gt;deleteIndex(m_info.identifier(), name);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
+
+    return doCount(context, IDBKeyRangeData::allKeys(), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
+
+    DOMRequestState requestState(&amp;context);
+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
+    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
+        ec.code = IDBDatabaseException::DataError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
+        return nullptr;
+    }
+
+    return doCount(context, IDBKeyRangeData(idbKey.get()), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
+
+    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
+}
+
+RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
+{
+    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
+    // the exception for an object store being deleted.
+    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
+    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
+    // Until this is sorted out, we'll agree with the test and the majority share browsers.
+    if (m_deleted) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.&quot;);
+        return nullptr;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec.code = IDBDatabaseException::TransactionInactiveError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
+        return nullptr;
+    }
+
+    if (!range.isValid()) {
+        ec.code = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    return m_transaction-&gt;requestCount(context, *this, range);
+}
+
+void IDBObjectStore::markAsDeleted()
+{
+    m_deleted = true;
+}
+
+void IDBObjectStore::rollbackInfoForVersionChangeAbort()
+{
+    m_info = m_originalInfo;
+}
+
+void IDBObjectStore::visitReferencedIndexes(JSC::SlotVisitor&amp; visitor) const
+{
+    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
+    for (auto&amp; index : m_referencedIndexes.values())
+        visitor.addOpaqueRoot(index.get());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,83 +23,106 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBObjectStore_h
-#define IDBObjectStore_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><del>-#include &quot;Dictionary.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;ScriptWrappable.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
</del><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-namespace Deprecated {
-class ScriptValue;
-}
</del><ins>+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBObjectStoreInfo.h&quot;
+#include &quot;IndexedDB.h&quot;
</ins><span class="cx"> 
</span><del>-namespace JSC {
-class ExecState;
-class JSValue;
-}
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DOMStringList;
</span><span class="cx"> class IDBAny;
</span><span class="cx"> class IDBIndex;
</span><del>-class IDBKeyPath;
</del><ins>+class IDBKey;
</ins><span class="cx"> class IDBKeyRange;
</span><span class="cx"> class IDBRequest;
</span><span class="cx"> class IDBTransaction;
</span><del>-class ScriptExecutionContext;
</del><ins>+struct IDBKeyRangeData;
</ins><span class="cx"> 
</span><del>-class IDBObjectStore : public RefCounted&lt;IDBObjectStore&gt; {
</del><ins>+class IDBObjectStore : public RefCounted&lt;IDBObjectStore&gt;, public ActiveDOMObject {
</ins><span class="cx"> public:
</span><del>-    virtual ~IDBObjectStore() { }
</del><ins>+    static Ref&lt;IDBObjectStore&gt; create(ScriptExecutionContext&amp;, const IDBObjectStoreInfo&amp;, IDBTransaction&amp;);
</ins><span class="cx"> 
</span><ins>+    ~IDBObjectStore();
+
</ins><span class="cx">     // Implement the IDBObjectStore IDL
</span><del>-    virtual const String name() const = 0;
-    virtual RefPtr&lt;IDBAny&gt; keyPathAny() const = 0;
-    virtual const IDBKeyPath keyPath() const = 0;
-    virtual RefPtr&lt;DOMStringList&gt; indexNames() const = 0;
-    virtual RefPtr&lt;IDBTransaction&gt; transaction() = 0;
-    virtual bool autoIncrement() const = 0;
</del><ins>+    const String name() const;
+    RefPtr&lt;IDBAny&gt; keyPathAny() const;
+    const IDBKeyPath keyPath() const;
+    RefPtr&lt;DOMStringList&gt; indexNames() const;
+    RefPtr&lt;IDBTransaction&gt; transaction();
+    bool autoIncrement() const;
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCodeWithMessage&amp;);
+    void deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    RefPtr&lt;IDBRequest&gt; putForCursorUpdate(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; modernDelete(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    void markAsDeleted();
+    bool isDeleted() const { return m_deleted; }
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCodeWithMessage&amp;) = 0;
-    virtual void deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    const IDBObjectStoreInfo&amp; info() const { return m_info; }
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) = 0;
-    virtual RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    // FIXME: After removing LegacyIDB and folding abstract/implementation classes together,
+    // this will no longer be necessary.
+    IDBTransaction&amp; modernTransaction() { return m_transaction.get(); }
</ins><span class="cx"> 
</span><del>-    virtual bool isModern() const { return false; }
</del><ins>+    void rollbackInfoForVersionChangeAbort();
</ins><span class="cx"> 
</span><del>-protected:
-    IDBObjectStore();
</del><ins>+    void visitReferencedIndexes(JSC::SlotVisitor&amp;) const;
+
+private:
+    IDBObjectStore(ScriptExecutionContext&amp;, const IDBObjectStoreInfo&amp;, IDBTransaction&amp;);
+
+    enum class InlineKeyCheck {
+        Perform,
+        DoNotPerform,
+    };
+
+    RefPtr&lt;IDBRequest&gt; putOrAdd(JSC::ExecState&amp;, JSC::JSValue, RefPtr&lt;IDBKey&gt;, IndexedDB::ObjectStoreOverwriteMode, InlineKeyCheck, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;WebCore::IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doDelete(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+
+    // ActiveDOMObject
+    const char* activeDOMObjectName() const;
+    bool canSuspendForDocumentSuspension() const;
+    bool hasPendingActivity() const;
+
+    IDBObjectStoreInfo m_info;
+    IDBObjectStoreInfo m_originalInfo;
+    Ref&lt;IDBTransaction&gt; m_transaction;
+
+    bool m_deleted { false };
+
+    mutable Lock m_referencedIndexLock;
+    HashMap&lt;String, std::unique_ptr&lt;IDBIndex&gt;&gt; m_referencedIndexes;
+    HashSet&lt;std::unique_ptr&lt;IDBIndex&gt;&gt; m_deletedIndexes;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
-
-#endif // IDBObjectStore_h
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,13 +28,185 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBError.h&quot;
+#include &quot;IDBRequestCompletionEvent.h&quot;
+#include &quot;IDBResultData.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IDBVersionChangeEvent.h&quot;
+#include &quot;Logging.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext&amp; context)
-    : IDBRequest(context)
</del><ins>+Ref&lt;IDBOpenDBRequest&gt; IDBOpenDBRequest::createDeleteRequest(IDBClient::IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier)
</ins><span class="cx"> {
</span><ins>+    ASSERT(databaseIdentifier.isValid());
+    return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, 0, IndexedDB::RequestType::Delete));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBOpenDBRequest&gt; IDBOpenDBRequest::createOpenRequest(IDBClient::IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier, uint64_t version)
+{
+    ASSERT(databaseIdentifier.isValid());
+    return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, version, IndexedDB::RequestType::Open));
+}
+    
+IDBOpenDBRequest::IDBOpenDBRequest(IDBClient::IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier, uint64_t version, IndexedDB::RequestType requestType)
+    : IDBRequest(connection, context)
+    , m_databaseIdentifier(databaseIdentifier)
+    , m_version(version)
+{
+    m_requestType = requestType;
+}
+
+IDBOpenDBRequest::~IDBOpenDBRequest()
+{
+}
+
+void IDBOpenDBRequest::onError(const IDBResultData&amp; data)
+{
+    m_domError = DOMError::create(data.error().name());
+    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this));
+}
+
+void IDBOpenDBRequest::versionChangeTransactionDidFinish()
+{
+    // 3.3.7 &quot;versionchange&quot; transaction steps
+    // When the transaction is finished, after firing complete/abort on the transaction, immediately set request's transaction property to null.
+    m_shouldExposeTransactionToDOM = false;
+}
+
+void IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit()
+{
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit()&quot;);
+
+    ASSERT(hasPendingActivity());
+    ASSERT(m_result);
+    ASSERT(m_result-&gt;type() == IDBAny::Type::IDBDatabase);
+    m_transaction-&gt;addRequest(*this);
+
+    auto event = IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this);
+    m_openDatabaseSuccessEvent = &amp;event.get();
+
+    enqueueEvent(WTFMove(event));
+}
+
+void IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion()
+{
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion()&quot;);
+
+    ASSERT(hasPendingActivity());
+
+    IDBError idbError(IDBDatabaseException::AbortError);
+    m_domError = DOMError::create(idbError.name());
+    m_result = IDBAny::createUndefined();
+
+    m_transaction-&gt;addRequest(*this);
+    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this));
+}
+
+bool IDBOpenDBRequest::dispatchEvent(Event&amp; event)
+{
+    bool result = IDBRequest::dispatchEvent(event);
+
+    if (m_transaction &amp;&amp; m_transaction-&gt;isVersionChange() &amp;&amp; (event.type() == eventNames().errorEvent || event.type() == eventNames().successEvent))
+        m_transaction-&gt;database().serverConnection().didFinishHandlingVersionChangeTransaction(*m_transaction);
+
+    return result;
+}
+
+void IDBOpenDBRequest::onSuccess(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::onSuccess()&quot;);
+
+    if (!scriptExecutionContext())
+        return;
+
+    Ref&lt;IDBDatabase&gt; database = IDBDatabase::create(*scriptExecutionContext(), connection(), resultData);
+    m_result = IDBAny::create(WTFMove(database));
+    m_readyState = IDBRequestReadyState::Done;
+
+    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this));
+}
+
+void IDBOpenDBRequest::onUpgradeNeeded(const IDBResultData&amp; resultData)
+{
+    Ref&lt;IDBDatabase&gt; database = IDBDatabase::create(*scriptExecutionContext(), connection(), resultData);
+    Ref&lt;IDBTransaction&gt; transaction = database-&gt;startVersionChangeTransaction(resultData.transactionInfo(), *this);
+
+    ASSERT(transaction-&gt;info().mode() == IndexedDB::TransactionMode::VersionChange);
+    ASSERT(transaction-&gt;originalDatabaseInfo());
+
+    uint64_t oldVersion = transaction-&gt;originalDatabaseInfo()-&gt;version();
+    uint64_t newVersion = transaction-&gt;info().newVersion();
+
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::onUpgradeNeeded() - current version is %&quot; PRIu64 &quot;, new is %&quot; PRIu64, oldVersion, newVersion);
+
+    m_result = IDBAny::create(WTFMove(database));
+    m_readyState = IDBRequestReadyState::Done;
+    m_transaction = adoptRef(&amp;transaction.leakRef());
+    m_transaction-&gt;addRequest(*this);
+
+    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().upgradeneededEvent));
+}
+
+void IDBOpenDBRequest::onDeleteDatabaseSuccess(const IDBResultData&amp; resultData)
+{
+    uint64_t oldVersion = resultData.databaseInfo().version();
+
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::onDeleteDatabaseSuccess() - current version is %&quot; PRIu64, oldVersion);
+
+    m_readyState = IDBRequestReadyState::Done;
+    m_result = IDBAny::createUndefined();
+
+    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, 0, eventNames().successEvent));
+}
+
+void IDBOpenDBRequest::requestCompleted(const IDBResultData&amp; data)
+{
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::requestCompleted&quot;);
+
+    // If an Open request was completed after the page has navigated, leaving this request
+    // with a stopped script execution context, we need to message back to the server so it
+    // doesn't hang waiting on a database connection or transaction that will never exist.
+    if (m_contextStopped) {
+        switch (data.type()) {
+        case IDBResultType::OpenDatabaseSuccess:
+            connection().abortOpenAndUpgradeNeeded(data.databaseConnectionIdentifier(), IDBResourceIdentifier::emptyValue());
+            break;
+        case IDBResultType::OpenDatabaseUpgradeNeeded:
+            connection().abortOpenAndUpgradeNeeded(data.databaseConnectionIdentifier(), data.transactionInfo().identifier());
+            break;
+        default:
+            break;
+        }
+
+        return;
+    }
+
+    switch (data.type()) {
+    case IDBResultType::Error:
+        onError(data);
+        break;
+    case IDBResultType::OpenDatabaseSuccess:
+        onSuccess(data);
+        break;
+    case IDBResultType::OpenDatabaseUpgradeNeeded:
+        onUpgradeNeeded(data);
+        break;
+    case IDBResultType::DeleteDatabaseSuccess:
+        onDeleteDatabaseSuccess(data);
+        break;
+    default:
+        RELEASE_ASSERT_NOT_REACHED();
+    }
+}
+
+void IDBOpenDBRequest::requestBlocked(uint64_t oldVersion, uint64_t newVersion)
+{
+    LOG(IndexedDB, &quot;IDBOpenDBRequest::requestBlocked&quot;);
+    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().blockedEvent));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,26 +23,58 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBOpenDBRequest_h
-#define IDBOpenDBRequest_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMError.h&quot;
+#include &quot;IDBDatabaseIdentifier.h&quot;
</ins><span class="cx"> #include &quot;IDBRequest.h&quot;
</span><del>-#include &quot;IndexedDB.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class Event;
+class IDBDatabaseIdentifier;
+class IDBResultData;
+class ScriptExecutionContext;
+
+namespace IDBClient {
+class IDBConnectionToServer;
+}
+
</ins><span class="cx"> class IDBOpenDBRequest : public IDBRequest {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBOpenDBRequest() { }
</del><ins>+    static Ref&lt;IDBOpenDBRequest&gt; createDeleteRequest(IDBClient::IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;);
+    static Ref&lt;IDBOpenDBRequest&gt; createOpenRequest(IDBClient::IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;, uint64_t version);
</ins><span class="cx"> 
</span><del>-protected:
-    IDBOpenDBRequest(ScriptExecutionContext&amp;);
</del><ins>+    ~IDBOpenDBRequest() final;
+    
+    const IDBDatabaseIdentifier&amp; databaseIdentifier() const { return m_databaseIdentifier; }
+    uint64_t version() const { return m_version; }
+
+    void requestCompleted(const IDBResultData&amp;);
+    void requestBlocked(uint64_t oldVersion, uint64_t newVersion);
+
+    void versionChangeTransactionDidFinish();
+    void fireSuccessAfterVersionChangeCommit();
+    void fireErrorAfterVersionChangeCompletion();
+
+    bool dispatchEvent(Event&amp;) final;
+
+private:
+    IDBOpenDBRequest(IDBClient::IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;, uint64_t version, IndexedDB::RequestType);
+
+    void onError(const IDBResultData&amp;);
+    void onSuccess(const IDBResultData&amp;);
+    void onUpgradeNeeded(const IDBResultData&amp;);
+    void onDeleteDatabaseSuccess(const IDBResultData&amp;);
+
+    bool isOpenDBRequest() const override { return true; }
+
+    IDBDatabaseIdentifier m_databaseIdentifier;
+    uint64_t m_version { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // IDBOpenDBRequest_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,13 +28,410 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;DOMError.h&quot;
+#include &quot;DOMRequestState.h&quot;
+#include &quot;Event.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBEventDispatcher.h&quot;
+#include &quot;IDBKeyData.h&quot;
+#include &quot;IDBResultData.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;ThreadSafeDataBuffer.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBRequest::IDBRequest(ScriptExecutionContext&amp; context)
</del><ins>+Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBTransaction&amp; transaction)
+{
+    return adoptRef(*new IDBRequest(context, objectStore, transaction));
+}
+
+Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext&amp; context, IDBCursor&amp; cursor, IDBTransaction&amp; transaction)
+{
+    return adoptRef(*new IDBRequest(context, cursor, transaction));
+}
+
+Ref&lt;IDBRequest&gt; IDBRequest::createCount(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IDBTransaction&amp; transaction)
+{
+    return adoptRef(*new IDBRequest(context, index, transaction));
+}
+
+Ref&lt;IDBRequest&gt; IDBRequest::createGet(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
+{
+    return adoptRef(*new IDBRequest(context, index, requestedRecordType, transaction));
+}
+
+IDBRequest::IDBRequest(IDBClient::IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context)
</ins><span class="cx">     : ActiveDOMObject(&amp;context)
</span><ins>+    , m_connection(connection)
+    , m_resourceIdentifier(connection)
</ins><span class="cx"> {
</span><ins>+    suspendIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBTransaction&amp; transaction)
+    : ActiveDOMObject(&amp;context)
+    , m_transaction(&amp;transaction)
+    , m_connection(transaction.serverConnection())
+    , m_resourceIdentifier(transaction.serverConnection())
+    , m_source(IDBAny::create(objectStore))
+{
+    suspendIfNeeded();
+}
+
+IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBCursor&amp; cursor, IDBTransaction&amp; transaction)
+    : ActiveDOMObject(&amp;context)
+    , m_transaction(&amp;transaction)
+    , m_connection(transaction.serverConnection())
+    , m_resourceIdentifier(transaction.serverConnection())
+    , m_source(cursor.source())
+    , m_pendingCursor(&amp;cursor)
+{
+    suspendIfNeeded();
+
+    cursor.setRequest(*this);
+}
+
+IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IDBTransaction&amp; transaction)
+    : ActiveDOMObject(&amp;context)
+    , m_transaction(&amp;transaction)
+    , m_connection(transaction.serverConnection())
+    , m_resourceIdentifier(transaction.serverConnection())
+    , m_source(IDBAny::create(index))
+{
+    suspendIfNeeded();
+}
+
+IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
+    : IDBRequest(context, index, transaction)
+{
+    m_requestedIndexRecordType = requestedRecordType;
+}
+
+IDBRequest::~IDBRequest()
+{
+    if (m_result) {
+        auto type = m_result-&gt;type();
+        if (type == IDBAny::Type::IDBCursor || type == IDBAny::Type::IDBCursorWithValue)
+            m_result-&gt;idbCursor()-&gt;clearRequest();
+    }
+}
+
+RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::result(ExceptionCodeWithMessage&amp; ec) const
+{
+    if (m_readyState == IDBRequestReadyState::Done)
+        return m_result;
+
+    ec.code = IDBDatabaseException::InvalidStateError;
+    ec.message = ASCIILiteral(&quot;Failed to read the 'result' property from 'IDBRequest': The request has not finished.&quot;);
+    return nullptr;
+}
+
+unsigned short IDBRequest::errorCode(ExceptionCode&amp;) const
+{
+    return 0;
+}
+
+RefPtr&lt;DOMError&gt; IDBRequest::error(ExceptionCodeWithMessage&amp; ec) const
+{
+    if (m_readyState == IDBRequestReadyState::Done)
+        return m_domError;
+
+    ec.code = IDBDatabaseException::InvalidStateError;
+    ec.message = ASCIILiteral(&quot;Failed to read the 'error' property from 'IDBRequest': The request has not finished.&quot;);
+    return nullptr;
+}
+
+RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::source() const
+{
+    return m_source;
+}
+
+void IDBRequest::setSource(IDBCursor&amp; cursor)
+{
+    ASSERT(!m_cursorRequestNotifier);
+
+    m_source = IDBAny::create(cursor);
+    m_cursorRequestNotifier = std::make_unique&lt;ScopeGuard&gt;([this]() {
+        ASSERT(m_source-&gt;type() == IDBAny::Type::IDBCursor || m_source-&gt;type() == IDBAny::Type::IDBCursorWithValue);
+        m_source-&gt;idbCursor()-&gt;decrementOutstandingRequestCount();
+    });
+}
+
+void IDBRequest::setVersionChangeTransaction(IDBTransaction&amp; transaction)
+{
+    ASSERT(!m_transaction);
+    ASSERT(transaction.isVersionChange());
+    ASSERT(!transaction.isFinishedOrFinishing());
+
+    m_transaction = &amp;transaction;
+}
+
+RefPtr&lt;WebCore::IDBTransaction&gt; IDBRequest::transaction() const
+{
+    return m_shouldExposeTransactionToDOM ? m_transaction : nullptr;
+}
+
+const String&amp; IDBRequest::readyState() const
+{
+    static WTF::NeverDestroyed&lt;String&gt; pendingString(&quot;pending&quot;);
+    static WTF::NeverDestroyed&lt;String&gt; doneString(&quot;done&quot;);
+
+    switch (m_readyState) {
+    case IDBRequestReadyState::Pending:
+        return pendingString;
+    case IDBRequestReadyState::Done:
+        return doneString;
+    default:
+        RELEASE_ASSERT_NOT_REACHED();
+    }
+}
+
+uint64_t IDBRequest::sourceObjectStoreIdentifier() const
+{
+    if (!m_source)
+        return 0;
+
+    if (m_source-&gt;type() == IDBAny::Type::IDBObjectStore) {
+        auto* objectStore = m_source-&gt;idbObjectStore().get();
+        if (!objectStore)
+            return 0;
+        return objectStore-&gt;info().identifier();
+    }
+
+    if (m_source-&gt;type() == IDBAny::Type::IDBIndex) {
+        auto* index = m_source-&gt;idbIndex().get();
+        if (!index)
+            return 0;
+        return index-&gt;info().objectStoreIdentifier();
+    }
+
+    return 0;
+}
+
+uint64_t IDBRequest::sourceIndexIdentifier() const
+{
+    if (!m_source)
+        return 0;
+    if (m_source-&gt;type() != IDBAny::Type::IDBIndex)
+        return 0;
+    if (!m_source-&gt;idbIndex())
+        return 0;
+
+    return m_source-&gt;idbIndex()-&gt;info().identifier();
+}
+
+IndexedDB::IndexRecordType IDBRequest::requestedIndexRecordType() const
+{
+    ASSERT(m_source);
+    ASSERT(m_source-&gt;type() == IDBAny::Type::IDBIndex);
+
+    return m_requestedIndexRecordType;
+}
+
+EventTargetInterface IDBRequest::eventTargetInterface() const
+{
+    return IDBRequestEventTargetInterfaceType;
+}
+
+const char* IDBRequest::activeDOMObjectName() const
+{
+    return &quot;IDBRequest&quot;;
+}
+
+bool IDBRequest::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+bool IDBRequest::hasPendingActivity() const
+{
+    return m_hasPendingActivity;
+}
+
+void IDBRequest::stop()
+{
+    ASSERT(!m_contextStopped);
+    m_contextStopped = true;
+}
+
+void IDBRequest::enqueueEvent(Ref&lt;Event&gt;&amp;&amp; event)
+{
+    if (!scriptExecutionContext() || m_contextStopped)
+        return;
+
+    event-&gt;setTarget(this);
+    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
+}
+
+bool IDBRequest::dispatchEvent(Event&amp; event)
+{
+    LOG(IndexedDB, &quot;IDBRequest::dispatchEvent - %s (%p)&quot;, event.type().string().utf8().data(), this);
+
+    ASSERT(m_hasPendingActivity);
+    ASSERT(!m_contextStopped);
+
+    if (event.type() != eventNames().blockedEvent)
+        m_readyState = IDBRequestReadyState::Done;
+
+    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
+    targets.append(this);
+
+    if (&amp;event == m_openDatabaseSuccessEvent)
+        m_openDatabaseSuccessEvent = nullptr;
+    else if (m_transaction &amp;&amp; !m_transaction-&gt;isFinished()) {
+        targets.append(m_transaction);
+        targets.append(m_transaction-&gt;db());
+    }
+
+    m_hasPendingActivity = false;
+
+    m_cursorRequestNotifier = nullptr;
+
+    bool dontPreventDefault;
+    {
+        TransactionActivator activator(m_transaction.get());
+        dontPreventDefault = IDBEventDispatcher::dispatch(event, targets);
+    }
+
+    // IDBEventDispatcher::dispatch() might have set the pending activity flag back to true, suggesting the request will be reused.
+    // We might also re-use the request if this event was the upgradeneeded event for an IDBOpenDBRequest.
+    if (!m_hasPendingActivity)
+        m_hasPendingActivity = isOpenDBRequest() &amp;&amp; (event.type() == eventNames().upgradeneededEvent || event.type() == eventNames().blockedEvent);
+
+    // The request should only remain in the transaction's request list if it represents a pending cursor operation, or this is an open request that was blocked.
+    if (m_transaction &amp;&amp; !m_pendingCursor &amp;&amp; event.type() != eventNames().blockedEvent)
+        m_transaction-&gt;removeRequest(*this);
+
+    if (dontPreventDefault &amp;&amp; event.type() == eventNames().errorEvent &amp;&amp; m_transaction &amp;&amp; !m_transaction-&gt;isFinishedOrFinishing()) {
+        ASSERT(m_domError);
+        m_transaction-&gt;abortDueToFailedRequest(*m_domError);
+    }
+
+    return dontPreventDefault;
+}
+
+void IDBRequest::uncaughtExceptionInEventHandler()
+{
+    LOG(IndexedDB, &quot;IDBRequest::uncaughtExceptionInEventHandler&quot;);
+
+    if (m_transaction &amp;&amp; m_idbError.code() != IDBDatabaseException::AbortError)
+        m_transaction-&gt;abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)));
+}
+
+void IDBRequest::setResult(const IDBKeyData* keyData)
+{
+    if (!keyData) {
+        m_result = nullptr;
+        return;
+    }
+
+    Deprecated::ScriptValue value = idbKeyDataToScriptValue(scriptExecutionContext(), *keyData);
+    m_result = IDBAny::create(WTFMove(value));
+}
+
+void IDBRequest::setResult(uint64_t number)
+{
+    ASSERT(scriptExecutionContext());
+    m_result = IDBAny::create(Deprecated::ScriptValue(scriptExecutionContext()-&gt;vm(), JSC::JSValue(number)));
+}
+
+void IDBRequest::setResultToStructuredClone(const ThreadSafeDataBuffer&amp; valueData)
+{
+    LOG(IndexedDB, &quot;IDBRequest::setResultToStructuredClone&quot;);
+
+    auto context = scriptExecutionContext();
+    if (!context)
+        return;
+
+    Deprecated::ScriptValue value = deserializeIDBValueData(*context, valueData);
+    m_result = IDBAny::create(WTFMove(value));
+}
+
+void IDBRequest::setResultToUndefined()
+{
+    m_result = IDBAny::createUndefined();
+}
+
+IDBCursor* IDBRequest::resultCursor()
+{
+    if (!m_result)
+        return nullptr;
+    if (m_result-&gt;type() == IDBAny::Type::IDBCursor || m_result-&gt;type() == IDBAny::Type::IDBCursorWithValue)
+        return m_result-&gt;idbCursor().get();
+    return nullptr;
+}
+
+void IDBRequest::willIterateCursor(IDBCursor&amp; cursor)
+{
+    ASSERT(m_readyState == IDBRequestReadyState::Done);
+    ASSERT(scriptExecutionContext());
+    ASSERT(m_transaction);
+    ASSERT(!m_pendingCursor);
+    ASSERT(&amp;cursor == resultCursor());
+    ASSERT(!m_cursorRequestNotifier);
+
+    m_pendingCursor = &amp;cursor;
+    m_hasPendingActivity = true;
+    m_result = nullptr;
+    m_readyState = IDBRequestReadyState::Pending;
+    m_domError = nullptr;
+    m_idbError = { };
+
+    m_cursorRequestNotifier = std::make_unique&lt;ScopeGuard&gt;([this]() {
+        m_pendingCursor-&gt;decrementOutstandingRequestCount();
+    });
+}
+
+void IDBRequest::didOpenOrIterateCursor(const IDBResultData&amp; resultData)
+{
+    ASSERT(m_pendingCursor);
+    m_result = nullptr;
+
+    if (resultData.type() == IDBResultType::IterateCursorSuccess || resultData.type() == IDBResultType::OpenCursorSuccess) {
+        m_pendingCursor-&gt;setGetResult(*this, resultData.getResult());
+        if (resultData.getResult().isDefined())
+            m_result = IDBAny::create(*m_pendingCursor);
+    }
+
+    m_cursorRequestNotifier = nullptr;
+    m_pendingCursor = nullptr;
+
+    requestCompleted(resultData);
+}
+
+void IDBRequest::requestCompleted(const IDBResultData&amp; resultData)
+{
+    m_readyState = IDBRequestReadyState::Done;
+
+    m_idbError = resultData.error();
+    if (!m_idbError.isNull())
+        onError();
+    else
+        onSuccess();
+}
+
+void IDBRequest::onError()
+{
+    LOG(IndexedDB, &quot;IDBRequest::onError&quot;);
+
+    ASSERT(!m_idbError.isNull());
+    m_domError = DOMError::create(m_idbError.name());
+    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
+}
+
+void IDBRequest::onSuccess()
+{
+    LOG(IndexedDB, &quot;IDBRequest::onSuccess&quot;);
+
+    enqueueEvent(Event::create(eventNames().successEvent, false, false));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,54 +23,144 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBRequest_h
-#define IDBRequest_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ActiveDOMObject.h&quot;
</span><del>-#include &quot;DOMError.h&quot;
-#include &quot;DOMStringList.h&quot;
-#include &quot;Event.h&quot;
-#include &quot;EventListener.h&quot;
</del><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;IDBAny.h&quot;
</span><del>-#include &quot;IDBCursor.h&quot;
-#include &quot;ScriptWrappable.h&quot;
</del><ins>+#include &quot;IDBResourceIdentifier.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;ScopeGuard.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class IDBTransaction;
</del><ins>+class Event;
+class IDBAny;
+class IDBCursor;
+class IDBIndex;
+class IDBKeyData;
+class IDBObjectStore;
+class IDBResultData;
+class ThreadSafeDataBuffer;
</ins><span class="cx"> 
</span><del>-struct ExceptionCodeWithMessage;
</del><ins>+namespace IDBClient {
+class IDBConnectionToServer;
+}
</ins><span class="cx"> 
</span><del>-typedef int ExceptionCode;
</del><ins>+namespace IndexedDB {
+enum class IndexRecordType;
+}
</ins><span class="cx"> 
</span><span class="cx"> // Defined in the IDL
</span><span class="cx"> enum class IDBRequestReadyState {
</span><span class="cx">     Pending = 1,
</span><span class="cx">     Done = 2,
</span><del>-    DeprecatedEarlyDeath = 3, // FIXME: https://bugs.webkit.org/show_bug.cgi?id=149117 - Remove this when removing LegacyIDB
</del><span class="cx"> };
</span><span class="cx"> 
</span><del>-class IDBRequest : public EventTargetWithInlineData, public ActiveDOMObject {
</del><ins>+class IDBRequest : public EventTargetWithInlineData, public ActiveDOMObject, public RefCounted&lt;IDBRequest&gt; {
</ins><span class="cx"> public:
</span><del>-    virtual ~IDBRequest() { }
</del><ins>+    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
+    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
+    static Ref&lt;IDBRequest&gt; createCount(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
+    static Ref&lt;IDBRequest&gt; createGet(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
</ins><span class="cx"> 
</span><del>-    virtual RefPtr&lt;IDBAny&gt; result(ExceptionCodeWithMessage&amp;) const = 0;
-    virtual unsigned short errorCode(ExceptionCode&amp;) const = 0;
-    virtual RefPtr&lt;DOMError&gt; error(ExceptionCodeWithMessage&amp;) const = 0;
-    virtual RefPtr&lt;IDBAny&gt; source() const = 0;
-    virtual RefPtr&lt;IDBTransaction&gt; transaction() const = 0;
</del><ins>+    const IDBResourceIdentifier&amp; resourceIdentifier() const { return m_resourceIdentifier; }
</ins><span class="cx"> 
</span><del>-    virtual const String&amp; readyState() const = 0;
</del><ins>+    virtual ~IDBRequest();
</ins><span class="cx"> 
</span><ins>+    RefPtr&lt;IDBAny&gt; result(ExceptionCodeWithMessage&amp;) const;
+    unsigned short errorCode(ExceptionCode&amp;) const;
+    RefPtr&lt;DOMError&gt; error(ExceptionCodeWithMessage&amp;) const;
+    RefPtr&lt;IDBAny&gt; source() const;
+    RefPtr&lt;IDBTransaction&gt; transaction() const;
+    const String&amp; readyState() const;
+
+    uint64_t sourceObjectStoreIdentifier() const;
+    uint64_t sourceIndexIdentifier() const;
+    IndexedDB::IndexRecordType requestedIndexRecordType() const;
+
+    // EventTarget
+    EventTargetInterface eventTargetInterface() const override;
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+
+    using RefCounted&lt;IDBRequest&gt;::ref;
+    using RefCounted&lt;IDBRequest&gt;::deref;
+
+    void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
+    bool dispatchEvent(Event&amp;) override;
+
+    IDBClient::IDBConnectionToServer&amp; connection() { return m_connection; }
+
+    void requestCompleted(const IDBResultData&amp;);
+
+    void setResult(const IDBKeyData*);
+    void setResult(uint64_t);
+    void setResultToStructuredClone(const ThreadSafeDataBuffer&amp;);
+    void setResultToUndefined();
+
+    IDBAny* modernResult() { return m_result.get(); }
+
+    void willIterateCursor(IDBCursor&amp;);
+    void didOpenOrIterateCursor(const IDBResultData&amp;);
+
+    const IDBCursor* pendingCursor() const { return m_pendingCursor.get(); }
+
+    void setSource(IDBCursor&amp;);
+    void setVersionChangeTransaction(IDBTransaction&amp;);
+
+    IndexedDB::RequestType requestType() const { return m_requestType; }
+
+    // ActiveDOMObject.
+    const char* activeDOMObjectName() const final;
+    bool canSuspendForDocumentSuspension() const final;
+    bool hasPendingActivity() const final;
+    void stop() final;
+
</ins><span class="cx"> protected:
</span><del>-    IDBRequest(ScriptExecutionContext&amp;);
</del><ins>+    IDBRequest(IDBClient::IDBConnectionToServer&amp;, ScriptExecutionContext&amp;);
+    IDBRequest(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
+    IDBRequest(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
+    IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
+    IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
+
+    // EventTarget.
+    void refEventTarget() final { RefCounted&lt;IDBRequest&gt;::ref(); }
+    void derefEventTarget() final { RefCounted&lt;IDBRequest&gt;::deref(); }
+    void uncaughtExceptionInEventHandler() final;
+
+    virtual bool isOpenDBRequest() const { return false; }
+
+    IDBRequestReadyState m_readyState { IDBRequestReadyState::Pending };
+    RefPtr&lt;IDBAny&gt; m_result;
+    RefPtr&lt;IDBTransaction&gt; m_transaction;
+    bool m_shouldExposeTransactionToDOM { true };
+    RefPtr&lt;DOMError&gt; m_domError;
+    IDBError m_idbError;
+    IndexedDB::RequestType m_requestType = { IndexedDB::RequestType::Other };
+    bool m_contextStopped { false };
+
+    Event* m_openDatabaseSuccessEvent { nullptr };
+
+private:
+    void onError();
+    void onSuccess();
+
+    IDBCursor* resultCursor();
+
+    IDBClient::IDBConnectionToServer&amp; m_connection;
+    IDBResourceIdentifier m_resourceIdentifier;
+    RefPtr&lt;IDBAny&gt; m_source;
+    bool m_hasPendingActivity { true };
+    IndexedDB::IndexRecordType m_requestedIndexRecordType;
+
+    RefPtr&lt;IDBCursor&gt; m_pendingCursor;
+
+    std::unique_ptr&lt;ScopeGuard&gt; m_cursorRequestNotifier;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // LegacyRequest_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestCompletionEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBRequestCompletionEvent::IDBRequestCompletionEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBClient::IDBRequest&amp; request)
</del><ins>+IDBRequestCompletionEvent::IDBRequestCompletionEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBRequest&amp; request)
</ins><span class="cx">     : Event(type, canBubble, cancelable)
</span><span class="cx">     , m_request(request)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestCompletionEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -29,21 +29,21 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;IDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBRequest.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBRequestCompletionEvent : public Event {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;Event&gt; create(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBClient::IDBRequest&amp; request)
</del><ins>+    static Ref&lt;Event&gt; create(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBRequest&amp; request)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(*new IDBRequestCompletionEvent(type, canBubble, cancelable, request));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    IDBRequestCompletionEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBClient::IDBRequest&amp;);
</del><ins>+    IDBRequestCompletionEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, IDBRequest&amp;);
</ins><span class="cx"> 
</span><del>-    Ref&lt;IDBClient::IDBRequest&gt; m_request;
</del><ins>+    Ref&lt;IDBRequest&gt; m_request;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,16 +28,28 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;ExceptionCode.h&quot;
</del><ins>+#include &quot;DOMError.h&quot;
+#include &quot;Event.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBError.h&quot;
+#include &quot;IDBEventDispatcher.h&quot;
+#include &quot;IDBKeyData.h&quot;
+#include &quot;IDBKeyRangeData.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;IDBResultData.h&quot;
+#include &quot;JSDOMWindowBase.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;TransactionOperation.h&quot;
</ins><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBTransaction::IDBTransaction(ScriptExecutionContext* context)
-    : ActiveDOMObject(context)
-{
-}
-
</del><span class="cx"> const AtomicString&amp; IDBTransaction::modeReadOnly()
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;AtomicString&gt; readonly(&quot;readonly&quot;, AtomicString::ConstructFromLiteral);
</span><span class="lines">@@ -97,6 +109,858 @@
</span><span class="cx">     return IDBTransaction::modeReadOnly();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;IDBTransaction&gt; IDBTransaction::create(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info)
+{
+    return adoptRef(*new IDBTransaction(database, info, nullptr));
+}
+
+Ref&lt;IDBTransaction&gt; IDBTransaction::create(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info, IDBOpenDBRequest&amp; request)
+{
+    return adoptRef(*new IDBTransaction(database, info, &amp;request));
+}
+
+IDBTransaction::IDBTransaction(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info, IDBOpenDBRequest* request)
+    : WebCore::ActiveDOMObject(database.scriptExecutionContext())
+    , m_database(database)
+    , m_info(info)
+    , m_operationTimer(*this, &amp;IDBTransaction::operationTimerFired)
+    , m_openDBRequest(request)
+
+{
+    LOG(IndexedDB, &quot;IDBTransaction::IDBTransaction - %s&quot;, m_info.loggingString().utf8().data());
+
+    relaxAdoptionRequirement();
+
+    if (m_info.mode() == IndexedDB::TransactionMode::VersionChange) {
+        ASSERT(m_openDBRequest);
+        m_openDBRequest-&gt;setVersionChangeTransaction(*this);
+        m_startedOnServer = true;
+    } else {
+        activate();
+
+        RefPtr&lt;IDBTransaction&gt; self;
+        JSC::VM&amp; vm = JSDOMWindowBase::commonVM();
+        vm.whenIdle([self, this]() {
+            deactivate();
+        });
+
+        establishOnServer();
+    }
+
+    suspendIfNeeded();
+}
+
+IDBTransaction::~IDBTransaction()
+{
+}
+
+const String&amp; IDBTransaction::mode() const
+{
+    switch (m_info.mode()) {
+    case IndexedDB::TransactionMode::ReadOnly:
+        return IDBTransaction::modeReadOnly();
+    case IndexedDB::TransactionMode::ReadWrite:
+        return IDBTransaction::modeReadWrite();
+    case IndexedDB::TransactionMode::VersionChange:
+        return IDBTransaction::modeVersionChange();
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+WebCore::IDBDatabase* IDBTransaction::db()
+{
+    return &amp;m_database.get();
+}
+
+IDBClient::IDBConnectionToServer&amp; IDBTransaction::serverConnection()
+{
+    return m_database-&gt;serverConnection();
+}
+
+RefPtr&lt;DOMError&gt; IDBTransaction::error() const
+{
+    return m_domError;
+}
+
+RefPtr&lt;WebCore::IDBObjectStore&gt; IDBTransaction::objectStore(const String&amp; objectStoreName, ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::objectStore&quot;);
+
+    if (!scriptExecutionContext())
+        return nullptr;
+
+    if (isFinishedOrFinishing()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The transaction finished.&quot;);
+        return nullptr;
+    }
+
+    auto iterator = m_referencedObjectStores.find(objectStoreName);
+    if (iterator != m_referencedObjectStores.end())
+        return iterator-&gt;value;
+
+    bool found = false;
+    for (auto&amp; objectStore : m_info.objectStores()) {
+        if (objectStore == objectStoreName) {
+            found = true;
+            break;
+        }
+    }
+
+    auto* info = m_database-&gt;info().infoForExistingObjectStore(objectStoreName);
+    if (!info) {
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.&quot;);
+        return nullptr;
+    }
+
+    // Version change transactions are scoped to every object store in the database.
+    if (!info || (!found &amp;&amp; !isVersionChange())) {
+        ec.code = IDBDatabaseException::NotFoundError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.&quot;);
+        return nullptr;
+    }
+
+    auto objectStore = IDBObjectStore::create(*scriptExecutionContext(), *info, *this);
+    m_referencedObjectStores.set(objectStoreName, &amp;objectStore.get());
+
+    return adoptRef(&amp;objectStore.leakRef());
+}
+
+
+void IDBTransaction::abortDueToFailedRequest(DOMError&amp; error)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::abortDueToFailedRequest&quot;);
+    if (isFinishedOrFinishing())
+        return;
+
+    m_domError = &amp;error;
+    ExceptionCodeWithMessage ec;
+    abort(ec);
+}
+
+void IDBTransaction::transitionedToFinishing(IndexedDB::TransactionState state)
+{
+    ASSERT(!isFinishedOrFinishing());
+    m_state = state;
+    ASSERT(isFinishedOrFinishing());
+    m_referencedObjectStores.clear();
+}
+
+void IDBTransaction::abort(ExceptionCodeWithMessage&amp; ec)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::abort&quot;);
+
+    if (isFinishedOrFinishing()) {
+        ec.code = IDBDatabaseException::InvalidStateError;
+        ec.message = ASCIILiteral(&quot;Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.&quot;);
+        return;
+    }
+
+    m_database-&gt;willAbortTransaction(*this);
+
+    if (isVersionChange()) {
+        for (auto&amp; objectStore : m_referencedObjectStores.values())
+            objectStore-&gt;rollbackInfoForVersionChangeAbort();
+    }
+
+    transitionedToFinishing(IndexedDB::TransactionState::Aborting);
+    
+    m_abortQueue.swap(m_transactionOperationQueue);
+
+    auto operation = IDBClient::createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServerAndCancelRequests);
+    scheduleOperation(WTFMove(operation));
+}
+
+void IDBTransaction::abortOnServerAndCancelRequests(IDBClient::TransactionOperation&amp; operation)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::abortOnServerAndCancelRequests&quot;);
+
+    ASSERT(m_transactionOperationQueue.isEmpty());
+
+    serverConnection().abortTransaction(*this);
+
+    ASSERT(m_transactionOperationMap.contains(operation.identifier()));
+    m_transactionOperationMap.remove(operation.identifier());
+
+    IDBError error(IDBDatabaseException::AbortError);
+    for (auto&amp; operation : m_abortQueue)
+        operation-&gt;completed(IDBResultData::error(operation-&gt;identifier(), error));
+
+    // Since we're aborting, it should be impossible to have queued any further operations.
+    ASSERT(m_transactionOperationQueue.isEmpty());
+}
+
+const char* IDBTransaction::activeDOMObjectName() const
+{
+    return &quot;IDBTransaction&quot;;
+}
+
+bool IDBTransaction::canSuspendForDocumentSuspension() const
+{
+    return false;
+}
+
+bool IDBTransaction::hasPendingActivity() const
+{
+    return !m_contextStopped &amp;&amp; m_state != IndexedDB::TransactionState::Finished;
+}
+
+void IDBTransaction::stop()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::stop&quot;);
+
+    // IDBDatabase::stop() calls IDBTransaction::stop() for each of its active transactions.
+    // Since the order of calling ActiveDOMObject::stop() is random, we might already have been stopped.
+    if (m_contextStopped)
+        return;
+
+    m_contextStopped = true;
+
+    if (isFinishedOrFinishing())
+        return;
+
+    ExceptionCodeWithMessage ec;
+    abort(ec);
+}
+
+bool IDBTransaction::isActive() const
+{
+    return m_state == IndexedDB::TransactionState::Active;
+}
+
+bool IDBTransaction::isFinishedOrFinishing() const
+{
+    return m_state == IndexedDB::TransactionState::Committing
+        || m_state == IndexedDB::TransactionState::Aborting
+        || m_state == IndexedDB::TransactionState::Finished;
+}
+
+void IDBTransaction::addRequest(IDBRequest&amp; request)
+{
+    m_openRequests.add(&amp;request);
+}
+
+void IDBTransaction::removeRequest(IDBRequest&amp; request)
+{
+    ASSERT(m_openRequests.contains(&amp;request));
+    m_openRequests.remove(&amp;request);
+}
+
+void IDBTransaction::scheduleOperation(RefPtr&lt;IDBClient::TransactionOperation&gt;&amp;&amp; operation)
+{
+    ASSERT(!m_transactionOperationMap.contains(operation-&gt;identifier()));
+
+    m_transactionOperationQueue.append(operation);
+    m_transactionOperationMap.set(operation-&gt;identifier(), WTFMove(operation));
+
+    scheduleOperationTimer();
+}
+
+void IDBTransaction::scheduleOperationTimer()
+{
+    if (!m_operationTimer.isActive())
+        m_operationTimer.startOneShot(0);
+}
+
+void IDBTransaction::operationTimerFired()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::operationTimerFired (%p)&quot;, this);
+
+    if (!m_startedOnServer)
+        return;
+
+    if (!m_transactionOperationQueue.isEmpty()) {
+        auto operation = m_transactionOperationQueue.takeFirst();
+        operation-&gt;perform();
+
+        return;
+    }
+
+    if (!m_transactionOperationMap.isEmpty() || !m_openRequests.isEmpty())
+        return;
+
+    if (!isFinishedOrFinishing())
+        commit();
+}
+
+void IDBTransaction::commit()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::commit&quot;);
+
+    ASSERT(!isFinishedOrFinishing());
+
+    transitionedToFinishing(IndexedDB::TransactionState::Committing);
+    m_database-&gt;willCommitTransaction(*this);
+
+    auto operation = IDBClient::createTransactionOperation(*this, nullptr, &amp;IDBTransaction::commitOnServer);
+    scheduleOperation(WTFMove(operation));
+}
+
+void IDBTransaction::commitOnServer(IDBClient::TransactionOperation&amp; operation)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::commitOnServer&quot;);
+    serverConnection().commitTransaction(*this);
+
+    ASSERT(m_transactionOperationMap.contains(operation.identifier()));
+    m_transactionOperationMap.remove(operation.identifier());
+}
+
+void IDBTransaction::finishAbortOrCommit()
+{
+    ASSERT(m_state != IndexedDB::TransactionState::Finished);
+    m_state = IndexedDB::TransactionState::Finished;
+}
+
+void IDBTransaction::didStart(const IDBError&amp; error)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didStart&quot;);
+
+    m_database-&gt;didStartTransaction(*this);
+
+    m_startedOnServer = true;
+
+    // It's possible the transaction failed to start on the server.
+    // That equates to an abort.
+    if (!error.isNull()) {
+        didAbort(error);
+        return;
+    }
+
+    scheduleOperationTimer();
+}
+
+void IDBTransaction::notifyDidAbort(const IDBError&amp; error)
+{
+    m_database-&gt;didAbortTransaction(*this);
+    m_idbError = error;
+    fireOnAbort();
+
+    if (isVersionChange()) {
+        ASSERT(m_openDBRequest);
+        m_openDBRequest-&gt;fireErrorAfterVersionChangeCompletion();
+    }
+}
+
+void IDBTransaction::didAbort(const IDBError&amp; error)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didAbort&quot;);
+
+    if (m_state == IndexedDB::TransactionState::Finished)
+        return;
+
+    notifyDidAbort(error);
+
+    finishAbortOrCommit();
+}
+
+void IDBTransaction::didCommit(const IDBError&amp; error)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didCommit&quot;);
+
+    ASSERT(m_state == IndexedDB::TransactionState::Committing);
+
+    if (error.isNull()) {
+        m_database-&gt;didCommitTransaction(*this);
+        fireOnComplete();
+    } else {
+        m_database-&gt;willAbortTransaction(*this);
+        notifyDidAbort(error);
+    }
+
+    finishAbortOrCommit();
+}
+
+void IDBTransaction::fireOnComplete()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::fireOnComplete&quot;);
+    enqueueEvent(Event::create(eventNames().completeEvent, false, false));
+}
+
+void IDBTransaction::fireOnAbort()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::fireOnAbort&quot;);
+    enqueueEvent(Event::create(eventNames().abortEvent, true, false));
+}
+
+void IDBTransaction::enqueueEvent(Ref&lt;Event&gt;&amp;&amp; event)
+{
+    ASSERT(m_state != IndexedDB::TransactionState::Finished);
+
+    if (!scriptExecutionContext() || m_contextStopped)
+        return;
+
+    event-&gt;setTarget(this);
+    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
+}
+
+bool IDBTransaction::dispatchEvent(Event&amp; event)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::dispatchEvent&quot;);
+
+    ASSERT(scriptExecutionContext());
+    ASSERT(!m_contextStopped);
+    ASSERT(event.target() == this);
+    ASSERT(event.type() == eventNames().completeEvent || event.type() == eventNames().abortEvent);
+
+    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
+    targets.append(this);
+    targets.append(db());
+
+    bool result = IDBEventDispatcher::dispatch(event, targets);
+
+    if (isVersionChange()) {
+        ASSERT(m_openDBRequest);
+        m_openDBRequest-&gt;versionChangeTransactionDidFinish();
+
+        if (event.type() == eventNames().completeEvent) {
+            if (m_database-&gt;isClosingOrClosed())
+                m_openDBRequest-&gt;fireErrorAfterVersionChangeCompletion();
+            else
+                m_openDBRequest-&gt;fireSuccessAfterVersionChangeCommit();
+        }
+
+        m_openDBRequest = nullptr;
+    }
+
+    return result;
+}
+
+Ref&lt;IDBObjectStore&gt; IDBTransaction::createObjectStore(const IDBObjectStoreInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::createObjectStore&quot;);
+    ASSERT(isVersionChange());
+    ASSERT(scriptExecutionContext());
+
+    Ref&lt;IDBObjectStore&gt; objectStore = IDBObjectStore::create(*scriptExecutionContext(), info, *this);
+    m_referencedObjectStores.set(info.name(), &amp;objectStore.get());
+
+    auto operation = IDBClient::createTransactionOperation(*this, &amp;IDBTransaction::didCreateObjectStoreOnServer, &amp;IDBTransaction::createObjectStoreOnServer, info);
+    scheduleOperation(WTFMove(operation));
+
+    return objectStore;
+}
+
+void IDBTransaction::createObjectStoreOnServer(IDBClient::TransactionOperation&amp; operation, const IDBObjectStoreInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::createObjectStoreOnServer&quot;);
+
+    ASSERT(isVersionChange());
+
+    m_database-&gt;serverConnection().createObjectStore(operation, info);
+}
+
+void IDBTransaction::didCreateObjectStoreOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didCreateObjectStoreOnServer&quot;);
+
+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess || resultData.type() == IDBResultType::Error);
+}
+
+std::unique_ptr&lt;IDBIndex&gt; IDBTransaction::createIndex(IDBObjectStore&amp; objectStore, const IDBIndexInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::createIndex&quot;);
+    ASSERT(isVersionChange());
+
+    if (!scriptExecutionContext())
+        return nullptr;
+
+    auto operation = IDBClient::createTransactionOperation(*this, &amp;IDBTransaction::didCreateIndexOnServer, &amp;IDBTransaction::createIndexOnServer, info);
+    scheduleOperation(WTFMove(operation));
+
+    return std::make_unique&lt;IDBIndex&gt;(*scriptExecutionContext(), info, objectStore);
+}
+
+void IDBTransaction::createIndexOnServer(IDBClient::TransactionOperation&amp; operation, const IDBIndexInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::createIndexOnServer&quot;);
+
+    ASSERT(isVersionChange());
+
+    m_database-&gt;serverConnection().createIndex(operation, info);
+}
+
+void IDBTransaction::didCreateIndexOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didCreateIndexOnServer&quot;);
+
+    if (resultData.type() == IDBResultType::CreateIndexSuccess)
+        return;
+
+    ASSERT(resultData.type() == IDBResultType::Error);
+
+    // This operation might have failed because the transaction is already aborting.
+    if (m_state == IndexedDB::TransactionState::Aborting)
+        return;
+
+    // Otherwise, failure to create an index forced abortion of the transaction.
+    abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(resultData.error().code())));
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
+
+    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, objectStore, info));
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
+
+    if (info.cursorType() == IndexedDB::CursorType::KeyOnly)
+        return doRequestOpenCursor(context, IDBCursor::create(*this, index, info));
+
+    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, index, info));
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::doRequestOpenCursor(ScriptExecutionContext&amp; context, Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
+{
+    ASSERT(isActive());
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, cursor.get(), *this);
+    addRequest(request.get());
+
+    auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didOpenCursorOnServer, &amp;IDBTransaction::openCursorOnServer, cursor-&gt;info());
+    scheduleOperation(WTFMove(operation));
+
+    return request;
+}
+
+void IDBTransaction::openCursorOnServer(IDBClient::TransactionOperation&amp; operation, const IDBCursorInfo&amp; info)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::openCursorOnServer&quot;);
+
+    m_database-&gt;serverConnection().openCursor(operation, info);
+}
+
+void IDBTransaction::didOpenCursorOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didOpenCursorOnServer&quot;);
+
+    request.didOpenOrIterateCursor(resultData);
+}
+
+void IDBTransaction::iterateCursor(IDBCursor&amp; cursor, const IDBKeyData&amp; key, unsigned long count)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::iterateCursor&quot;);
+    ASSERT(isActive());
+    ASSERT(cursor.request());
+
+    addRequest(*cursor.request());
+
+    auto operation = IDBClient::createTransactionOperation(*this, *cursor.request(), &amp;IDBTransaction::didIterateCursorOnServer, &amp;IDBTransaction::iterateCursorOnServer, key, count);
+    scheduleOperation(WTFMove(operation));
+}
+
+void IDBTransaction::iterateCursorOnServer(IDBClient::TransactionOperation&amp; operation, const IDBKeyData&amp; key, const unsigned long&amp; count)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::iterateCursorOnServer&quot;);
+
+    serverConnection().iterateCursor(operation, key, count);
+}
+
+void IDBTransaction::didIterateCursorOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didIterateCursorOnServer&quot;);
+
+    request.didOpenOrIterateCursor(resultData);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; keyRangeData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestGetRecord&quot;);
+    ASSERT(isActive());
+    ASSERT(!keyRangeData.isNull);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
+    addRequest(request.get());
+
+    auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, keyRangeData);
+    scheduleOperation(WTFMove(operation));
+
+    return request;
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetValue(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
+    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Value, range);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetKey(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
+    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Key, range);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestIndexRecord(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType type, const IDBKeyRangeData&amp;range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
+    ASSERT(isActive());
+    ASSERT(!range.isNull);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::createGet(context, index, type, *this);
+    addRequest(request.get());
+
+    auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, range);
+    scheduleOperation(WTFMove(operation));
+
+    return request;
+}
+
+void IDBTransaction::getRecordOnServer(IDBClient::TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::getRecordOnServer&quot;);
+
+    serverConnection().getRecord(operation, keyRange);
+}
+
+void IDBTransaction::didGetRecordOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didGetRecordOnServer&quot;);
+
+    if (resultData.type() == IDBResultType::Error) {
+        request.requestCompleted(resultData);
+        return;
+    }
+
+    ASSERT(resultData.type() == IDBResultType::GetRecordSuccess);
+
+    const IDBGetResult&amp; result = resultData.getResult();
+
+    if (request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
+        if (!result.keyData().isNull())
+            request.setResult(&amp;result.keyData());
+        else
+            request.setResultToUndefined();
+    } else {
+        if (resultData.getResult().valueBuffer().data())
+            request.setResultToStructuredClone(resultData.getResult().valueBuffer());
+        else
+            request.setResultToUndefined();
+    }
+
+    request.requestCompleted(resultData);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBObjectStore)&quot;);
+    ASSERT(isActive());
+    ASSERT(!range.isNull);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
+    addRequest(request.get());
+
+    scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
+
+    return request;
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBIndex)&quot;);
+    ASSERT(isActive());
+    ASSERT(!range.isNull);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::createCount(context, index, *this);
+    addRequest(request.get());
+
+    scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
+
+    return request;
+}
+
+void IDBTransaction::getCountOnServer(IDBClient::TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::getCountOnServer&quot;);
+
+    serverConnection().getCount(operation, keyRange);
+}
+
+void IDBTransaction::didGetCountOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didGetCountOnServer&quot;);
+
+    request.setResult(resultData.resultInteger());
+    request.requestCompleted(resultData);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestDeleteRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestDeleteRecord&quot;);
+    ASSERT(isActive());
+    ASSERT(!range.isNull);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
+    addRequest(request.get());
+
+    scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didDeleteRecordOnServer, &amp;IDBTransaction::deleteRecordOnServer, range));
+    return request;
+}
+
+void IDBTransaction::deleteRecordOnServer(IDBClient::TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteRecordOnServer&quot;);
+
+    serverConnection().deleteRecord(operation, keyRange);
+}
+
+void IDBTransaction::didDeleteRecordOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didDeleteRecordOnServer&quot;);
+
+    request.setResultToUndefined();
+    request.requestCompleted(resultData);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestClearObjectStore(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestClearObjectStore&quot;);
+    ASSERT(isActive());
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
+    addRequest(request.get());
+
+    uint64_t objectStoreIdentifier = objectStore.info().identifier();
+    auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didClearObjectStoreOnServer, &amp;IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier);
+    scheduleOperation(WTFMove(operation));
+
+    return request;
+}
+
+void IDBTransaction::clearObjectStoreOnServer(IDBClient::TransactionOperation&amp; operation, const uint64_t&amp; objectStoreIdentifier)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::clearObjectStoreOnServer&quot;);
+
+    serverConnection().clearObjectStore(operation, objectStoreIdentifier);
+}
+
+void IDBTransaction::didClearObjectStoreOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didClearObjectStoreOnServer&quot;);
+
+    request.setResultToUndefined();
+    request.requestCompleted(resultData);
+}
+
+Ref&lt;IDBRequest&gt; IDBTransaction::requestPutOrAdd(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBKey* key, SerializedScriptValue&amp; value, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::requestPutOrAdd&quot;);
+    ASSERT(isActive());
+    ASSERT(!isReadOnly());
+    ASSERT(objectStore.info().autoIncrement() || key);
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
+    addRequest(request.get());
+
+    auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didPutOrAddOnServer, &amp;IDBTransaction::putOrAddOnServer, key, &amp;value, overwriteMode);
+    scheduleOperation(WTFMove(operation));
+
+    return request;
+}
+
+void IDBTransaction::putOrAddOnServer(IDBClient::TransactionOperation&amp; operation, RefPtr&lt;IDBKey&gt; key, RefPtr&lt;SerializedScriptValue&gt; value, const IndexedDB::ObjectStoreOverwriteMode&amp; overwriteMode)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::putOrAddOnServer&quot;);
+
+    ASSERT(!isReadOnly());
+
+    serverConnection().putOrAdd(operation, key, value, overwriteMode);
+}
+
+void IDBTransaction::didPutOrAddOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didPutOrAddOnServer&quot;);
+
+    request.setResult(resultData.resultKey());
+    request.requestCompleted(resultData);
+}
+
+void IDBTransaction::deleteObjectStore(const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStore&quot;);
+
+    ASSERT(isVersionChange());
+
+    if (auto objectStore = m_referencedObjectStores.take(objectStoreName))
+        objectStore-&gt;markAsDeleted();
+
+    auto operation = IDBClient::createTransactionOperation(*this, &amp;IDBTransaction::didDeleteObjectStoreOnServer, &amp;IDBTransaction::deleteObjectStoreOnServer, objectStoreName);
+    scheduleOperation(WTFMove(operation));
+}
+
+void IDBTransaction::deleteObjectStoreOnServer(IDBClient::TransactionOperation&amp; operation, const String&amp; objectStoreName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStoreOnServer&quot;);
+    ASSERT(isVersionChange());
+
+    serverConnection().deleteObjectStore(operation, objectStoreName);
+}
+
+void IDBTransaction::didDeleteObjectStoreOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didDeleteObjectStoreOnServer&quot;);
+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteObjectStoreSuccess || resultData.type() == IDBResultType::Error);
+}
+
+void IDBTransaction::deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteIndex&quot;);
+
+    ASSERT(isVersionChange());
+
+    auto operation = IDBClient::createTransactionOperation(*this, &amp;IDBTransaction::didDeleteIndexOnServer, &amp;IDBTransaction::deleteIndexOnServer, objectStoreIdentifier, indexName);
+    scheduleOperation(WTFMove(operation));
+}
+
+void IDBTransaction::deleteIndexOnServer(IDBClient::TransactionOperation&amp; operation, const uint64_t&amp; objectStoreIdentifier, const String&amp; indexName)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::deleteIndexOnServer&quot;);
+    ASSERT(isVersionChange());
+
+    serverConnection().deleteIndex(operation, objectStoreIdentifier, indexName);
+}
+
+void IDBTransaction::didDeleteIndexOnServer(const IDBResultData&amp; resultData)
+{
+    LOG(IndexedDB, &quot;IDBTransaction::didDeleteIndexOnServer&quot;);
+    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteIndexSuccess || resultData.type() == IDBResultType::Error);
+}
+
+void IDBTransaction::operationDidComplete(IDBClient::TransactionOperation&amp; operation)
+{
+    ASSERT(m_transactionOperationMap.get(operation.identifier()) == &amp;operation);
+    m_transactionOperationMap.remove(operation.identifier());
+
+    scheduleOperationTimer();
+}
+
+void IDBTransaction::establishOnServer()
+{
+    LOG(IndexedDB, &quot;IDBTransaction::establishOnServer&quot;);
+
+    serverConnection().establishTransaction(*this);
+}
+
+void IDBTransaction::activate()
+{
+    if (isFinishedOrFinishing())
+        return;
+
+    m_state = IndexedDB::TransactionState::Active;
+}
+
+void IDBTransaction::deactivate()
+{
+    if (m_state == IndexedDB::TransactionState::Active)
+        m_state = IndexedDB::TransactionState::Inactive;
+
+    scheduleOperationTimer();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,33 +23,41 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBTransaction_h
-#define IDBTransaction_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;EventTarget.h&quot;
</del><ins>+#include &quot;IDBDatabaseInfo.h&quot;
+#include &quot;IDBError.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IDBTransactionInfo.h&quot;
</ins><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><del>-#include &quot;ScriptWrappable.h&quot;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
</del><ins>+#include &quot;Timer.h&quot;
+#include &lt;wtf/Deque.h&gt;
+#include &lt;wtf/HashMap.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class DOMError;
</del><span class="cx"> class IDBCursor;
</span><ins>+class IDBCursorInfo;
</ins><span class="cx"> class IDBDatabase;
</span><del>-class IDBDatabaseError;
</del><ins>+class IDBIndex;
+class IDBIndexInfo;
+class IDBKeyData;
</ins><span class="cx"> class IDBObjectStore;
</span><ins>+class IDBObjectStoreInfo;
</ins><span class="cx"> class IDBOpenDBRequest;
</span><ins>+class IDBResultData;
+struct IDBKeyRangeData;
</ins><span class="cx"> 
</span><del>-struct ExceptionCodeWithMessage;
</del><ins>+namespace IDBClient {
+class TransactionOperation;
+}
</ins><span class="cx"> 
</span><span class="cx"> class IDBTransaction : public RefCounted&lt;IDBTransaction&gt;, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>-    virtual ~IDBTransaction() { }
-
</del><span class="cx">     static const AtomicString&amp; modeReadOnly();
</span><span class="cx">     static const AtomicString&amp; modeReadWrite();
</span><span class="cx">     static const AtomicString&amp; modeVersionChange();
</span><span class="lines">@@ -59,22 +67,184 @@
</span><span class="cx">     static IndexedDB::TransactionMode stringToMode(const String&amp;, ExceptionCode&amp;);
</span><span class="cx">     static const AtomicString&amp; modeToString(IndexedDB::TransactionMode);
</span><span class="cx"> 
</span><del>-    // Implement the IDBTransaction IDL
-    virtual const String&amp; mode() const = 0;
-    virtual IDBDatabase* db() = 0;
-    virtual RefPtr&lt;DOMError&gt; error() const = 0;
-    virtual RefPtr&lt;IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCodeWithMessage&amp;) = 0;
-    virtual void abort(ExceptionCodeWithMessage&amp;) = 0;
</del><ins>+    static Ref&lt;IDBTransaction&gt; create(IDBDatabase&amp;, const IDBTransactionInfo&amp;);
+    static Ref&lt;IDBTransaction&gt; create(IDBDatabase&amp;, const IDBTransactionInfo&amp;, IDBOpenDBRequest&amp;);
</ins><span class="cx"> 
</span><ins>+    ~IDBTransaction() final;
+
+    // IDBTransaction IDL
+    const String&amp; mode() const;
+    WebCore::IDBDatabase* db();
+    RefPtr&lt;DOMError&gt; error() const;
+    RefPtr&lt;WebCore::IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCodeWithMessage&amp;);
+    void abort(ExceptionCodeWithMessage&amp;);
+
+    EventTargetInterface eventTargetInterface() const final { return IDBTransactionEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+    void refEventTarget() final { RefCounted&lt;IDBTransaction&gt;::ref(); }
+    void derefEventTarget() final { RefCounted&lt;IDBTransaction&gt;::deref(); }
+    using EventTarget::dispatchEvent;
+    bool dispatchEvent(Event&amp;) final;
+
</ins><span class="cx">     using RefCounted&lt;IDBTransaction&gt;::ref;
</span><span class="cx">     using RefCounted&lt;IDBTransaction&gt;::deref;
</span><span class="cx"> 
</span><del>-protected:
-    IDBTransaction(ScriptExecutionContext*);
</del><ins>+    const char* activeDOMObjectName() const final;
+    bool canSuspendForDocumentSuspension() const final;
+    bool hasPendingActivity() const final;
+    void stop() final;
+
+    const IDBTransactionInfo&amp; info() const { return m_info; }
+    IDBDatabase&amp; database() { return m_database.get(); }
+    const IDBDatabase&amp; database() const { return m_database.get(); }
+    IDBDatabaseInfo* originalDatabaseInfo() const { return m_info.originalDatabaseInfo(); }
+
+    void didStart(const IDBError&amp;);
+    void didAbort(const IDBError&amp;);
+    void didCommit(const IDBError&amp;);
+
+    bool isVersionChange() const { return m_info.mode() == IndexedDB::TransactionMode::VersionChange; }
+    bool isReadOnly() const { return m_info.mode() == IndexedDB::TransactionMode::ReadOnly; }
+    bool isActive() const;
+
+    Ref&lt;IDBObjectStore&gt; createObjectStore(const IDBObjectStoreInfo&amp;);
+    std::unique_ptr&lt;IDBIndex&gt; createIndex(IDBObjectStore&amp;, const IDBIndexInfo&amp;);
+
+    Ref&lt;IDBRequest&gt; requestPutOrAdd(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
+    Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestDeleteRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestClearObjectStore(ScriptExecutionContext&amp;, IDBObjectStore&amp;);
+    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestGetValue(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestGetKey(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
+    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
+    void iterateCursor(IDBCursor&amp;, const IDBKeyData&amp;, unsigned long count);
+
+    void deleteObjectStore(const String&amp; objectStoreName);
+    void deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName);
+
+    void addRequest(IDBRequest&amp;);
+    void removeRequest(IDBRequest&amp;);
+
+    void abortDueToFailedRequest(DOMError&amp;);
+
+    IDBClient::IDBConnectionToServer&amp; serverConnection();
+
+    void activate();
+    void deactivate();
+
+    void operationDidComplete(IDBClient::TransactionOperation&amp;);
+
+    bool isFinishedOrFinishing() const;
+    bool isFinished() const { return m_state == IndexedDB::TransactionState::Finished; }
+
+private:
+    IDBTransaction(IDBDatabase&amp;, const IDBTransactionInfo&amp;, IDBOpenDBRequest*);
+
+    void commit();
+
+    void notifyDidAbort(const IDBError&amp;);
+    void finishAbortOrCommit();
+
+    void scheduleOperation(RefPtr&lt;IDBClient::TransactionOperation&gt;&amp;&amp;);
+    void operationTimerFired();
+
+    void fireOnComplete();
+    void fireOnAbort();
+    void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
+
+    Ref&lt;IDBRequest&gt; requestIndexRecord(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
+
+    void commitOnServer(IDBClient::TransactionOperation&amp;);
+    void abortOnServerAndCancelRequests(IDBClient::TransactionOperation&amp;);
+
+    void createObjectStoreOnServer(IDBClient::TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
+    void didCreateObjectStoreOnServer(const IDBResultData&amp;);
+
+    void createIndexOnServer(IDBClient::TransactionOperation&amp;, const IDBIndexInfo&amp;);
+    void didCreateIndexOnServer(const IDBResultData&amp;);
+
+    void clearObjectStoreOnServer(IDBClient::TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier);
+    void didClearObjectStoreOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void putOrAddOnServer(IDBClient::TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;, RefPtr&lt;SerializedScriptValue&gt;, const IndexedDB::ObjectStoreOverwriteMode&amp;);
+    void didPutOrAddOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void getRecordOnServer(IDBClient::TransactionOperation&amp;, const IDBKeyRangeData&amp;);
+    void didGetRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void getCountOnServer(IDBClient::TransactionOperation&amp;, const IDBKeyRangeData&amp;);
+    void didGetCountOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void deleteRecordOnServer(IDBClient::TransactionOperation&amp;, const IDBKeyRangeData&amp;);
+    void didDeleteRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void deleteObjectStoreOnServer(IDBClient::TransactionOperation&amp;, const String&amp; objectStoreName);
+    void didDeleteObjectStoreOnServer(const IDBResultData&amp;);
+
+    void deleteIndexOnServer(IDBClient::TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier, const String&amp; indexName);
+    void didDeleteIndexOnServer(const IDBResultData&amp;);
+
+    Ref&lt;IDBRequest&gt; doRequestOpenCursor(ScriptExecutionContext&amp;, Ref&lt;IDBCursor&gt;&amp;&amp;);
+    void openCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBCursorInfo&amp;);
+    void didOpenCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void iterateCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBKeyData&amp;, const unsigned long&amp; count);
+    void didIterateCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
+
+    void transitionedToFinishing(IndexedDB::TransactionState);
+
+    void establishOnServer();
+
+    void scheduleOperationTimer();
+
+    Ref&lt;IDBDatabase&gt; m_database;
+    IDBTransactionInfo m_info;
+
+    IndexedDB::TransactionState m_state { IndexedDB::TransactionState::Inactive };
+    bool m_startedOnServer { false };
+
+    IDBError m_idbError;
+    RefPtr&lt;DOMError&gt; m_domError;
+
+    Timer m_operationTimer;
+    std::unique_ptr&lt;Timer&gt; m_activationTimer;
+
+    RefPtr&lt;IDBOpenDBRequest&gt; m_openDBRequest;
+
+    Deque&lt;RefPtr&lt;IDBClient::TransactionOperation&gt;&gt; m_transactionOperationQueue;
+    Deque&lt;RefPtr&lt;IDBClient::TransactionOperation&gt;&gt; m_abortQueue;
+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBClient::TransactionOperation&gt;&gt; m_transactionOperationMap;
+
+    HashMap&lt;String, RefPtr&lt;IDBObjectStore&gt;&gt; m_referencedObjectStores;
+
+    HashSet&lt;RefPtr&lt;IDBRequest&gt;&gt; m_openRequests;
+
+    bool m_contextStopped { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+class TransactionActivator {
+    WTF_MAKE_NONCOPYABLE(TransactionActivator);
+public:
+    TransactionActivator(IDBTransaction* transaction)
+        : m_transaction(transaction)
+    {
+        if (m_transaction)
+            m_transaction-&gt;activate();
+    }
+
+    ~TransactionActivator()
+    {
+        if (m_transaction)
+            m_transaction-&gt;deactivate();
+    }
+
+private:
+    IDBTransaction* m_transaction;
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // IDBTransaction_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,23 +28,28 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;EventNames.h&quot;
-#include &quot;IDBVersionChangeEventImpl.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBVersionChangeEvent::IDBVersionChangeEvent(const AtomicString&amp; name)
</del><ins>+IDBVersionChangeEvent::IDBVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; name)
</ins><span class="cx">     : Event(name, false /*canBubble*/, false /*cancelable*/)
</span><ins>+    , m_requestIdentifier(requestIdentifier)
+    , m_oldVersion(oldVersion)
+    , m_newVersion(newVersion)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBVersionChangeEvent&gt; IDBVersionChangeEvent::create()
</del><ins>+Optional&lt;uint64_t&gt; IDBVersionChangeEvent::newVersion() const
</ins><span class="cx"> {
</span><del>-    // FIXME: This is called only by document.createEvent. I don't see how it's valuable to create an event with
-    // read-only oldVersion attribute of 0 and newVersion of null; preserving that behavior for now.
-    return IDBClient::IDBVersionChangeEvent::create(0, 0, eventNames().versionchangeEvent);
</del><ins>+    if (!m_newVersion)
+        return Nullopt;
+    return m_newVersion;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EventInterface IDBVersionChangeEvent::eventInterface() const
+{
+    return IDBVersionChangeEventInterfaceType;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -23,29 +23,49 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef IDBVersionChangeEvent_h
-#define IDBVersionChangeEvent_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Event.h&quot;
</span><ins>+#include &quot;IDBResourceIdentifier.h&quot;
</ins><span class="cx"> #include &lt;wtf/Optional.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class IDBVersionChangeEvent : public Event {
</del><ins>+class IDBVersionChangeEvent final : public Event {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBVersionChangeEvent&gt; create();
</del><ins>+    static Ref&lt;IDBVersionChangeEvent&gt; create(uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
+    {
+        return adoptRef(*new IDBVersionChangeEvent(IDBResourceIdentifier::emptyValue(), oldVersion, newVersion, eventType));
+    }
</ins><span class="cx"> 
</span><del>-    virtual uint64_t oldVersion() const = 0;
-    virtual Optional&lt;uint64_t&gt; newVersion() const = 0;
</del><ins>+    static Ref&lt;IDBVersionChangeEvent&gt; create(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
+    {
+        return adoptRef(*new IDBVersionChangeEvent(requestIdentifier, oldVersion, newVersion, eventType));
+    }
</ins><span class="cx"> 
</span><del>-protected:
-    explicit IDBVersionChangeEvent(const AtomicString&amp; type);
</del><ins>+    const IDBResourceIdentifier&amp; requestIdentifier() const { return m_requestIdentifier; }
+
+    bool isVersionChangeEvent() const final { return true; }
+
+    uint64_t oldVersion() const { return m_oldVersion; }
+    Optional&lt;uint64_t&gt; newVersion() const;
+
+private:
+    IDBVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType);
+
+    EventInterface eventInterface() const;
+
+    IDBResourceIdentifier m_requestIdentifier;
+    uint64_t m_oldVersion;
+    uint64_t m_newVersion;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::IDBVersionChangeEvent)
+    static bool isType(const WebCore::Event&amp; event) { return event.isVersionChangeEvent(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span><del>-
-#endif // IDBVersionChangeEvent_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBAnyImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,177 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBAnyImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBAny.h&quot;
-#include &quot;IDBCursorImpl.h&quot;
-#include &quot;IDBFactory.h&quot;
-#include &quot;IDBIndex.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-IDBAny::IDBAny(IDBAny::Type type)
-    : m_type(type)
-{
-}
-
-IDBAny::IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
-    : m_type(IDBAny::Type::IDBDatabase)
-    , m_database(adoptRef(&amp;database.leakRef()))
-{
-}
-
-IDBAny::IDBAny(Ref&lt;IDBObjectStore&gt;&amp;&amp; objectStore)
-    : m_type(IDBAny::Type::IDBObjectStore)
-    , m_objectStore(WTFMove(objectStore))
-{
-}
-
-IDBAny::IDBAny(Ref&lt;IDBIndex&gt;&amp;&amp; index)
-    : m_type(IDBAny::Type::IDBIndex)
-    , m_index(WTFMove(index))
-{
-}
-
-IDBAny::IDBAny(Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
-{
-    if (cursor-&gt;isKeyCursor()) {
-        m_type = IDBAny::Type::IDBCursor;
-        m_cursor = WTFMove(cursor);
-    } else {
-        m_type = IDBAny::Type::IDBCursorWithValue;
-        m_cursorWithValue = WTFMove(cursor);
-    }
-}
-
-IDBAny::IDBAny(const IDBKeyPath&amp; keyPath)
-    : m_type(IDBAny::Type::KeyPath)
-    , m_idbKeyPath(keyPath)
-{
-}
-
-IDBAny::IDBAny(const Deprecated::ScriptValue&amp; value)
-    : m_type(IDBAny::Type::ScriptValue)
-    , m_scriptValue(value)
-{
-}
-
-IDBAny::~IDBAny()
-{
-}
-
-RefPtr&lt;WebCore::IDBDatabase&gt; IDBAny::idbDatabase()
-{
-    ASSERT(m_type == IDBAny::Type::IDBDatabase);
-    return m_database.get();
-}
-
-RefPtr&lt;WebCore::DOMStringList&gt; IDBAny::domStringList()
-{
-    return nullptr;
-}
-
-RefPtr&lt;WebCore::IDBCursor&gt; IDBAny::idbCursor()
-{
-    ASSERT(m_type == IDBAny::Type::IDBCursor || m_type == IDBAny::Type::IDBCursorWithValue);
-    return m_cursor.get();
-}
-
-RefPtr&lt;WebCore::IDBCursorWithValue&gt; IDBAny::idbCursorWithValue()
-{
-    ASSERT(m_type == IDBAny::Type::IDBCursorWithValue);
-    return m_cursorWithValue.get();
-}
-
-RefPtr&lt;WebCore::IDBFactory&gt; IDBAny::idbFactory()
-{
-    return nullptr;
-}
-
-RefPtr&lt;WebCore::IDBIndex&gt; IDBAny::idbIndex()
-{
-    ASSERT(m_type == IDBAny::Type::IDBIndex);
-    return m_index.get();
-}
-
-RefPtr&lt;WebCore::IDBObjectStore&gt; IDBAny::idbObjectStore()
-{
-    ASSERT(m_type == IDBAny::Type::IDBObjectStore);
-    return m_objectStore.get();
-}
-
-IDBObjectStore* IDBAny::modernIDBObjectStore()
-{
-    ASSERT(m_type == IDBAny::Type::IDBObjectStore);
-    return m_objectStore.get();
-}
-
-IDBIndex* IDBAny::modernIDBIndex()
-{
-    ASSERT(m_type == IDBAny::Type::IDBIndex);
-    return m_index.get();
-}
-
-IDBCursor* IDBAny::modernIDBCursor()
-{
-    ASSERT(m_type == IDBAny::Type::IDBCursor || m_type == IDBAny::Type::IDBCursorWithValue);
-    if (m_type == IDBAny::Type::IDBCursor)
-        return m_cursor.get();
-    return m_cursorWithValue.get();
-}
-
-RefPtr&lt;WebCore::IDBTransaction&gt; IDBAny::idbTransaction()
-{
-    return nullptr;
-}
-
-const Deprecated::ScriptValue&amp; IDBAny::scriptValue()
-{
-    return m_scriptValue;
-}
-
-int64_t IDBAny::integer()
-{
-    return m_integer;
-}
-
-const String&amp; IDBAny::string()
-{
-    return m_string;
-}
-
-const IDBKeyPath&amp; IDBAny::keyPath()
-{
-    return m_idbKeyPath;
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBAnyImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBAnyImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,122 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBAnyImpl_h
-#define IDBAnyImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBAny.h&quot;
-#include &quot;IDBDatabaseImpl.h&quot;
-#include &quot;IDBIndexImpl.h&quot;
-#include &quot;IDBObjectStoreImpl.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-class IDBAny : public WebCore::IDBAny {
-public:
-    static RefPtr&lt;IDBAny&gt; create(Ref&lt;IDBDatabase&gt;&amp;&amp; database)
-    {
-        return adoptRef(new IDBAny(WTFMove(database)));
-    }
-
-    static Ref&lt;IDBAny&gt; create(Ref&lt;IDBObjectStore&gt;&amp;&amp; objectStore)
-    {
-        return adoptRef(*new IDBAny(WTFMove(objectStore)));
-    }
-
-    static Ref&lt;IDBAny&gt; create(Ref&lt;IDBIndex&gt;&amp;&amp; index)
-    {
-        return adoptRef(*new IDBAny(WTFMove(index)));
-    }
-
-    static RefPtr&lt;IDBAny&gt; create(Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
-    {
-        return adoptRef(new IDBAny(WTFMove(cursor)));
-    }
-
-    static RefPtr&lt;IDBAny&gt; create(const IDBKeyPath&amp; keyPath)
-    {
-        return adoptRef(new IDBAny(keyPath));
-    }
-
-    static RefPtr&lt;IDBAny&gt; create(const Deprecated::ScriptValue&amp; value)
-    {
-        return adoptRef(new IDBAny(value));
-    }
-
-    static RefPtr&lt;IDBAny&gt; createUndefined()
-    {
-        return adoptRef(new IDBAny(IDBAny::Type::Undefined));
-    }
-
-    virtual ~IDBAny();
-
-    Type type() const final { return m_type; }
-    RefPtr&lt;WebCore::DOMStringList&gt; domStringList() final;
-    RefPtr&lt;WebCore::IDBCursor&gt; idbCursor() final;
-    RefPtr&lt;WebCore::IDBCursorWithValue&gt; idbCursorWithValue() final;
-    RefPtr&lt;WebCore::IDBDatabase&gt; idbDatabase() final;
-    RefPtr&lt;WebCore::IDBFactory&gt; idbFactory() final;
-    RefPtr&lt;WebCore::IDBIndex&gt; idbIndex() final;
-    RefPtr&lt;WebCore::IDBObjectStore&gt; idbObjectStore() final;
-    RefPtr&lt;WebCore::IDBTransaction&gt; idbTransaction() final;
-    const Deprecated::ScriptValue&amp; scriptValue() final;
-    int64_t integer() final;
-    const String&amp; string() final;
-    const IDBKeyPath&amp; keyPath() final;
-
-    IDBObjectStore* modernIDBObjectStore();
-    IDBIndex* modernIDBIndex();
-    IDBCursor* modernIDBCursor();
-
-private:
-    explicit IDBAny(IDBAny::Type);
-    explicit IDBAny(Ref&lt;IDBDatabase&gt;&amp;&amp;);
-    explicit IDBAny(Ref&lt;IDBObjectStore&gt;&amp;&amp;);
-    explicit IDBAny(Ref&lt;IDBIndex&gt;&amp;&amp;);
-    explicit IDBAny(Ref&lt;IDBCursor&gt;&amp;&amp;);
-    explicit IDBAny(const IDBKeyPath&amp;);
-    explicit IDBAny(const Deprecated::ScriptValue&amp;);
-
-    IDBAny::Type m_type { IDBAny::Type::Undefined };
-    RefPtr&lt;IDBDatabase&gt; m_database;
-    RefPtr&lt;IDBObjectStore&gt; m_objectStore;
-    RefPtr&lt;IDBIndex&gt; m_index;
-    RefPtr&lt;IDBCursor&gt; m_cursor;
-    RefPtr&lt;IDBCursor&gt; m_cursorWithValue;
-
-    const IDBKeyPath m_idbKeyPath;
-    const Deprecated::ScriptValue m_scriptValue;
-    const String m_string;
-    const int64_t m_integer { 0 };
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBAnyImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBDatabase.h&quot;
</ins><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><del>-#include &quot;IDBOpenDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBOpenDBRequest.h&quot;
</ins><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -39,15 +39,15 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBCursorInfo;
</span><ins>+class IDBDatabase;
</ins><span class="cx"> class IDBError;
</span><span class="cx"> class IDBObjectStoreInfo;
</span><ins>+class IDBOpenDBRequest;
</ins><span class="cx"> class IDBResultData;
</span><ins>+class IDBTransaction;
</ins><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><del>-class IDBDatabase;
-class IDBOpenDBRequest;
-class IDBTransaction;
</del><span class="cx"> class TransactionOperation;
</span><span class="cx"> 
</span><span class="cx"> class IDBConnectionToServer : public RefCounted&lt;IDBConnectionToServer&gt; {
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;IDBConnectionToServerDelegate&gt; m_delegate;
</span><span class="cx"> 
</span><del>-    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBClient::IDBOpenDBRequest&gt;&gt; m_openDBRequestMap;
</del><ins>+    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBOpenDBRequest&gt;&gt; m_openDBRequestMap;
</ins><span class="cx">     HashMap&lt;uint64_t, IDBDatabase*&gt; m_databaseConnectionMap;
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_pendingTransactions;
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_committingTransactions;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,392 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBCursorImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMRequestState.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBGetResult.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBCursor&gt; IDBCursor::create(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
-{
-    return adoptRef(*new IDBCursor(transaction, index, info));
-}
-
-IDBCursor::IDBCursor(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
-    : ActiveDOMObject(transaction.scriptExecutionContext())
-    , m_info(info)
-    , m_source(IDBAny::create(objectStore).leakRef())
-    , m_objectStore(&amp;objectStore)
-{
-    suspendIfNeeded();
-}
-
-IDBCursor::IDBCursor(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
-    : ActiveDOMObject(transaction.scriptExecutionContext())
-    , m_info(info)
-    , m_source(IDBAny::create(index).leakRef())
-    , m_index(&amp;index)
-{
-    suspendIfNeeded();
-}
-
-IDBCursor::~IDBCursor()
-{
-}
-
-bool IDBCursor::sourcesDeleted() const
-{
-    if (m_objectStore)
-        return m_objectStore-&gt;isDeleted();
-
-    ASSERT(m_index);
-    return m_index-&gt;isDeleted() || m_index-&gt;modernObjectStore().isDeleted();
-}
-
-IDBObjectStore&amp; IDBCursor::effectiveObjectStore() const
-{
-    if (m_objectStore)
-        return *m_objectStore;
-
-    ASSERT(m_index);
-    return m_index-&gt;modernObjectStore();
-}
-
-IDBTransaction&amp; IDBCursor::transaction() const
-{
-    return effectiveObjectStore().modernTransaction();
-}
-
-const String&amp; IDBCursor::direction() const
-{
-    return IDBCursor::directionToString(m_info.cursorDirection());
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::key() const
-{
-    return m_deprecatedCurrentKey;
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::primaryKey() const
-{
-    return m_deprecatedCurrentPrimaryKey;
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::value() const
-{
-    return m_deprecatedCurrentValue;
-}
-
-IDBAny* IDBCursor::source()
-{
-    return &amp;m_source.get();
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::update(JSC::ExecState&amp; exec, Deprecated::ScriptValue&amp; value, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBCursor::update&quot;);
-
-    if (sourcesDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!transaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (transaction().isReadOnly()) {
-        ec.code = IDBDatabaseException::ReadOnlyError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.&quot;);
-        return nullptr;
-    }
-
-    if (!m_gotValue) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
-        return nullptr;
-    }
-
-    if (isKeyCursor()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.&quot;);
-        return nullptr;
-    }
-
-    auto&amp; objectStore = effectiveObjectStore();
-    auto&amp; keyPath = objectStore.info().keyPath();
-    const bool usesInLineKeys = !keyPath.isNull();
-    if (usesInLineKeys) {
-        RefPtr&lt;IDBKey&gt; keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(exec, value, keyPath);
-        IDBKeyData keyPathKeyData(keyPathKey.get());
-        if (!keyPathKey || keyPathKeyData != m_currentPrimaryKeyData) {
-            ec.code = IDBDatabaseException::DataError;
-            ec.message = ASCIILiteral(&quot;Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.&quot;);
-            return nullptr;
-        }
-    }
-
-    auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_deprecatedCurrentPrimaryKey.jsValue(), ec);
-    if (ec.code)
-        return nullptr;
-
-    ASSERT(request);
-    request-&gt;setSource(*this);
-    ++m_outstandingRequestCount;
-
-    return request;
-}
-
-void IDBCursor::advance(unsigned long count, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBCursor::advance&quot;);
-
-    if (!m_request) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-    
-    if (!count) {
-        ec.code = TypeError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.&quot;);
-        return;
-    }
-
-    if (sourcesDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
-        return;
-    }
-
-    if (!transaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.&quot;);
-        return;
-    }
-
-    if (!m_gotValue) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
-        return;
-    }
-
-    m_gotValue = false;
-
-    uncheckedIterateCursor(IDBKeyData(), count);
-}
-
-void IDBCursor::continueFunction(ScriptExecutionContext* context, ExceptionCodeWithMessage&amp; ec)
-{
-    if (!context) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-
-    continueFunction(IDBKeyData(), ec);
-}
-
-void IDBCursor::continueFunction(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCodeWithMessage&amp; ec)
-{
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; key;
-    if (!keyValue.jsValue().isUndefined())
-        key = scriptValueToIDBKey(&amp;requestState, keyValue);
-
-    continueFunction(key.get(), ec);
-}
-
-void IDBCursor::continueFunction(const IDBKeyData&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBCursor::continueFunction (to key %s)&quot;, key.loggingString().utf8().data());
-
-    if (!m_request) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-
-    if (sourcesDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
-        return;
-    }
-
-    if (!transaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.&quot;);
-        return;
-    }
-
-    if (!m_gotValue) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
-        return;
-    }
-
-    if (!key.isNull() &amp;&amp; !key.isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key.&quot;);
-        return;
-    }
-
-    if (m_info.isDirectionForward()) {
-        if (!key.isNull() &amp;&amp; key.compare(m_currentKeyData) &lt;= 0) {
-            ec.code = IDBDatabaseException::DataError;
-            ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.&quot;);
-            return;
-        }
-    } else if (!key.isNull() &amp;&amp; key.compare(m_currentKeyData) &gt;= 0) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.&quot;);
-        return;
-    }
-
-    m_gotValue = false;
-
-    uncheckedIterateCursor(key, 0);
-}
-
-void IDBCursor::uncheckedIterateCursor(const IDBKeyData&amp; key, unsigned long count)
-{
-    ++m_outstandingRequestCount;
-
-    m_request-&gt;willIterateCursor(*this);
-    transaction().iterateCursor(*this, key, count);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::deleteFunction(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBCursor::deleteFunction&quot;);
-
-    if (sourcesDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!transaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (transaction().isReadOnly()) {
-        ec.code = IDBDatabaseException::ReadOnlyError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.&quot;);
-        return nullptr;
-    }
-
-    if (!m_gotValue) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.&quot;);
-        return nullptr;
-    }
-
-    if (isKeyCursor()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.&quot;);
-        return nullptr;
-    }
-
-    auto request = effectiveObjectStore().modernDelete(context, m_deprecatedCurrentPrimaryKey.jsValue(), ec);
-    if (ec.code)
-        return nullptr;
-
-    ASSERT(request);
-    request-&gt;setSource(*this);
-    ++m_outstandingRequestCount;
-
-    return request;
-}
-
-void IDBCursor::setGetResult(IDBRequest&amp; request, const IDBGetResult&amp; getResult)
-{
-    LOG(IndexedDB, &quot;IDBCursor::setGetResult - current key %s&quot;, getResult.keyData().loggingString().substring(0, 100).utf8().data());
-
-    auto* context = request.scriptExecutionContext();
-    if (!context)
-        return;
-
-    if (!getResult.isDefined()) {
-        m_deprecatedCurrentKey = { };
-        m_currentKeyData = { };
-        m_deprecatedCurrentPrimaryKey = { };
-        m_currentPrimaryKeyData = { };
-        m_deprecatedCurrentValue = { };
-
-        m_gotValue = false;
-        return;
-    }
-
-    m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
-    m_currentKeyData = getResult.keyData();
-    m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
-    m_currentPrimaryKeyData = getResult.primaryKeyData();
-
-    if (isKeyCursor())
-        m_deprecatedCurrentValue = { };
-    else
-        m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.valueBuffer());
-
-    m_gotValue = true;
-}
-
-const char* IDBCursor::activeDOMObjectName() const
-{
-    return &quot;IDBCursor&quot;;
-}
-
-bool IDBCursor::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-bool IDBCursor::hasPendingActivity() const
-{
-    return m_outstandingRequestCount;
-}
-
-void IDBCursor::decrementOutstandingRequestCount()
-{
-    ASSERT(m_outstandingRequestCount);
-    --m_outstandingRequestCount;
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBCursorImpl_h
-#define IDBCursorImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBAnyImpl.h&quot;
-#include &quot;IDBCursorInfo.h&quot;
-#include &quot;IDBCursorWithValue.h&quot;
-
-namespace WebCore {
-
-class IDBGetResult;
-
-namespace IDBClient {
-
-class IDBIndex;
-class IDBObjectStore;
-class IDBTransaction;
-
-class IDBCursor : public WebCore::IDBCursorWithValue, public ActiveDOMObject {
-public:
-    static Ref&lt;IDBCursor&gt; create(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
-
-    virtual ~IDBCursor();
-
-    // Implement the IDL
-    const String&amp; direction() const final;
-    const Deprecated::ScriptValue&amp; key() const final;
-    const Deprecated::ScriptValue&amp; primaryKey() const final;
-    const Deprecated::ScriptValue&amp; value() const final;
-    IDBAny* source() final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; update(JSC::ExecState&amp;, Deprecated::ScriptValue&amp;, ExceptionCodeWithMessage&amp;) final;
-    void advance(unsigned long, ExceptionCodeWithMessage&amp;) final;
-    void continueFunction(ScriptExecutionContext*, ExceptionCodeWithMessage&amp;) final;
-    void continueFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) final;
-
-    void continueFunction(const IDBKeyData&amp;, ExceptionCodeWithMessage&amp;);
-
-    const IDBCursorInfo&amp; info() const { return m_info; }
-
-    void setRequest(IDBRequest&amp; request) { m_request = &amp;request; }
-    void clearRequest() { m_request = nullptr; }
-    IDBRequest* request() { return m_request; }
-
-    void setGetResult(IDBRequest&amp;, const IDBGetResult&amp;);
-
-    bool isKeyCursor() const override { return true; }
-    bool isModernCursor() const final { return true; }
-
-    void decrementOutstandingRequestCount();
-
-protected:
-    IDBCursor(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
-    IDBCursor(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
-
-private:
-    // ActiveDOMObject.
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    bool hasPendingActivity() const final;
-
-    // Cursors are created with an outstanding iteration request.
-    unsigned m_outstandingRequestCount { 1 };
-
-    IDBCursorInfo m_info;
-    Ref&lt;IDBAny&gt; m_source;
-    IDBObjectStore* m_objectStore { nullptr };
-    IDBIndex* m_index { nullptr };
-    IDBRequest* m_request;
-
-    bool sourcesDeleted() const;
-    IDBObjectStore&amp; effectiveObjectStore() const;
-    IDBTransaction&amp; transaction() const;
-
-    void uncheckedIterateCursor(const IDBKeyData&amp;, unsigned long count);
-
-    bool m_gotValue { false };
-
-    IDBKeyData m_currentKeyData;
-    IDBKeyData m_currentPrimaryKeyData;
-
-    // FIXME: When ditching Legacy IDB and combining this implementation with the abstract IDBCursor,
-    // these Deprecated::ScriptValue members should be JSValues instead.
-    Deprecated::ScriptValue m_deprecatedCurrentKey;
-    Deprecated::ScriptValue m_deprecatedCurrentPrimaryKey;
-    Deprecated::ScriptValue m_deprecatedCurrentValue;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBCursorImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorWithValueImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBCursorWithValueImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBCursorWithValue&gt; IDBCursorWithValue::create(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
-{
-    return adoptRef(*new IDBCursorWithValue(transaction, objectStore, info));
-}
-
-Ref&lt;IDBCursorWithValue&gt; IDBCursorWithValue::create(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
-{
-    return adoptRef(*new IDBCursorWithValue(transaction, index, info));
-}
-
-IDBCursorWithValue::IDBCursorWithValue(IDBTransaction&amp; transaction, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
-    : IDBCursor(transaction, objectStore, info)
-{
-}
-
-IDBCursorWithValue::IDBCursorWithValue(IDBTransaction&amp; transaction, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
-    : IDBCursor(transaction, index, info)
-{
-}
-
-IDBCursorWithValue::~IDBCursorWithValue()
-{
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorWithValueImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorWithValueImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBCursorWithValueImpl_h
-#define IDBCursorWithValueImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBCursorImpl.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-class IDBCursorWithValue : public IDBCursor {
-public:
-    static Ref&lt;IDBCursorWithValue&gt; create(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
-    static Ref&lt;IDBCursorWithValue&gt; create(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
-
-    virtual ~IDBCursorWithValue();
-
-    bool isKeyCursor() const final { return false; }
-
-private:
-    IDBCursorWithValue(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
-    IDBCursorWithValue(IDBTransaction&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBCursorWithValueImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,431 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBDatabaseImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;EventQueue.h&quot;
-#include &quot;IDBConnectionToServer.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBOpenDBRequestImpl.h&quot;
-#include &quot;IDBResultData.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-#include &quot;IDBVersionChangeEventImpl.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBDatabase&gt; IDBDatabase::create(ScriptExecutionContext&amp; context, IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
-{
-    return adoptRef(*new IDBDatabase(context, connection, resultData));
-}
-
-IDBDatabase::IDBDatabase(ScriptExecutionContext&amp; context, IDBConnectionToServer&amp; connection, const IDBResultData&amp; resultData)
-    : WebCore::IDBDatabase(&amp;context)
-    , m_serverConnection(connection)
-    , m_info(resultData.databaseInfo())
-    , m_databaseConnectionIdentifier(resultData.databaseConnectionIdentifier())
-{
-    LOG(IndexedDB, &quot;IDBDatabase::IDBDatabase - Creating database %s with version %&quot; PRIu64 &quot; connection %&quot; PRIu64, m_info.name().utf8().data(), m_info.version(), m_databaseConnectionIdentifier);
-    suspendIfNeeded();
-    relaxAdoptionRequirement();
-    m_serverConnection-&gt;registerDatabaseConnection(*this);
-}
-
-IDBDatabase::~IDBDatabase()
-{
-    m_serverConnection-&gt;unregisterDatabaseConnection(*this);
-}
-
-bool IDBDatabase::hasPendingActivity() const
-{
-    return !m_closedInServer;
-}
-
-const String IDBDatabase::name() const
-{
-    return m_info.name();
-}
-
-uint64_t IDBDatabase::version() const
-{
-    return m_info.version();
-}
-
-RefPtr&lt;DOMStringList&gt; IDBDatabase::objectStoreNames() const
-{
-    RefPtr&lt;DOMStringList&gt; objectStoreNames = DOMStringList::create();
-    for (auto&amp; name : m_info.objectStoreNames())
-        objectStoreNames-&gt;append(name);
-    objectStoreNames-&gt;sort();
-    return objectStoreNames;
-}
-
-RefPtr&lt;WebCore::IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp;, const Dictionary&amp;, ExceptionCodeWithMessage&amp;)
-{
-    ASSERT_NOT_REACHED();
-    return nullptr;
-}
-
-RefPtr&lt;WebCore::IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::createObjectStore&quot;);
-
-    ASSERT(!m_versionChangeTransaction || m_versionChangeTransaction-&gt;isVersionChange());
-
-    if (!m_versionChangeTransaction) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.&quot;);
-        return nullptr;
-    }
-
-    if (!m_versionChangeTransaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        return nullptr;
-    }
-
-    if (m_info.hasObjectStore(name)) {
-        ec.code = IDBDatabaseException::ConstraintError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.&quot;);
-        return nullptr;
-    }
-
-    if (!keyPath.isNull() &amp;&amp; !keyPath.isValid()) {
-        ec.code = IDBDatabaseException::SyntaxError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.&quot;);
-        return nullptr;
-    }
-
-    if (autoIncrement &amp;&amp; !keyPath.isNull()) {
-        if ((keyPath.type() == IndexedDB::KeyPathType::String &amp;&amp; keyPath.string().isEmpty()) || keyPath.type() == IndexedDB::KeyPathType::Array) {
-            ec.code = IDBDatabaseException::InvalidAccessError;
-            ec.message = ASCIILiteral(&quot;Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.&quot;);
-            return nullptr;
-        }
-    }
-
-    // Install the new ObjectStore into the connection's metadata.
-    IDBObjectStoreInfo info = m_info.createNewObjectStore(name, keyPath, autoIncrement);
-
-    // Create the actual IDBObjectStore from the transaction, which also schedules the operation server side.
-    Ref&lt;IDBObjectStore&gt; objectStore = m_versionChangeTransaction-&gt;createObjectStore(info);
-    return adoptRef(&amp;objectStore.leakRef());
-}
-
-RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp; objectStores, const String&amp; modeString, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::transaction&quot;);
-
-    if (m_closePending) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.&quot;);
-        return nullptr;
-    }
-
-    if (objectStores.isEmpty()) {
-        ec.code = IDBDatabaseException::InvalidAccessError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.&quot;);
-        return nullptr;
-    }
-
-    IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec.code);
-    if (ec.code) {
-        ec.message = makeString(ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('&quot;), modeString, ASCIILiteral(&quot;') is not one of 'readonly' or 'readwrite'.&quot;));
-        return nullptr;
-    }
-
-    if (mode != IndexedDB::TransactionMode::ReadOnly &amp;&amp; mode != IndexedDB::TransactionMode::ReadWrite) {
-        ec.code = TypeError;
-        return nullptr;
-    }
-
-    if (m_versionChangeTransaction &amp;&amp; !m_versionChangeTransaction-&gt;isFinishedOrFinishing()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.&quot;);
-        return nullptr;
-    }
-
-    for (auto&amp; objectStoreName : objectStores) {
-        if (m_info.hasObjectStore(objectStoreName))
-            continue;
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.&quot;);
-        return nullptr;
-    }
-
-    auto info = IDBTransactionInfo::clientTransaction(m_serverConnection.get(), objectStores, mode);
-    auto transaction = IDBTransaction::create(*this, info);
-
-    LOG(IndexedDB, &quot;IDBDatabase::transaction - Added active transaction %s&quot;, info.identifier().loggingString().utf8().data());
-
-    m_activeTransactions.set(info.identifier(), &amp;transaction.get());
-
-    return adoptRef(&amp;transaction.leakRef());
-}
-
-RefPtr&lt;WebCore::IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext* context, const String&amp; objectStore, const String&amp; mode, ExceptionCodeWithMessage&amp; ec)
-{
-    Vector&lt;String&gt; objectStores(1);
-    objectStores[0] = objectStore;
-    return transaction(context, objectStores, mode, ec);
-}
-
-void IDBDatabase::deleteObjectStore(const String&amp; objectStoreName, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::deleteObjectStore&quot;);
-
-    if (!m_versionChangeTransaction) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.&quot;);
-        return;
-    }
-
-    if (!m_versionChangeTransaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        return;
-    }
-
-    if (!m_info.hasObjectStore(objectStoreName)) {
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.&quot;);
-        return;
-    }
-
-    m_info.deleteObjectStore(objectStoreName);
-    m_versionChangeTransaction-&gt;deleteObjectStore(objectStoreName);
-}
-
-void IDBDatabase::close()
-{
-    LOG(IndexedDB, &quot;IDBDatabase::close - %&quot; PRIu64, m_databaseConnectionIdentifier);
-
-    m_closePending = true;
-    maybeCloseInServer();
-}
-
-void IDBDatabase::maybeCloseInServer()
-{
-    LOG(IndexedDB, &quot;IDBDatabase::maybeCloseInServer - %&quot; PRIu64, m_databaseConnectionIdentifier);
-
-    if (m_closedInServer)
-        return;
-
-    // 3.3.9 Database closing steps
-    // Wait for all transactions created using this connection to complete.
-    // Once they are complete, this connection is closed.
-    if (!m_activeTransactions.isEmpty())
-        return;
-
-    m_closedInServer = true;
-    m_serverConnection-&gt;databaseConnectionClosed(*this);
-}
-
-const char* IDBDatabase::activeDOMObjectName() const
-{
-    return &quot;IDBDatabase&quot;;
-}
-
-bool IDBDatabase::canSuspendForDocumentSuspension() const
-{
-    // FIXME: This value will sometimes be false when database operations are actually in progress.
-    // Such database operations do not yet exist.
-    return true;
-}
-
-void IDBDatabase::stop()
-{
-    LOG(IndexedDB, &quot;IDBDatabase::stop - %&quot; PRIu64, m_databaseConnectionIdentifier);
-
-    Vector&lt;IDBResourceIdentifier&gt; transactionIdentifiers;
-    transactionIdentifiers.reserveInitialCapacity(m_activeTransactions.size());
-
-    for (auto&amp; id : m_activeTransactions.keys())
-        transactionIdentifiers.uncheckedAppend(id);
-
-    for (auto&amp; id : transactionIdentifiers) {
-        IDBTransaction* transaction = m_activeTransactions.get(id);
-        if (transaction)
-            transaction-&gt;stop();
-    }
-
-    close();
-}
-
-Ref&lt;IDBTransaction&gt; IDBDatabase::startVersionChangeTransaction(const IDBTransactionInfo&amp; info, IDBOpenDBRequest&amp; request)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::startVersionChangeTransaction %s&quot;, info.identifier().loggingString().utf8().data());
-
-    ASSERT(!m_versionChangeTransaction);
-    ASSERT(info.mode() == IndexedDB::TransactionMode::VersionChange);
-    ASSERT(!m_closePending);
-    ASSERT(scriptExecutionContext());
-
-    Ref&lt;IDBTransaction&gt; transaction = IDBTransaction::create(*this, info, request);
-    m_versionChangeTransaction = &amp;transaction.get();
-
-    m_activeTransactions.set(transaction-&gt;info().identifier(), &amp;transaction.get());
-
-    return transaction;
-}
-
-void IDBDatabase::didStartTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::didStartTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-    ASSERT(!m_versionChangeTransaction);
-
-    // It is possible for the client to have aborted a transaction before the server replies back that it has started.
-    if (m_abortingTransactions.contains(transaction.info().identifier()))
-        return;
-
-    m_activeTransactions.set(transaction.info().identifier(), &amp;transaction);
-}
-
-void IDBDatabase::willCommitTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::willCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-
-    auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
-    ASSERT(refTransaction);
-    m_committingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
-}
-
-void IDBDatabase::didCommitTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::didCommitTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-
-    if (m_versionChangeTransaction == &amp;transaction)
-        m_info.setVersion(transaction.info().newVersion());
-
-    didCommitOrAbortTransaction(transaction);
-}
-
-void IDBDatabase::willAbortTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::willAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-
-    auto refTransaction = m_activeTransactions.take(transaction.info().identifier());
-    if (!refTransaction)
-        refTransaction = m_committingTransactions.take(transaction.info().identifier());
-
-    ASSERT(refTransaction);
-    m_abortingTransactions.set(transaction.info().identifier(), WTFMove(refTransaction));
-
-    if (transaction.isVersionChange()) {
-        ASSERT(transaction.originalDatabaseInfo());
-        m_info = *transaction.originalDatabaseInfo();
-        m_closePending = true;
-    }
-}
-
-void IDBDatabase::didAbortTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::didAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-
-    if (transaction.isVersionChange()) {
-        ASSERT(transaction.originalDatabaseInfo());
-        ASSERT(m_info.version() == transaction.originalDatabaseInfo()-&gt;version());
-        m_closePending = true;
-        maybeCloseInServer();
-    }
-
-    didCommitOrAbortTransaction(transaction);
-}
-
-void IDBDatabase::didCommitOrAbortTransaction(IDBTransaction&amp; transaction)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::didCommitOrAbortTransaction %s&quot;, transaction.info().identifier().loggingString().utf8().data());
-
-    if (m_versionChangeTransaction == &amp;transaction)
-        m_versionChangeTransaction = nullptr;
-
-#ifndef NDBEBUG
-    unsigned count = 0;
-    if (m_activeTransactions.contains(transaction.info().identifier()))
-        ++count;
-    if (m_committingTransactions.contains(transaction.info().identifier()))
-        ++count;
-    if (m_abortingTransactions.contains(transaction.info().identifier()))
-        ++count;
-
-    ASSERT(count == 1);
-#endif
-
-    m_activeTransactions.remove(transaction.info().identifier());
-    m_committingTransactions.remove(transaction.info().identifier());
-    m_abortingTransactions.remove(transaction.info().identifier());
-
-    if (m_closePending)
-        maybeCloseInServer();
-}
-
-void IDBDatabase::fireVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion)
-{
-    uint64_t currentVersion = m_info.version();
-    LOG(IndexedDB, &quot;IDBDatabase::fireVersionChangeEvent - current version %&quot; PRIu64 &quot;, requested version %&quot; PRIu64 &quot;, connection %&quot; PRIu64, currentVersion, requestedVersion, m_databaseConnectionIdentifier);
-
-    if (!scriptExecutionContext() || m_closePending) {
-        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, requestIdentifier);
-        return;
-    }
-
-    Ref&lt;Event&gt; event = IDBVersionChangeEvent::create(requestIdentifier, currentVersion, requestedVersion, eventNames().versionchangeEvent);
-    event-&gt;setTarget(this);
-    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
-}
-
-bool IDBDatabase::dispatchEvent(Event&amp; event)
-{
-    LOG(IndexedDB, &quot;IDBDatabase::dispatchEvent (%&quot; PRIu64 &quot;)&quot;, m_databaseConnectionIdentifier);
-
-    bool result = WebCore::IDBDatabase::dispatchEvent(event);
-
-    if (event.isVersionChangeEvent() &amp;&amp; event.type() == eventNames().versionchangeEvent)
-        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, downcast&lt;IDBVersionChangeEvent&gt;(event).requestIdentifier());
-
-    return result;
-}
-
-void IDBDatabase::didCreateIndexInfo(const IDBIndexInfo&amp; info)
-{
-    auto* objectStore = m_info.infoForExistingObjectStore(info.objectStoreIdentifier());
-    ASSERT(objectStore);
-    objectStore-&gt;addExistingIndex(info);
-}
-
-void IDBDatabase::didDeleteIndexInfo(const IDBIndexInfo&amp; info)
-{
-    auto* objectStore = m_info.infoForExistingObjectStore(info.objectStoreIdentifier());
-    ASSERT(objectStore);
-    objectStore-&gt;deleteIndex(info.name());
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBDatabaseImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,121 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBDatabaseImpl_h
-#define IDBDatabaseImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBConnectionToServer.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBDatabaseInfo.h&quot;
-
-namespace WebCore {
-
-class IDBResultData;
-class IDBTransaction;
-class IDBTransactionInfo;
-
-namespace IDBClient {
-
-class IDBTransaction;
-
-class IDBDatabase : public WebCore::IDBDatabase {
-public:
-    static Ref&lt;IDBDatabase&gt; create(ScriptExecutionContext&amp;, IDBConnectionToServer&amp;, const IDBResultData&amp;);
-
-    virtual ~IDBDatabase();
-
-    // IDBDatabase IDL
-    const String name() const final;
-    uint64_t version() const final;
-    RefPtr&lt;DOMStringList&gt; objectStoreNames() const final;
-
-    RefPtr&lt;WebCore::IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCodeWithMessage&amp;) final;
-    void deleteObjectStore(const String&amp; name, ExceptionCodeWithMessage&amp;) final;
-    void close() final;
-
-    // EventTarget
-    EventTargetInterface eventTargetInterface() const final { return IDBDatabaseEventTargetInterfaceType; }
-    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
-    void refEventTarget() final { ref(); }
-    void derefEventTarget() final { deref(); }
-
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    void stop() final;
-
-    const IDBDatabaseInfo&amp; info() const { return m_info; }
-    uint64_t databaseConnectionIdentifier() const { return m_databaseConnectionIdentifier; }
-
-    Ref&lt;IDBTransaction&gt; startVersionChangeTransaction(const IDBTransactionInfo&amp;, IDBOpenDBRequest&amp;);
-    void didStartTransaction(IDBTransaction&amp;);
-
-    void willCommitTransaction(IDBTransaction&amp;);
-    void didCommitTransaction(IDBTransaction&amp;);
-    void willAbortTransaction(IDBTransaction&amp;);
-    void didAbortTransaction(IDBTransaction&amp;);
-
-    void fireVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t requestedVersion);
-
-    IDBConnectionToServer&amp; serverConnection() { return m_serverConnection.get(); }
-
-    void didCreateIndexInfo(const IDBIndexInfo&amp;);
-    void didDeleteIndexInfo(const IDBIndexInfo&amp;);
-
-    bool isClosingOrClosed() const { return m_closePending || m_closedInServer; }
-
-    bool dispatchEvent(Event&amp;) final;
-
-private:
-    IDBDatabase(ScriptExecutionContext&amp;, IDBConnectionToServer&amp;, const IDBResultData&amp;);
-
-    void didCommitOrAbortTransaction(IDBTransaction&amp;);
-
-    void maybeCloseInServer();
-
-    bool hasPendingActivity() const final;
-
-    Ref&lt;IDBConnectionToServer&gt; m_serverConnection;
-    IDBDatabaseInfo m_info;
-    uint64_t m_databaseConnectionIdentifier { 0 };
-
-    bool m_closePending { false };
-    bool m_closedInServer { false };
-
-    RefPtr&lt;IDBTransaction&gt; m_versionChangeTransaction;
-    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_activeTransactions;
-    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_committingTransactions;
-    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_abortingTransactions;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBDatabaseImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,172 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBFactoryImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMRequestState.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBDatabaseIdentifier.h&quot;
-#include &quot;IDBOpenDBRequestImpl.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;Page.h&quot;
-#include &quot;SchemeRegistry.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;SecurityOrigin.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-static bool shouldThrowSecurityException(ScriptExecutionContext&amp; context)
-{
-    ASSERT(is&lt;Document&gt;(context) || context.isWorkerGlobalScope());
-    if (is&lt;Document&gt;(context)) {
-        Document&amp; document = downcast&lt;Document&gt;(context);
-        if (!document.frame())
-            return true;
-        if (!document.page())
-            return true;
-    }
-
-    if (!context.securityOrigin()-&gt;canAccessDatabase(context.topOrigin()))
-        return true;
-
-    return false;
-}
-
-Ref&lt;IDBFactory&gt; IDBFactory::create(IDBConnectionToServer&amp; connection)
-{
-    return adoptRef(*new IDBFactory(connection));
-}
-
-IDBFactory::IDBFactory(IDBConnectionToServer&amp; connection)
-    : m_connectionToServer(connection)
-{
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBFactory::getDatabaseNames(ScriptExecutionContext&amp;, ExceptionCode&amp;)
-{
-    return nullptr;
-}
-
-RefPtr&lt;WebCore::IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBFactory::open&quot;);
-    
-    return openInternal(context, name, 0, ec).release();
-}
-
-RefPtr&lt;WebCore::IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBFactory::open&quot;);
-    
-    if (!version) {
-        ec = TypeError;
-        return nullptr;
-    }
-
-    return openInternal(context, name, version, ec).release();
-}
-
-RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::openInternal(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
-{
-    if (name.isNull()) {
-        ec = TypeError;
-        return nullptr;
-    }
-
-    if (shouldThrowSecurityException(context)) {
-        ec = SECURITY_ERR;
-        return nullptr;
-    }
-
-    ASSERT(context.securityOrigin());
-    ASSERT(context.topOrigin());
-    IDBDatabaseIdentifier databaseIdentifier(name, *context.securityOrigin(), *context.topOrigin());
-    if (!databaseIdentifier.isValid()) {
-        ec = TypeError;
-        return nullptr;
-    }
-
-    auto request = IDBOpenDBRequest::createOpenRequest(m_connectionToServer.get(), context, databaseIdentifier, version);
-    m_connectionToServer-&gt;openDatabase(request.get());
-
-    return adoptRef(&amp;request.leakRef());
-}
-
-RefPtr&lt;WebCore::IDBOpenDBRequest&gt; IDBFactory::deleteDatabase(ScriptExecutionContext&amp; context, const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBFactory::deleteDatabase - %s&quot;, name.utf8().data());
-
-    if (name.isNull()) {
-        ec = TypeError;
-        return nullptr;
-    }
-    
-    if (shouldThrowSecurityException(context)) {
-        ec = SECURITY_ERR;
-        return nullptr;
-    }
-
-    ASSERT(context.securityOrigin());
-    ASSERT(context.topOrigin());
-    IDBDatabaseIdentifier databaseIdentifier(name, *context.securityOrigin(), *context.topOrigin());
-    if (!databaseIdentifier.isValid()) {
-        ec = TypeError;
-        return nullptr;
-    }
-
-    auto request = IDBOpenDBRequest::createDeleteRequest(m_connectionToServer.get(), context, databaseIdentifier);
-    m_connectionToServer-&gt;deleteDatabase(request.get());
-
-    return adoptRef(&amp;request.leakRef());
-}
-
-short IDBFactory::cmp(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; firstValue, const Deprecated::ScriptValue&amp; secondValue, ExceptionCodeWithMessage&amp; ec)
-{
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; first = scriptValueToIDBKey(&amp;requestState, firstValue);
-    RefPtr&lt;IDBKey&gt; second = scriptValueToIDBKey(&amp;requestState, secondValue);
-
-    ASSERT(first);
-    ASSERT(second);
-
-    if (!first-&gt;isValid() || !second-&gt;isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.&quot;);
-        return 0;
-    }
-
-    return static_cast&lt;short&gt;(first-&gt;compare(second.get()));
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,63 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBFactoryImpl_h
-#define IDBFactoryImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBConnectionToServer.h&quot;
-#include &quot;IDBFactory.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-class IDBOpenDBRequest;
-
-class IDBFactory : public WebCore::IDBFactory {
-public:
-    static Ref&lt;IDBFactory&gt; create(IDBConnectionToServer&amp;);
-
-    RefPtr&lt;WebCore::IDBRequest&gt; getDatabaseNames(ScriptExecutionContext&amp;, ExceptionCode&amp;) final;
-
-    RefPtr&lt;WebCore::IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;) final;
-    RefPtr&lt;WebCore::IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCode&amp;) final;
-    RefPtr&lt;WebCore::IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCode&amp;) final;
-
-    short cmp(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCodeWithMessage&amp;) final;
-
-private:
-    IDBFactory(IDBConnectionToServer&amp;);
-    
-    RefPtr&lt;IDBOpenDBRequest&gt; openInternal(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCode&amp;);
-    
-    Ref&lt;IDBConnectionToServer&gt; m_connectionToServer;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBFactoryImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBIndexImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,343 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBIndexImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMRequestState.h&quot;
-#include &quot;IDBAnyImpl.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCursorImpl.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBKeyRangeData.h&quot;
-#include &quot;IDBObjectStoreImpl.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-#include &quot;Logging.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-IDBIndex::IDBIndex(ScriptExecutionContext&amp; context, const IDBIndexInfo&amp; info, IDBObjectStore&amp; objectStore)
-    : ActiveDOMObject(&amp;context)
-    , m_info(info)
-    , m_objectStore(objectStore)
-{
-    suspendIfNeeded();
-}
-
-IDBIndex::~IDBIndex()
-{
-}
-
-const char* IDBIndex::activeDOMObjectName() const
-{
-    return &quot;IDBIndex&quot;;
-}
-
-bool IDBIndex::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-bool IDBIndex::hasPendingActivity() const
-{
-    return !m_objectStore.modernTransaction().isFinished();
-}
-
-const String&amp; IDBIndex::name() const
-{
-    return m_info.name();
-}
-
-RefPtr&lt;WebCore::IDBObjectStore&gt; IDBIndex::objectStore()
-{
-    return &amp;m_objectStore;
-}
-
-RefPtr&lt;WebCore::IDBAny&gt; IDBIndex::keyPathAny() const
-{
-    return IDBAny::create(m_info.keyPath());
-}
-
-const IDBKeyPath&amp; IDBIndex::keyPath() const
-{
-    return m_info.keyPath();
-}
-
-bool IDBIndex::unique() const
-{
-    return m_info.unique();
-}
-
-bool IDBIndex::multiEntry() const
-{
-    return m_info.multiEntry();
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
-
-    if (m_deleted || m_objectStore.isDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_objectStore.modernTransaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
-    if (ec.code) {
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.&quot;);
-        return nullptr;
-    }
-
-    IDBKeyRangeData rangeData = range;
-    if (rangeData.lowerKey.isNull())
-        rangeData.lowerKey = IDBKeyData::minimum();
-    if (rangeData.upperKey.isNull())
-        rangeData.upperKey = IDBKeyData::maximum();
-
-    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), rangeData, direction, IndexedDB::CursorType::KeyAndValue);
-    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
-    if (ec.code) {
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return openCursor(context, keyRange.get(), direction, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
-
-    return doCount(context, IDBKeyRangeData::allKeys(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
-
-    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
-
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return doCount(context, IDBKeyRangeData(idbKey.get()), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
-{
-    if (m_deleted || m_objectStore.isDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!range.isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    auto&amp; transaction = m_objectStore.modernTransaction();
-    if (!transaction.isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    return transaction.requestCount(context, *this, range);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
-
-    if (m_deleted || m_objectStore.isDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_objectStore.modernTransaction().isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
-    if (ec.code) {
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.&quot;);
-        return nullptr;
-    }
-
-    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
-    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
-    if (ec.code) {
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-    return openKeyCursor(context, keyRange.get(), direction, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::get&quot;);
-
-    return doGet(context, IDBKeyRangeData(range), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::get&quot;);
-
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return doGet(context, IDBKeyRangeData(idbKey.get()), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::doGet(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
-{
-    if (m_deleted || m_objectStore.isDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (range.isNull) {
-        ec.code = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    auto&amp; transaction = m_objectStore.modernTransaction();
-    if (!transaction.isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    return transaction.requestGetValue(context, *this, range);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
-
-    return doGetKey(context, IDBKeyRangeData(range), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
-
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return doGetKey(context, IDBKeyRangeData(idbKey.get()), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBIndex::doGetKey(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
-{
-    if (m_deleted || m_objectStore.isDeleted()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (range.isNull) {
-        ec.code = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    auto&amp; transaction = m_objectStore.modernTransaction();
-    if (!transaction.isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    return transaction.requestGetKey(context, *this, range);
-}
-
-void IDBIndex::markAsDeleted()
-{
-    ASSERT(!m_deleted);
-    m_deleted = true;
-}
-
-void IDBIndex::ref()
-{
-    m_objectStore.ref();
-}
-
-void IDBIndex::deref()
-{
-    m_objectStore.deref();
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBIndexImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,114 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBIndexImpl_h
-#define IDBIndexImpl_h
-
-#include &quot;IDBIndex.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;IDBIndexInfo.h&quot;
-
-namespace WebCore {
-
-struct IDBKeyRangeData;
-
-namespace IDBClient {
-
-class IDBObjectStore;
-
-class IDBIndex : public WebCore::IDBIndex, public ActiveDOMObject {
-public:
-    IDBIndex(ScriptExecutionContext&amp;, const IDBIndexInfo&amp;, IDBObjectStore&amp;);
-
-    virtual ~IDBIndex();
-
-    // Implement the IDL
-    const String&amp; name() const final;
-    RefPtr&lt;WebCore::IDBObjectStore&gt; objectStore() final;
-    RefPtr&lt;WebCore::IDBAny&gt; keyPathAny() const final;
-    const IDBKeyPath&amp; keyPath() const final;
-    bool unique() const final;
-    bool multiEntry() const final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec) final { return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec) final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec) final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec) final { return openKeyCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec) final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec) final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
-    RefPtr&lt;WebCore::IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; getKey(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; getKey(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-
-    const IDBIndexInfo&amp; info() const { return m_info; }
-
-    IDBObjectStore&amp; modernObjectStore() { return m_objectStore; }
-
-    void markAsDeleted();
-    bool isDeleted() const { return m_deleted; }
-
-    bool isModern() const override { return true; }
-
-    void ref() override;
-    void deref() override;
-
-private:
-    RefPtr&lt;WebCore::IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;WebCore::IDBRequest&gt; doGet(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;WebCore::IDBRequest&gt; doGetKey(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-
-    // ActiveDOMObject
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    bool hasPendingActivity() const final;
-
-    IDBIndexInfo m_info;
-
-    bool m_deleted { false };
-
-    // IDBIndex objects are always owned by their referencing IDBObjectStore.
-    // Indexes will never outlive ObjectStores so its okay to keep a raw C++ reference here.
-    IDBObjectStore&amp; m_objectStore;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBIndexImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,661 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBObjectStoreImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMRequestState.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCursorImpl.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBError.h&quot;
-#include &quot;IDBIndexImpl.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyRangeData.h&quot;
-#include &quot;IDBRequestImpl.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-#include &quot;IndexedDB.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;SerializedScriptValue.h&quot;
-#include &lt;wtf/Locker.h&gt;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBObjectStore&gt; IDBObjectStore::create(ScriptExecutionContext&amp; context, const IDBObjectStoreInfo&amp; info, IDBTransaction&amp; transaction)
-{
-    return adoptRef(*new IDBObjectStore(context, info, transaction));
-}
-
-IDBObjectStore::IDBObjectStore(ScriptExecutionContext&amp; context, const IDBObjectStoreInfo&amp; info, IDBTransaction&amp; transaction)
-    : ActiveDOMObject(&amp;context)
-    , m_info(info)
-    , m_originalInfo(info)
-    , m_transaction(transaction)
-{
-    suspendIfNeeded();
-}
-
-IDBObjectStore::~IDBObjectStore()
-{
-}
-
-const char* IDBObjectStore::activeDOMObjectName() const
-{
-    return &quot;IDBObjectStore&quot;;
-}
-
-bool IDBObjectStore::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-bool IDBObjectStore::hasPendingActivity() const
-{
-    return !m_transaction-&gt;isFinished();
-}
-
-const String IDBObjectStore::name() const
-{
-    return m_info.name();
-}
-
-RefPtr&lt;WebCore::IDBAny&gt; IDBObjectStore::keyPathAny() const
-{
-    return IDBAny::create(m_info.keyPath());
-}
-
-const IDBKeyPath IDBObjectStore::keyPath() const
-{
-    return m_info.keyPath();
-}
-
-RefPtr&lt;DOMStringList&gt; IDBObjectStore::indexNames() const
-{
-    RefPtr&lt;DOMStringList&gt; indexNames = DOMStringList::create();
-    for (auto&amp; name : m_info.indexNames())
-        indexNames-&gt;append(name);
-    indexNames-&gt;sort();
-
-    return indexNames;
-}
-
-RefPtr&lt;WebCore::IDBTransaction&gt; IDBObjectStore::transaction()
-{
-    return &amp;m_transaction.get();
-}
-
-bool IDBObjectStore::autoIncrement() const
-{
-    return m_info.autoIncrement();
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
-{
-    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    return openCursor(context, key, IDBCursor::directionNext(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::openCursor&quot;);
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec.code);
-    if (ec.code)
-        return nullptr;
-
-    auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range, direction);
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestOpenCursor(context, *this, info);
-    return WTFMove(request);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
-{
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
-    if (ec.code) {
-        ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
-        return 0;
-    }
-
-    return openCursor(context, keyRange.get(), direction, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(context, *this, idbKey.get());
-    return WTFMove(request);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        return nullptr;
-    }
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    IDBKeyRangeData keyRangeData(keyRange);
-    if (!keyRangeData.isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestGetRecord(context, *this, keyRangeData);
-    return WTFMove(request);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::add(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCodeWithMessage&amp; ec)
-{
-    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::add(JSC::ExecState&amp; execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
-{
-    RefPtr&lt;IDBKey&gt; idbKey;
-    if (!key.isUndefined())
-        idbKey = scriptValueToIDBKey(execState, key);
-    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::put(JSC::ExecState&amp; execState, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
-{
-    RefPtr&lt;IDBKey&gt; idbKey;
-    if (!key.isUndefined())
-        idbKey = scriptValueToIDBKey(execState, key);
-    return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::put(JSC::ExecState&amp; state, JSC::JSValue value, ExceptionCodeWithMessage&amp; ec)
-{
-    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
-}
-
-RefPtr&lt;IDBRequest&gt; IDBObjectStore::putForCursorUpdate(JSC::ExecState&amp; state, JSC::JSValue value, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
-{
-    return putOrAdd(state, value, scriptValueToIDBKey(state, key), IndexedDB::ObjectStoreOverwriteMode::OverwriteForCursor, InlineKeyCheck::DoNotPerform, ec);
-}
-
-RefPtr&lt;IDBRequest&gt; IDBObjectStore::putOrAdd(JSC::ExecState&amp; state, JSC::JSValue value, RefPtr&lt;IDBKey&gt; key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, InlineKeyCheck inlineKeyCheck, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::putOrAdd&quot;);
-
-    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
-    // the exception for an object store being deleted.
-    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
-    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
-    // Until this is sorted out, we'll agree with the test and the majority share browsers.
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (m_transaction-&gt;isReadOnly()) {
-        ec.code = IDBDatabaseException::ReadOnlyError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The transaction is read-only.&quot;);
-        return nullptr;
-    }
-
-    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::create(&amp;state, value, nullptr, nullptr);
-    if (state.hadException()) {
-        // Clear the DOM exception from the serializer so we can give a more targeted exception.
-        state.clearException();
-
-        ec.code = IDBDatabaseException::DataCloneError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: An object could not be cloned.&quot;);
-        return nullptr;
-    }
-
-    if (serializedValue-&gt;hasBlobURLs()) {
-        // FIXME: Add Blob/File/FileList support
-        ec.code = IDBDatabaseException::DataCloneError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.&quot;);
-        return nullptr;
-    }
-
-    if (key &amp;&amp; !key-&gt;isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    bool usesInlineKeys = !m_info.keyPath().isNull();
-    bool usesKeyGenerator = autoIncrement();
-    if (usesInlineKeys &amp;&amp; inlineKeyCheck == InlineKeyCheck::Perform) {
-        if (key) {
-            ec.code = IDBDatabaseException::DataError;
-            ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided.&quot;);
-            return nullptr;
-        }
-
-        RefPtr&lt;IDBKey&gt; keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath());
-        if (keyPathKey &amp;&amp; !keyPathKey-&gt;isValid()) {
-            ec.code = IDBDatabaseException::DataError;
-            ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key.&quot;);
-            return nullptr;
-        }
-
-        if (!keyPathKey) {
-            if (usesKeyGenerator) {
-                if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath())) {
-                    ec.code = IDBDatabaseException::DataError;
-                    return nullptr;
-                }
-            } else {
-                ec.code = IDBDatabaseException::DataError;
-                ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.&quot;);
-                return nullptr;
-            }
-        }
-
-        if (keyPathKey) {
-            ASSERT(!key);
-            key = keyPathKey;
-        }
-    } else if (!usesKeyGenerator &amp;&amp; !key) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.&quot;);
-        return nullptr;
-    }
-
-    auto context = scriptExecutionContextFromExecState(&amp;state);
-    if (!context) {
-        ec.code = IDBDatabaseException::UnknownError;
-        return nullptr;
-    }
-
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestPutOrAdd(*context, *this, key.get(), *serializedValue, overwriteMode);
-    return adoptRef(request.leakRef());
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
-{
-    return doDelete(context, keyRange, ec);
-}
-
-RefPtr&lt;IDBRequest&gt; IDBObjectStore::doDelete(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::deleteFunction&quot;);
-
-    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
-    // the exception for an object store being deleted.
-    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
-    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
-    // Until this is sorted out, we'll agree with the test and the majority share browsers.
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (m_transaction-&gt;isReadOnly()) {
-        ec.code = IDBDatabaseException::ReadOnlyError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.&quot;);
-        return nullptr;
-    }
-
-    IDBKeyRangeData keyRangeData(keyRange);
-    if (!keyRangeData.isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestDeleteRecord(context, *this, keyRangeData);
-    return WTFMove(request);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    return modernDelete(context, key.jsValue(), ec);
-}
-
-RefPtr&lt;IDBRequest&gt; IDBObjectStore::modernDelete(ScriptExecutionContext&amp; context, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
-{
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return doDelete(context, &amp;IDBKeyRange::create(idbKey.get()).get(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::clear(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::clear&quot;);
-
-    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
-    // the exception for an object store being deleted.
-    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
-    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
-    // Until this is sorted out, we'll agree with the test and the majority share browsers.
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (m_transaction-&gt;isReadOnly()) {
-        ec.code = IDBDatabaseException::ReadOnlyError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestClearObjectStore(context, *this);
-    return adoptRef(request.leakRef());
-}
-
-RefPtr&lt;WebCore::IDBIndex&gt; IDBObjectStore::createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::createIndex %s&quot;, name.utf8().data());
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isVersionChange()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        return nullptr;
-    }
-
-    if (!keyPath.isValid()) {
-        ec.code = IDBDatabaseException::SyntaxError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.&quot;);
-        return nullptr;
-    }
-
-    if (name.isNull()) {
-        ec.code = TypeError;
-        return nullptr;
-    }
-
-    if (m_info.hasIndex(name)) {
-        ec.code = IDBDatabaseException::ConstraintError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.&quot;);
-        return nullptr;
-    }
-
-    if (keyPath.type() == IndexedDB::KeyPathType::Array &amp;&amp; multiEntry) {
-        ec.code = IDBDatabaseException::InvalidAccessError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.&quot;);
-        return nullptr;
-    }
-
-    // Install the new Index into the ObjectStore's info.
-    IDBIndexInfo info = m_info.createNewIndex(name, keyPath, unique, multiEntry);
-    m_transaction-&gt;database().didCreateIndexInfo(info);
-
-    // Create the actual IDBObjectStore from the transaction, which also schedules the operation server side.
-    auto index = m_transaction-&gt;createIndex(*this, info);
-    RefPtr&lt;IDBIndex&gt; refIndex = index.get();
-
-    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
-    m_referencedIndexes.set(name, WTFMove(index));
-
-    return WTFMove(refIndex);
-}
-
-RefPtr&lt;WebCore::IDBIndex&gt; IDBObjectStore::index(const String&amp; indexName, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::index&quot;);
-
-    if (!scriptExecutionContext())
-        return nullptr;
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (m_transaction-&gt;isFinishedOrFinishing()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The transaction is finished.&quot;);
-        return nullptr;
-    }
-
-    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
-    auto iterator = m_referencedIndexes.find(indexName);
-    if (iterator != m_referencedIndexes.end())
-        return iterator-&gt;value.get();
-
-    auto* info = m_info.infoForExistingIndex(indexName);
-    if (!info) {
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.&quot;);
-        return nullptr;
-    }
-
-    auto index = std::make_unique&lt;IDBIndex&gt;(*scriptExecutionContext(), *info, *this);
-    RefPtr&lt;IDBIndex&gt; refIndex = index.get();
-    m_referencedIndexes.set(indexName, WTFMove(index));
-
-    return refIndex;
-}
-
-void IDBObjectStore::deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::deleteIndex %s&quot;, name.utf8().data());
-
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return;
-    }
-
-    if (!m_transaction-&gt;isVersionChange()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction.&quot;);
-        return;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return;
-    }
-
-    if (!m_info.hasIndex(name)) {
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.&quot;);
-        return;
-    }
-
-    auto* info = m_info.infoForExistingIndex(name);
-    ASSERT(info);
-    m_transaction-&gt;database().didDeleteIndexInfo(*info);
-
-    m_info.deleteIndex(name);
-
-    {
-        Locker&lt;Lock&gt; locker(m_referencedIndexLock);
-        if (auto index = m_referencedIndexes.take(name)) {
-            index-&gt;markAsDeleted();
-            m_deletedIndexes.add(WTFMove(index));
-        }
-
-    }
-
-    m_transaction-&gt;deleteIndex(m_info.identifier(), name);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
-
-    return doCount(context, IDBKeyRangeData::allKeys(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
-
-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
-    if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
-        ec.code = IDBDatabaseException::DataError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
-        return nullptr;
-    }
-
-    return doCount(context, IDBKeyRangeData(idbKey.get()), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
-
-    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
-}
-
-RefPtr&lt;WebCore::IDBRequest&gt; IDBObjectStore::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
-{
-    // The IDB spec for several IDBObjectStore methods states that transaction related exceptions should fire before
-    // the exception for an object store being deleted.
-    // However, a handful of W3C IDB tests expect the deleted exception even though the transaction inactive exception also applies.
-    // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit.
-    // Until this is sorted out, we'll agree with the test and the majority share browsers.
-    if (m_deleted) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.&quot;);
-        return nullptr;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec.code = IDBDatabaseException::TransactionInactiveError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
-        return nullptr;
-    }
-
-    if (!range.isValid()) {
-        ec.code = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    return m_transaction-&gt;requestCount(context, *this, range);
-}
-
-void IDBObjectStore::markAsDeleted()
-{
-    m_deleted = true;
-}
-
-void IDBObjectStore::rollbackInfoForVersionChangeAbort()
-{
-    m_info = m_originalInfo;
-}
-
-void IDBObjectStore::visitReferencedIndexes(JSC::SlotVisitor&amp; visitor) const
-{
-    Locker&lt;Lock&gt; locker(m_referencedIndexLock);
-    for (auto&amp; index : m_referencedIndexes.values())
-        visitor.addOpaqueRoot(index.get());
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBObjectStoreImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,133 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBObjectStoreImpl_h
-#define IDBObjectStoreImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;ActiveDOMObject.h&quot;
-#include &quot;IDBIndexImpl.h&quot;
-#include &quot;IDBObjectStore.h&quot;
-#include &quot;IDBObjectStoreInfo.h&quot;
-#include &quot;IndexedDB.h&quot;
-
-namespace WebCore {
-
-class IDBKey;
-
-struct IDBKeyRangeData;
-
-namespace IDBClient {
-
-class IDBRequest;
-class IDBTransaction;
-
-class IDBObjectStore : public WebCore::IDBObjectStore, public ActiveDOMObject {
-public:
-    static Ref&lt;IDBObjectStore&gt; create(ScriptExecutionContext&amp;, const IDBObjectStoreInfo&amp;, IDBTransaction&amp;);
-
-    ~IDBObjectStore() final;
-
-    // Implement the IDBObjectStore IDL
-    const String name() const final;
-    RefPtr&lt;WebCore::IDBAny&gt; keyPathAny() const final;
-    const IDBKeyPath keyPath() const final;
-    RefPtr&lt;DOMStringList&gt; indexNames() const final;
-    RefPtr&lt;WebCore::IDBTransaction&gt; transaction() final;
-    bool autoIncrement() const final;
-
-    RefPtr&lt;WebCore::IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; get(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; clear(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBIndex&gt; createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBIndex&gt; index(const String&amp; name, ExceptionCodeWithMessage&amp;) final;
-    void deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;) final;
-    RefPtr&lt;WebCore::IDBRequest&gt; count(ScriptExecutionContext&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCodeWithMessage&amp;) final;
-
-    RefPtr&lt;IDBRequest&gt; putForCursorUpdate(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; modernDelete(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-
-    void markAsDeleted();
-    bool isDeleted() const { return m_deleted; }
-
-    const IDBObjectStoreInfo&amp; info() const { return m_info; }
-
-    // FIXME: After removing LegacyIDB and folding abstract/implementation classes together,
-    // this will no longer be necessary.
-    IDBTransaction&amp; modernTransaction() { return m_transaction.get(); }
-
-    void rollbackInfoForVersionChangeAbort();
-
-    bool isModern() const override { return true; }
-
-    void visitReferencedIndexes(JSC::SlotVisitor&amp;) const;
-
-private:
-    IDBObjectStore(ScriptExecutionContext&amp;, const IDBObjectStoreInfo&amp;, IDBTransaction&amp;);
-
-    enum class InlineKeyCheck {
-        Perform,
-        DoNotPerform,
-    };
-
-    RefPtr&lt;IDBRequest&gt; putOrAdd(JSC::ExecState&amp;, JSC::JSValue, RefPtr&lt;IDBKey&gt;, IndexedDB::ObjectStoreOverwriteMode, InlineKeyCheck, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;WebCore::IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; doDelete(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-
-    // ActiveDOMObject
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    bool hasPendingActivity() const final;
-
-    IDBObjectStoreInfo m_info;
-    IDBObjectStoreInfo m_originalInfo;
-    Ref&lt;IDBTransaction&gt; m_transaction;
-
-    bool m_deleted { false };
-
-    mutable Lock m_referencedIndexLock;
-    HashMap&lt;String, std::unique_ptr&lt;IDBIndex&gt;&gt; m_referencedIndexes;
-    HashSet&lt;std::unique_ptr&lt;IDBIndex&gt;&gt; m_deletedIndexes;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBObjectStoreImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,214 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBOpenDBRequestImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseImpl.h&quot;
-#include &quot;IDBError.h&quot;
-#include &quot;IDBRequestCompletionEvent.h&quot;
-#include &quot;IDBResultData.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-#include &quot;IDBVersionChangeEventImpl.h&quot;
-#include &quot;Logging.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBOpenDBRequest&gt; IDBOpenDBRequest::createDeleteRequest(IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier)
-{
-    ASSERT(databaseIdentifier.isValid());
-    return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, 0, IndexedDB::RequestType::Delete));
-}
-
-Ref&lt;IDBOpenDBRequest&gt; IDBOpenDBRequest::createOpenRequest(IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier, uint64_t version)
-{
-    ASSERT(databaseIdentifier.isValid());
-    return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, version, IndexedDB::RequestType::Open));
-}
-    
-IDBOpenDBRequest::IDBOpenDBRequest(IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier, uint64_t version, IndexedDB::RequestType requestType)
-    : IDBRequest(connection, context)
-    , m_databaseIdentifier(databaseIdentifier)
-    , m_version(version)
-{
-    m_requestType = requestType;
-}
-
-IDBOpenDBRequest::~IDBOpenDBRequest()
-{
-}
-
-void IDBOpenDBRequest::onError(const IDBResultData&amp; data)
-{
-    m_domError = DOMError::create(data.error().name());
-    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this));
-}
-
-void IDBOpenDBRequest::versionChangeTransactionDidFinish()
-{
-    // 3.3.7 &quot;versionchange&quot; transaction steps
-    // When the transaction is finished, after firing complete/abort on the transaction, immediately set request's transaction property to null.
-    m_shouldExposeTransactionToDOM = false;
-}
-
-void IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit()
-{
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit()&quot;);
-
-    ASSERT(hasPendingActivity());
-    ASSERT(m_result);
-    ASSERT(m_result-&gt;type() == IDBAny::Type::IDBDatabase);
-    m_transaction-&gt;addRequest(*this);
-
-    auto event = IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this);
-    m_openDatabaseSuccessEvent = &amp;event.get();
-
-    enqueueEvent(WTFMove(event));
-}
-
-void IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion()
-{
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion()&quot;);
-
-    ASSERT(hasPendingActivity());
-
-    IDBError idbError(IDBDatabaseException::AbortError);
-    m_domError = DOMError::create(idbError.name());
-    m_result = IDBAny::createUndefined();
-
-    m_transaction-&gt;addRequest(*this);
-    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this));
-}
-
-bool IDBOpenDBRequest::dispatchEvent(Event&amp; event)
-{
-    bool result = IDBRequest::dispatchEvent(event);
-
-    if (m_transaction &amp;&amp; m_transaction-&gt;isVersionChange() &amp;&amp; (event.type() == eventNames().errorEvent || event.type() == eventNames().successEvent))
-        m_transaction-&gt;database().serverConnection().didFinishHandlingVersionChangeTransaction(*m_transaction);
-
-    return result;
-}
-
-void IDBOpenDBRequest::onSuccess(const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::onSuccess()&quot;);
-
-    if (!scriptExecutionContext())
-        return;
-
-    Ref&lt;IDBDatabase&gt; database = IDBDatabase::create(*scriptExecutionContext(), connection(), resultData);
-    m_result = IDBAny::create(WTFMove(database));
-    m_readyState = IDBRequestReadyState::Done;
-
-    enqueueEvent(IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this));
-}
-
-void IDBOpenDBRequest::onUpgradeNeeded(const IDBResultData&amp; resultData)
-{
-    Ref&lt;IDBDatabase&gt; database = IDBDatabase::create(*scriptExecutionContext(), connection(), resultData);
-    Ref&lt;IDBTransaction&gt; transaction = database-&gt;startVersionChangeTransaction(resultData.transactionInfo(), *this);
-
-    ASSERT(transaction-&gt;info().mode() == IndexedDB::TransactionMode::VersionChange);
-    ASSERT(transaction-&gt;originalDatabaseInfo());
-
-    uint64_t oldVersion = transaction-&gt;originalDatabaseInfo()-&gt;version();
-    uint64_t newVersion = transaction-&gt;info().newVersion();
-
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::onUpgradeNeeded() - current version is %&quot; PRIu64 &quot;, new is %&quot; PRIu64, oldVersion, newVersion);
-
-    m_result = IDBAny::create(WTFMove(database));
-    m_readyState = IDBRequestReadyState::Done;
-    m_transaction = adoptRef(&amp;transaction.leakRef());
-    m_transaction-&gt;addRequest(*this);
-
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().upgradeneededEvent));
-}
-
-void IDBOpenDBRequest::onDeleteDatabaseSuccess(const IDBResultData&amp; resultData)
-{
-    uint64_t oldVersion = resultData.databaseInfo().version();
-
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::onDeleteDatabaseSuccess() - current version is %&quot; PRIu64, oldVersion);
-
-    m_readyState = IDBRequestReadyState::Done;
-    m_result = IDBAny::createUndefined();
-
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, 0, eventNames().successEvent));
-}
-
-void IDBOpenDBRequest::requestCompleted(const IDBResultData&amp; data)
-{
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::requestCompleted&quot;);
-
-    // If an Open request was completed after the page has navigated, leaving this request
-    // with a stopped script execution context, we need to message back to the server so it
-    // doesn't hang waiting on a database connection or transaction that will never exist.
-    if (m_contextStopped) {
-        switch (data.type()) {
-        case IDBResultType::OpenDatabaseSuccess:
-            connection().abortOpenAndUpgradeNeeded(data.databaseConnectionIdentifier(), IDBResourceIdentifier::emptyValue());
-            break;
-        case IDBResultType::OpenDatabaseUpgradeNeeded:
-            connection().abortOpenAndUpgradeNeeded(data.databaseConnectionIdentifier(), data.transactionInfo().identifier());
-            break;
-        default:
-            break;
-        }
-
-        return;
-    }
-
-    switch (data.type()) {
-    case IDBResultType::Error:
-        onError(data);
-        break;
-    case IDBResultType::OpenDatabaseSuccess:
-        onSuccess(data);
-        break;
-    case IDBResultType::OpenDatabaseUpgradeNeeded:
-        onUpgradeNeeded(data);
-        break;
-    case IDBResultType::DeleteDatabaseSuccess:
-        onDeleteDatabaseSuccess(data);
-        break;
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-    }
-}
-
-void IDBOpenDBRequest::requestBlocked(uint64_t oldVersion, uint64_t newVersion)
-{
-    LOG(IndexedDB, &quot;IDBOpenDBRequest::requestBlocked&quot;);
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().blockedEvent));
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,80 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBOpenDBRequestImpl_h
-#define IDBOpenDBRequestImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMError.h&quot;
-#include &quot;IDBDatabaseIdentifier.h&quot;
-#include &quot;IDBRequestImpl.h&quot;
-
-namespace WebCore {
-
-class IDBDatabaseIdentifier;
-
-namespace IDBClient {
-
-class IDBConnectionToServer;
-
-class IDBOpenDBRequest : public IDBRequest {
-public:
-    static Ref&lt;IDBOpenDBRequest&gt; createDeleteRequest(IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;);
-    static Ref&lt;IDBOpenDBRequest&gt; createOpenRequest(IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;, uint64_t version);
-
-    ~IDBOpenDBRequest() final;
-    
-    const IDBDatabaseIdentifier&amp; databaseIdentifier() const { return m_databaseIdentifier; }
-    uint64_t version() const { return m_version; }
-
-    void requestCompleted(const IDBResultData&amp;);
-    void requestBlocked(uint64_t oldVersion, uint64_t newVersion);
-
-    void versionChangeTransactionDidFinish();
-    void fireSuccessAfterVersionChangeCommit();
-    void fireErrorAfterVersionChangeCompletion();
-
-    bool dispatchEvent(Event&amp;) final;
-
-private:
-    IDBOpenDBRequest(IDBConnectionToServer&amp;, ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;, uint64_t version, IndexedDB::RequestType);
-
-    void onError(const IDBResultData&amp;);
-    void onSuccess(const IDBResultData&amp;);
-    void onUpgradeNeeded(const IDBResultData&amp;);
-    void onDeleteDatabaseSuccess(const IDBResultData&amp;);
-
-    bool isOpenDBRequest() const override { return true; }
-
-    IDBDatabaseIdentifier m_databaseIdentifier;
-    uint64_t m_version { 0 };
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBOpenDBRequestImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,436 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBRequestImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMRequestState.h&quot;
-#include &quot;EventQueue.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCursorImpl.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBEventDispatcher.h&quot;
-#include &quot;IDBKeyData.h&quot;
-#include &quot;IDBResultData.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;ThreadSafeDataBuffer.h&quot;
-#include &lt;wtf/NeverDestroyed.h&gt;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBTransaction&amp; transaction)
-{
-    return adoptRef(*new IDBRequest(context, objectStore, transaction));
-}
-
-Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext&amp; context, IDBCursor&amp; cursor, IDBTransaction&amp; transaction)
-{
-    return adoptRef(*new IDBRequest(context, cursor, transaction));
-}
-
-Ref&lt;IDBRequest&gt; IDBRequest::createCount(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IDBTransaction&amp; transaction)
-{
-    return adoptRef(*new IDBRequest(context, index, transaction));
-}
-
-Ref&lt;IDBRequest&gt; IDBRequest::createGet(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
-{
-    return adoptRef(*new IDBRequest(context, index, requestedRecordType, transaction));
-}
-
-IDBRequest::IDBRequest(IDBConnectionToServer&amp; connection, ScriptExecutionContext&amp; context)
-    : IDBOpenDBRequest(context)
-    , m_connection(connection)
-    , m_resourceIdentifier(connection)
-{
-    suspendIfNeeded();
-}
-
-IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBTransaction&amp; transaction)
-    : IDBOpenDBRequest(context)
-    , m_transaction(&amp;transaction)
-    , m_connection(transaction.serverConnection())
-    , m_resourceIdentifier(transaction.serverConnection())
-    , m_source(IDBAny::create(objectStore))
-{
-    suspendIfNeeded();
-}
-
-IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBCursor&amp; cursor, IDBTransaction&amp; transaction)
-    : IDBOpenDBRequest(context)
-    , m_transaction(&amp;transaction)
-    , m_connection(transaction.serverConnection())
-    , m_resourceIdentifier(transaction.serverConnection())
-    , m_source(cursor.source())
-    , m_pendingCursor(&amp;cursor)
-{
-    suspendIfNeeded();
-
-    cursor.setRequest(*this);
-}
-
-IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IDBTransaction&amp; transaction)
-    : IDBOpenDBRequest(context)
-    , m_transaction(&amp;transaction)
-    , m_connection(transaction.serverConnection())
-    , m_resourceIdentifier(transaction.serverConnection())
-    , m_source(IDBAny::create(index))
-{
-    suspendIfNeeded();
-}
-
-IDBRequest::IDBRequest(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType requestedRecordType, IDBTransaction&amp; transaction)
-    : IDBRequest(context, index, transaction)
-{
-    m_requestedIndexRecordType = requestedRecordType;
-}
-
-IDBRequest::~IDBRequest()
-{
-    if (m_result) {
-        auto type = m_result-&gt;type();
-        if (type == IDBAny::Type::IDBCursor || type == IDBAny::Type::IDBCursorWithValue)
-            m_result-&gt;modernIDBCursor()-&gt;clearRequest();
-    }
-}
-
-RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::result(ExceptionCodeWithMessage&amp; ec) const
-{
-    if (m_readyState == IDBRequestReadyState::Done)
-        return m_result;
-
-    ec.code = IDBDatabaseException::InvalidStateError;
-    ec.message = ASCIILiteral(&quot;Failed to read the 'result' property from 'IDBRequest': The request has not finished.&quot;);
-    return nullptr;
-}
-
-unsigned short IDBRequest::errorCode(ExceptionCode&amp;) const
-{
-    return 0;
-}
-
-RefPtr&lt;DOMError&gt; IDBRequest::error(ExceptionCodeWithMessage&amp; ec) const
-{
-    if (m_readyState == IDBRequestReadyState::Done)
-        return m_domError;
-
-    ec.code = IDBDatabaseException::InvalidStateError;
-    ec.message = ASCIILiteral(&quot;Failed to read the 'error' property from 'IDBRequest': The request has not finished.&quot;);
-    return nullptr;
-}
-
-RefPtr&lt;WebCore::IDBAny&gt; IDBRequest::source() const
-{
-    return m_source;
-}
-
-void IDBRequest::setSource(IDBCursor&amp; cursor)
-{
-    ASSERT(!m_cursorRequestNotifier);
-
-    m_source = IDBAny::create(cursor);
-    m_cursorRequestNotifier = std::make_unique&lt;ScopeGuard&gt;([this]() {
-        ASSERT(m_source-&gt;type() == IDBAny::Type::IDBCursor || m_source-&gt;type() == IDBAny::Type::IDBCursorWithValue);
-        m_source-&gt;modernIDBCursor()-&gt;decrementOutstandingRequestCount();
-    });
-}
-
-void IDBRequest::setVersionChangeTransaction(IDBTransaction&amp; transaction)
-{
-    ASSERT(!m_transaction);
-    ASSERT(transaction.isVersionChange());
-    ASSERT(!transaction.isFinishedOrFinishing());
-
-    m_transaction = &amp;transaction;
-}
-
-RefPtr&lt;WebCore::IDBTransaction&gt; IDBRequest::transaction() const
-{
-    return m_shouldExposeTransactionToDOM ? m_transaction : nullptr;
-}
-
-const String&amp; IDBRequest::readyState() const
-{
-    static WTF::NeverDestroyed&lt;String&gt; pendingString(&quot;pending&quot;);
-    static WTF::NeverDestroyed&lt;String&gt; doneString(&quot;done&quot;);
-
-    switch (m_readyState) {
-    case IDBRequestReadyState::Pending:
-        return pendingString;
-    case IDBRequestReadyState::Done:
-        return doneString;
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-    }
-}
-
-uint64_t IDBRequest::sourceObjectStoreIdentifier() const
-{
-    if (!m_source)
-        return 0;
-
-    if (m_source-&gt;type() == IDBAny::Type::IDBObjectStore) {
-        auto* objectStore = m_source-&gt;modernIDBObjectStore();
-        if (!objectStore)
-            return 0;
-        return objectStore-&gt;info().identifier();
-    }
-
-    if (m_source-&gt;type() == IDBAny::Type::IDBIndex) {
-        auto* index = m_source-&gt;modernIDBIndex();
-        if (!index)
-            return 0;
-        return index-&gt;info().objectStoreIdentifier();
-    }
-
-    return 0;
-}
-
-uint64_t IDBRequest::sourceIndexIdentifier() const
-{
-    if (!m_source)
-        return 0;
-    if (m_source-&gt;type() != IDBAny::Type::IDBIndex)
-        return 0;
-    if (!m_source-&gt;modernIDBIndex())
-        return 0;
-
-    return m_source-&gt;modernIDBIndex()-&gt;info().identifier();
-}
-
-IndexedDB::IndexRecordType IDBRequest::requestedIndexRecordType() const
-{
-    ASSERT(m_source);
-    ASSERT(m_source-&gt;type() == IDBAny::Type::IDBIndex);
-
-    return m_requestedIndexRecordType;
-}
-
-EventTargetInterface IDBRequest::eventTargetInterface() const
-{
-    return IDBRequestEventTargetInterfaceType;
-}
-
-const char* IDBRequest::activeDOMObjectName() const
-{
-    return &quot;IDBRequest&quot;;
-}
-
-bool IDBRequest::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-bool IDBRequest::hasPendingActivity() const
-{
-    return m_hasPendingActivity;
-}
-
-void IDBRequest::stop()
-{
-    ASSERT(!m_contextStopped);
-    m_contextStopped = true;
-}
-
-void IDBRequest::enqueueEvent(Ref&lt;Event&gt;&amp;&amp; event)
-{
-    if (!scriptExecutionContext() || m_contextStopped)
-        return;
-
-    event-&gt;setTarget(this);
-    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
-}
-
-bool IDBRequest::dispatchEvent(Event&amp; event)
-{
-    LOG(IndexedDB, &quot;IDBRequest::dispatchEvent - %s (%p)&quot;, event.type().string().utf8().data(), this);
-
-    ASSERT(m_hasPendingActivity);
-    ASSERT(!m_contextStopped);
-
-    if (event.type() != eventNames().blockedEvent)
-        m_readyState = IDBRequestReadyState::Done;
-
-    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
-    targets.append(this);
-
-    if (&amp;event == m_openDatabaseSuccessEvent)
-        m_openDatabaseSuccessEvent = nullptr;
-    else if (m_transaction &amp;&amp; !m_transaction-&gt;isFinished()) {
-            targets.append(m_transaction);
-            targets.append(m_transaction-&gt;db());
-    }
-
-    m_hasPendingActivity = false;
-
-    m_cursorRequestNotifier = nullptr;
-
-    bool dontPreventDefault;
-    {
-        TransactionActivator activator(m_transaction.get());
-        dontPreventDefault = IDBEventDispatcher::dispatch(event, targets);
-    }
-
-    // IDBEventDispatcher::dispatch() might have set the pending activity flag back to true, suggesting the request will be reused.
-    // We might also re-use the request if this event was the upgradeneeded event for an IDBOpenDBRequest.
-    if (!m_hasPendingActivity)
-        m_hasPendingActivity = isOpenDBRequest() &amp;&amp; (event.type() == eventNames().upgradeneededEvent || event.type() == eventNames().blockedEvent);
-
-    // The request should only remain in the transaction's request list if it represents a pending cursor operation, or this is an open request that was blocked.
-    if (m_transaction &amp;&amp; !m_pendingCursor &amp;&amp; event.type() != eventNames().blockedEvent)
-        m_transaction-&gt;removeRequest(*this);
-
-    if (dontPreventDefault &amp;&amp; event.type() == eventNames().errorEvent &amp;&amp; m_transaction &amp;&amp; !m_transaction-&gt;isFinishedOrFinishing()) {
-        ASSERT(m_domError);
-        m_transaction-&gt;abortDueToFailedRequest(*m_domError);
-    }
-
-    return dontPreventDefault;
-}
-
-void IDBRequest::uncaughtExceptionInEventHandler()
-{
-    LOG(IndexedDB, &quot;IDBRequest::uncaughtExceptionInEventHandler&quot;);
-
-    if (m_transaction &amp;&amp; m_idbError.code() != IDBDatabaseException::AbortError)
-        m_transaction-&gt;abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)));
-}
-
-void IDBRequest::setResult(const IDBKeyData* keyData)
-{
-    if (!keyData) {
-        m_result = nullptr;
-        return;
-    }
-
-    Deprecated::ScriptValue value = idbKeyDataToScriptValue(scriptExecutionContext(), *keyData);
-    m_result = IDBAny::create(WTFMove(value));
-}
-
-void IDBRequest::setResult(uint64_t number)
-{
-    ASSERT(scriptExecutionContext());
-    m_result = IDBAny::create(Deprecated::ScriptValue(scriptExecutionContext()-&gt;vm(), JSC::JSValue(number)));
-}
-
-void IDBRequest::setResultToStructuredClone(const ThreadSafeDataBuffer&amp; valueData)
-{
-    LOG(IndexedDB, &quot;IDBRequest::setResultToStructuredClone&quot;);
-
-    auto context = scriptExecutionContext();
-    if (!context)
-        return;
-
-    Deprecated::ScriptValue value = deserializeIDBValueData(*context, valueData);
-    m_result = IDBAny::create(WTFMove(value));
-}
-
-void IDBRequest::setResultToUndefined()
-{
-    m_result = IDBAny::createUndefined();
-}
-
-IDBCursor* IDBRequest::resultCursor()
-{
-    if (!m_result)
-        return nullptr;
-    if (m_result-&gt;type() == IDBAny::Type::IDBCursor || m_result-&gt;type() == IDBAny::Type::IDBCursorWithValue)
-        return m_result-&gt;modernIDBCursor();
-    return nullptr;
-}
-
-void IDBRequest::willIterateCursor(IDBCursor&amp; cursor)
-{
-    ASSERT(m_readyState == IDBRequestReadyState::Done);
-    ASSERT(scriptExecutionContext());
-    ASSERT(m_transaction);
-    ASSERT(!m_pendingCursor);
-    ASSERT(&amp;cursor == resultCursor());
-    ASSERT(!m_cursorRequestNotifier);
-
-    m_pendingCursor = &amp;cursor;
-    m_hasPendingActivity = true;
-    m_result = nullptr;
-    m_readyState = IDBRequestReadyState::Pending;
-    m_domError = nullptr;
-    m_idbError = { };
-
-    m_cursorRequestNotifier = std::make_unique&lt;ScopeGuard&gt;([this]() {
-        m_pendingCursor-&gt;decrementOutstandingRequestCount();
-    });
-}
-
-void IDBRequest::didOpenOrIterateCursor(const IDBResultData&amp; resultData)
-{
-    ASSERT(m_pendingCursor);
-    m_result = nullptr;
-
-    if (resultData.type() == IDBResultType::IterateCursorSuccess || resultData.type() == IDBResultType::OpenCursorSuccess) {
-        m_pendingCursor-&gt;setGetResult(*this, resultData.getResult());
-        if (resultData.getResult().isDefined())
-            m_result = IDBAny::create(*m_pendingCursor);
-    }
-
-    m_cursorRequestNotifier = nullptr;
-    m_pendingCursor = nullptr;
-
-    requestCompleted(resultData);
-}
-
-void IDBRequest::requestCompleted(const IDBResultData&amp; resultData)
-{
-    m_readyState = IDBRequestReadyState::Done;
-
-    m_idbError = resultData.error();
-    if (!m_idbError.isNull())
-        onError();
-    else
-        onSuccess();
-}
-
-void IDBRequest::onError()
-{
-    LOG(IndexedDB, &quot;IDBRequest::onError&quot;);
-
-    ASSERT(!m_idbError.isNull());
-    m_domError = DOMError::create(m_idbError.name());
-    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
-}
-
-void IDBRequest::onSuccess()
-{
-    LOG(IndexedDB, &quot;IDBRequest::onSuccess&quot;);
-
-    enqueueEvent(Event::create(eventNames().successEvent, false, false));
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,158 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBRequestImpl_h
-#define IDBRequestImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBAnyImpl.h&quot;
-#include &quot;IDBOpenDBRequest.h&quot;
-#include &quot;IDBResourceIdentifier.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-#include &quot;ScopeGuard.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace WebCore {
-
-class Event;
-class IDBKeyData;
-class IDBResultData;
-class ThreadSafeDataBuffer;
-
-namespace IndexedDB {
-enum class IndexRecordType;
-}
-
-namespace IDBClient {
-
-class IDBConnectionToServer;
-
-class IDBRequest : public WebCore::IDBOpenDBRequest, public RefCounted&lt;IDBRequest&gt; {
-public:
-    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
-    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
-    static Ref&lt;IDBRequest&gt; createCount(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
-    static Ref&lt;IDBRequest&gt; createGet(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
-
-    const IDBResourceIdentifier&amp; resourceIdentifier() const { return m_resourceIdentifier; }
-
-    ~IDBRequest() override;
-
-    RefPtr&lt;WebCore::IDBAny&gt; result(ExceptionCodeWithMessage&amp;) const override;
-    unsigned short errorCode(ExceptionCode&amp;) const override;
-    RefPtr&lt;DOMError&gt; error(ExceptionCodeWithMessage&amp;) const override;
-    RefPtr&lt;WebCore::IDBAny&gt; source() const override;
-    RefPtr&lt;WebCore::IDBTransaction&gt; transaction() const override;
-    const String&amp; readyState() const override;
-
-    uint64_t sourceObjectStoreIdentifier() const;
-    uint64_t sourceIndexIdentifier() const;
-    IndexedDB::IndexRecordType requestedIndexRecordType() const;
-
-    // EventTarget
-    EventTargetInterface eventTargetInterface() const override;
-    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
-
-    using RefCounted&lt;IDBRequest&gt;::ref;
-    using RefCounted&lt;IDBRequest&gt;::deref;
-
-    void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
-    bool dispatchEvent(Event&amp;) override;
-
-    IDBConnectionToServer&amp; connection() { return m_connection; }
-
-    void requestCompleted(const IDBResultData&amp;);
-
-    void setResult(const IDBKeyData*);
-    void setResult(uint64_t);
-    void setResultToStructuredClone(const ThreadSafeDataBuffer&amp;);
-    void setResultToUndefined();
-
-    IDBAny* modernResult() { return m_result.get(); }
-
-    void willIterateCursor(IDBCursor&amp;);
-    void didOpenOrIterateCursor(const IDBResultData&amp;);
-
-    const IDBCursor* pendingCursor() const { return m_pendingCursor.get(); }
-
-    void setSource(IDBCursor&amp;);
-    void setVersionChangeTransaction(IDBTransaction&amp;);
-
-    IndexedDB::RequestType requestType() const { return m_requestType; }
-
-protected:
-    IDBRequest(IDBConnectionToServer&amp;, ScriptExecutionContext&amp;);
-    IDBRequest(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBTransaction&amp;);
-    IDBRequest(ScriptExecutionContext&amp;, IDBCursor&amp;, IDBTransaction&amp;);
-    IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IDBTransaction&amp;);
-    IDBRequest(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, IDBTransaction&amp;);
-
-    // ActiveDOMObject.
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    bool hasPendingActivity() const final;
-    void stop() final;
-
-    // EventTarget.
-    void refEventTarget() final { RefCounted&lt;IDBRequest&gt;::ref(); }
-    void derefEventTarget() final { RefCounted&lt;IDBRequest&gt;::deref(); }
-    void uncaughtExceptionInEventHandler() final;
-
-    virtual bool isOpenDBRequest() const { return false; }
-
-    IDBRequestReadyState m_readyState { IDBRequestReadyState::Pending };
-    RefPtr&lt;IDBAny&gt; m_result;
-    RefPtr&lt;IDBTransaction&gt; m_transaction;
-    bool m_shouldExposeTransactionToDOM { true };
-    RefPtr&lt;DOMError&gt; m_domError;
-    IDBError m_idbError;
-    IndexedDB::RequestType m_requestType = { IndexedDB::RequestType::Other };
-    bool m_contextStopped { false };
-
-    Event* m_openDatabaseSuccessEvent { nullptr };
-
-private:
-    void onError();
-    void onSuccess();
-
-    IDBCursor* resultCursor();
-
-    IDBConnectionToServer&amp; m_connection;
-    IDBResourceIdentifier m_resourceIdentifier;
-    RefPtr&lt;IDBAny&gt; m_source;
-    bool m_hasPendingActivity { true };
-    IndexedDB::IndexRecordType m_requestedIndexRecordType;
-
-    RefPtr&lt;IDBCursor&gt; m_pendingCursor;
-
-    std::unique_ptr&lt;ScopeGuard&gt; m_cursorRequestNotifier;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBRequestImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,907 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBTransactionImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;DOMError.h&quot;
-#include &quot;EventQueue.h&quot;
-#include &quot;IDBCursorWithValueImpl.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBDatabaseImpl.h&quot;
-#include &quot;IDBError.h&quot;
-#include &quot;IDBEventDispatcher.h&quot;
-#include &quot;IDBKeyData.h&quot;
-#include &quot;IDBKeyRangeData.h&quot;
-#include &quot;IDBObjectStore.h&quot;
-#include &quot;IDBOpenDBRequestImpl.h&quot;
-#include &quot;IDBRequestImpl.h&quot;
-#include &quot;IDBResultData.h&quot;
-#include &quot;JSDOMWindowBase.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;TransactionOperation.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-Ref&lt;IDBTransaction&gt; IDBTransaction::create(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info)
-{
-    return adoptRef(*new IDBTransaction(database, info, nullptr));
-}
-
-Ref&lt;IDBTransaction&gt; IDBTransaction::create(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info, IDBOpenDBRequest&amp; request)
-{
-    return adoptRef(*new IDBTransaction(database, info, &amp;request));
-}
-
-IDBTransaction::IDBTransaction(IDBDatabase&amp; database, const IDBTransactionInfo&amp; info, IDBOpenDBRequest* request)
-    : WebCore::IDBTransaction(database.scriptExecutionContext())
-    , m_database(database)
-    , m_info(info)
-    , m_operationTimer(*this, &amp;IDBTransaction::operationTimerFired)
-    , m_openDBRequest(request)
-
-{
-    LOG(IndexedDB, &quot;IDBTransaction::IDBTransaction - %s&quot;, m_info.loggingString().utf8().data());
-
-    relaxAdoptionRequirement();
-
-    if (m_info.mode() == IndexedDB::TransactionMode::VersionChange) {
-        ASSERT(m_openDBRequest);
-        m_openDBRequest-&gt;setVersionChangeTransaction(*this);
-        m_startedOnServer = true;
-    } else {
-        activate();
-
-        RefPtr&lt;IDBTransaction&gt; self;
-        JSC::VM&amp; vm = JSDOMWindowBase::commonVM();
-        vm.whenIdle([self, this]() {
-            deactivate();
-        });
-
-        establishOnServer();
-    }
-
-    suspendIfNeeded();
-}
-
-IDBTransaction::~IDBTransaction()
-{
-}
-
-const String&amp; IDBTransaction::mode() const
-{
-    switch (m_info.mode()) {
-    case IndexedDB::TransactionMode::ReadOnly:
-        return IDBTransaction::modeReadOnly();
-    case IndexedDB::TransactionMode::ReadWrite:
-        return IDBTransaction::modeReadWrite();
-    case IndexedDB::TransactionMode::VersionChange:
-        return IDBTransaction::modeVersionChange();
-    }
-
-    RELEASE_ASSERT_NOT_REACHED();
-}
-
-WebCore::IDBDatabase* IDBTransaction::db()
-{
-    return &amp;m_database.get();
-}
-
-IDBConnectionToServer&amp; IDBTransaction::serverConnection()
-{
-    return m_database-&gt;serverConnection();
-}
-
-RefPtr&lt;DOMError&gt; IDBTransaction::error() const
-{
-    return m_domError;
-}
-
-RefPtr&lt;WebCore::IDBObjectStore&gt; IDBTransaction::objectStore(const String&amp; objectStoreName, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::objectStore&quot;);
-
-    if (!scriptExecutionContext())
-        return nullptr;
-
-    if (isFinishedOrFinishing()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The transaction finished.&quot;);
-        return nullptr;
-    }
-
-    auto iterator = m_referencedObjectStores.find(objectStoreName);
-    if (iterator != m_referencedObjectStores.end())
-        return iterator-&gt;value;
-
-    bool found = false;
-    for (auto&amp; objectStore : m_info.objectStores()) {
-        if (objectStore == objectStoreName) {
-            found = true;
-            break;
-        }
-    }
-
-    auto* info = m_database-&gt;info().infoForExistingObjectStore(objectStoreName);
-    if (!info) {
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.&quot;);
-        return nullptr;
-    }
-
-    // Version change transactions are scoped to every object store in the database.
-    if (!info || (!found &amp;&amp; !isVersionChange())) {
-        ec.code = IDBDatabaseException::NotFoundError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.&quot;);
-        return nullptr;
-    }
-
-    auto objectStore = IDBObjectStore::create(*scriptExecutionContext(), *info, *this);
-    m_referencedObjectStores.set(objectStoreName, &amp;objectStore.get());
-
-    return adoptRef(&amp;objectStore.leakRef());
-}
-
-
-void IDBTransaction::abortDueToFailedRequest(DOMError&amp; error)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::abortDueToFailedRequest&quot;);
-    if (isFinishedOrFinishing())
-        return;
-
-    m_domError = &amp;error;
-    ExceptionCodeWithMessage ec;
-    abort(ec);
-}
-
-void IDBTransaction::transitionedToFinishing(IndexedDB::TransactionState state)
-{
-    ASSERT(!isFinishedOrFinishing());
-    m_state = state;
-    ASSERT(isFinishedOrFinishing());
-    m_referencedObjectStores.clear();
-}
-
-void IDBTransaction::abort(ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::abort&quot;);
-
-    if (isFinishedOrFinishing()) {
-        ec.code = IDBDatabaseException::InvalidStateError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.&quot;);
-        return;
-    }
-
-    m_database-&gt;willAbortTransaction(*this);
-
-    if (isVersionChange()) {
-        for (auto&amp; objectStore : m_referencedObjectStores.values())
-            objectStore-&gt;rollbackInfoForVersionChangeAbort();
-    }
-
-    transitionedToFinishing(IndexedDB::TransactionState::Aborting);
-    
-    m_abortQueue.swap(m_transactionOperationQueue);
-
-    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::abortOnServerAndCancelRequests);
-    scheduleOperation(WTFMove(operation));
-}
-
-void IDBTransaction::abortOnServerAndCancelRequests(TransactionOperation&amp; operation)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::abortOnServerAndCancelRequests&quot;);
-
-    ASSERT(m_transactionOperationQueue.isEmpty());
-
-    serverConnection().abortTransaction(*this);
-
-    ASSERT(m_transactionOperationMap.contains(operation.identifier()));
-    m_transactionOperationMap.remove(operation.identifier());
-
-    IDBError error(IDBDatabaseException::AbortError);
-    for (auto&amp; operation : m_abortQueue)
-        operation-&gt;completed(IDBResultData::error(operation-&gt;identifier(), error));
-
-    // Since we're aborting, it should be impossible to have queued any further operations.
-    ASSERT(m_transactionOperationQueue.isEmpty());
-}
-
-const char* IDBTransaction::activeDOMObjectName() const
-{
-    return &quot;IDBTransaction&quot;;
-}
-
-bool IDBTransaction::canSuspendForDocumentSuspension() const
-{
-    return false;
-}
-
-bool IDBTransaction::hasPendingActivity() const
-{
-    return !m_contextStopped &amp;&amp; m_state != IndexedDB::TransactionState::Finished;
-}
-
-void IDBTransaction::stop()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::stop&quot;);
-
-    // IDBDatabase::stop() calls IDBTransaction::stop() for each of its active transactions.
-    // Since the order of calling ActiveDOMObject::stop() is random, we might already have been stopped.
-    if (m_contextStopped)
-        return;
-
-    m_contextStopped = true;
-
-    if (isFinishedOrFinishing())
-        return;
-
-    ExceptionCodeWithMessage ec;
-    abort(ec);
-}
-
-bool IDBTransaction::isActive() const
-{
-    return m_state == IndexedDB::TransactionState::Active;
-}
-
-bool IDBTransaction::isFinishedOrFinishing() const
-{
-    return m_state == IndexedDB::TransactionState::Committing
-        || m_state == IndexedDB::TransactionState::Aborting
-        || m_state == IndexedDB::TransactionState::Finished;
-}
-
-void IDBTransaction::addRequest(IDBRequest&amp; request)
-{
-    m_openRequests.add(&amp;request);
-}
-
-void IDBTransaction::removeRequest(IDBRequest&amp; request)
-{
-    ASSERT(m_openRequests.contains(&amp;request));
-    m_openRequests.remove(&amp;request);
-}
-
-void IDBTransaction::scheduleOperation(RefPtr&lt;TransactionOperation&gt;&amp;&amp; operation)
-{
-    ASSERT(!m_transactionOperationMap.contains(operation-&gt;identifier()));
-
-    m_transactionOperationQueue.append(operation);
-    m_transactionOperationMap.set(operation-&gt;identifier(), WTFMove(operation));
-
-    scheduleOperationTimer();
-}
-
-void IDBTransaction::scheduleOperationTimer()
-{
-    if (!m_operationTimer.isActive())
-        m_operationTimer.startOneShot(0);
-}
-
-void IDBTransaction::operationTimerFired()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::operationTimerFired (%p)&quot;, this);
-
-    if (!m_startedOnServer)
-        return;
-
-    if (!m_transactionOperationQueue.isEmpty()) {
-        auto operation = m_transactionOperationQueue.takeFirst();
-        operation-&gt;perform();
-
-        return;
-    }
-
-    if (!m_transactionOperationMap.isEmpty() || !m_openRequests.isEmpty())
-        return;
-
-    if (!isFinishedOrFinishing())
-        commit();
-}
-
-void IDBTransaction::commit()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::commit&quot;);
-
-    ASSERT(!isFinishedOrFinishing());
-
-    transitionedToFinishing(IndexedDB::TransactionState::Committing);
-    m_database-&gt;willCommitTransaction(*this);
-
-    auto operation = createTransactionOperation(*this, nullptr, &amp;IDBTransaction::commitOnServer);
-    scheduleOperation(WTFMove(operation));
-}
-
-void IDBTransaction::commitOnServer(TransactionOperation&amp; operation)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::commitOnServer&quot;);
-    serverConnection().commitTransaction(*this);
-
-    ASSERT(m_transactionOperationMap.contains(operation.identifier()));
-    m_transactionOperationMap.remove(operation.identifier());
-}
-
-void IDBTransaction::finishAbortOrCommit()
-{
-    ASSERT(m_state != IndexedDB::TransactionState::Finished);
-    m_state = IndexedDB::TransactionState::Finished;
-}
-
-void IDBTransaction::didStart(const IDBError&amp; error)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didStart&quot;);
-
-    m_database-&gt;didStartTransaction(*this);
-
-    m_startedOnServer = true;
-
-    // It's possible the transaction failed to start on the server.
-    // That equates to an abort.
-    if (!error.isNull()) {
-        didAbort(error);
-        return;
-    }
-
-    scheduleOperationTimer();
-}
-
-void IDBTransaction::notifyDidAbort(const IDBError&amp; error)
-{
-    m_database-&gt;didAbortTransaction(*this);
-    m_idbError = error;
-    fireOnAbort();
-
-    if (isVersionChange()) {
-        ASSERT(m_openDBRequest);
-        m_openDBRequest-&gt;fireErrorAfterVersionChangeCompletion();
-    }
-}
-
-void IDBTransaction::didAbort(const IDBError&amp; error)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didAbort&quot;);
-
-    if (m_state == IndexedDB::TransactionState::Finished)
-        return;
-
-    notifyDidAbort(error);
-
-    finishAbortOrCommit();
-}
-
-void IDBTransaction::didCommit(const IDBError&amp; error)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didCommit&quot;);
-
-    ASSERT(m_state == IndexedDB::TransactionState::Committing);
-
-    if (error.isNull()) {
-        m_database-&gt;didCommitTransaction(*this);
-        fireOnComplete();
-    } else {
-        m_database-&gt;willAbortTransaction(*this);
-        notifyDidAbort(error);
-    }
-
-    finishAbortOrCommit();
-}
-
-void IDBTransaction::fireOnComplete()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::fireOnComplete&quot;);
-    enqueueEvent(Event::create(eventNames().completeEvent, false, false));
-}
-
-void IDBTransaction::fireOnAbort()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::fireOnAbort&quot;);
-    enqueueEvent(Event::create(eventNames().abortEvent, true, false));
-}
-
-void IDBTransaction::enqueueEvent(Ref&lt;Event&gt;&amp;&amp; event)
-{
-    ASSERT(m_state != IndexedDB::TransactionState::Finished);
-
-    if (!scriptExecutionContext() || m_contextStopped)
-        return;
-
-    event-&gt;setTarget(this);
-    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(WTFMove(event));
-}
-
-bool IDBTransaction::dispatchEvent(Event&amp; event)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::dispatchEvent&quot;);
-
-    ASSERT(scriptExecutionContext());
-    ASSERT(!m_contextStopped);
-    ASSERT(event.target() == this);
-    ASSERT(event.type() == eventNames().completeEvent || event.type() == eventNames().abortEvent);
-
-    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
-    targets.append(this);
-    targets.append(db());
-
-    bool result = IDBEventDispatcher::dispatch(event, targets);
-
-    if (isVersionChange()) {
-        ASSERT(m_openDBRequest);
-        m_openDBRequest-&gt;versionChangeTransactionDidFinish();
-
-        if (event.type() == eventNames().completeEvent) {
-            if (m_database-&gt;isClosingOrClosed())
-                m_openDBRequest-&gt;fireErrorAfterVersionChangeCompletion();
-            else
-                m_openDBRequest-&gt;fireSuccessAfterVersionChangeCommit();
-        }
-
-        m_openDBRequest = nullptr;
-    }
-
-    return result;
-}
-
-Ref&lt;IDBObjectStore&gt; IDBTransaction::createObjectStore(const IDBObjectStoreInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::createObjectStore&quot;);
-    ASSERT(isVersionChange());
-    ASSERT(scriptExecutionContext());
-
-    Ref&lt;IDBObjectStore&gt; objectStore = IDBObjectStore::create(*scriptExecutionContext(), info, *this);
-    m_referencedObjectStores.set(info.name(), &amp;objectStore.get());
-
-    auto operation = createTransactionOperation(*this, &amp;IDBTransaction::didCreateObjectStoreOnServer, &amp;IDBTransaction::createObjectStoreOnServer, info);
-    scheduleOperation(WTFMove(operation));
-
-    return objectStore;
-}
-
-void IDBTransaction::createObjectStoreOnServer(TransactionOperation&amp; operation, const IDBObjectStoreInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::createObjectStoreOnServer&quot;);
-
-    ASSERT(isVersionChange());
-
-    m_database-&gt;serverConnection().createObjectStore(operation, info);
-}
-
-void IDBTransaction::didCreateObjectStoreOnServer(const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didCreateObjectStoreOnServer&quot;);
-
-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::CreateObjectStoreSuccess || resultData.type() == IDBResultType::Error);
-}
-
-std::unique_ptr&lt;IDBIndex&gt; IDBTransaction::createIndex(IDBObjectStore&amp; objectStore, const IDBIndexInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::createIndex&quot;);
-    ASSERT(isVersionChange());
-
-    if (!scriptExecutionContext())
-        return nullptr;
-
-    auto operation = createTransactionOperation(*this, &amp;IDBTransaction::didCreateIndexOnServer, &amp;IDBTransaction::createIndexOnServer, info);
-    scheduleOperation(WTFMove(operation));
-
-    return std::make_unique&lt;IDBIndex&gt;(*scriptExecutionContext(), info, objectStore);
-}
-
-void IDBTransaction::createIndexOnServer(TransactionOperation&amp; operation, const IDBIndexInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::createIndexOnServer&quot;);
-
-    ASSERT(isVersionChange());
-
-    m_database-&gt;serverConnection().createIndex(operation, info);
-}
-
-void IDBTransaction::didCreateIndexOnServer(const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didCreateIndexOnServer&quot;);
-
-    if (resultData.type() == IDBResultType::CreateIndexSuccess)
-        return;
-
-    ASSERT(resultData.type() == IDBResultType::Error);
-
-    // This operation might have failed because the transaction is already aborting.
-    if (m_state == IndexedDB::TransactionState::Aborting)
-        return;
-
-    // Otherwise, failure to create an index forced abortion of the transaction.
-    abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(resultData.error().code())));
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
-
-    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, objectStore, info));
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
-
-    if (info.cursorType() == IndexedDB::CursorType::KeyOnly)
-        return doRequestOpenCursor(context, IDBCursor::create(*this, index, info));
-
-    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, index, info));
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::doRequestOpenCursor(ScriptExecutionContext&amp; context, Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
-{
-    ASSERT(isActive());
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, cursor.get(), *this);
-    addRequest(request.get());
-
-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didOpenCursorOnServer, &amp;IDBTransaction::openCursorOnServer, cursor-&gt;info());
-    scheduleOperation(WTFMove(operation));
-
-    return request;
-}
-
-void IDBTransaction::openCursorOnServer(TransactionOperation&amp; operation, const IDBCursorInfo&amp; info)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::openCursorOnServer&quot;);
-
-    m_database-&gt;serverConnection().openCursor(operation, info);
-}
-
-void IDBTransaction::didOpenCursorOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didOpenCursorOnServer&quot;);
-
-    request.didOpenOrIterateCursor(resultData);
-}
-
-void IDBTransaction::iterateCursor(IDBCursor&amp; cursor, const IDBKeyData&amp; key, unsigned long count)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::iterateCursor&quot;);
-    ASSERT(isActive());
-    ASSERT(cursor.request());
-
-    addRequest(*cursor.request());
-
-    auto operation = createTransactionOperation(*this, *cursor.request(), &amp;IDBTransaction::didIterateCursorOnServer, &amp;IDBTransaction::iterateCursorOnServer, key, count);
-    scheduleOperation(WTFMove(operation));
-}
-
-void IDBTransaction::iterateCursorOnServer(TransactionOperation&amp; operation, const IDBKeyData&amp; key, const unsigned long&amp; count)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::iterateCursorOnServer&quot;);
-
-    serverConnection().iterateCursor(operation, key, count);
-}
-
-void IDBTransaction::didIterateCursorOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didIterateCursorOnServer&quot;);
-
-    request.didOpenOrIterateCursor(resultData);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; keyRangeData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestGetRecord&quot;);
-    ASSERT(isActive());
-    ASSERT(!keyRangeData.isNull);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
-    addRequest(request.get());
-
-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, keyRangeData);
-    scheduleOperation(WTFMove(operation));
-
-    return request;
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetValue(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
-    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Value, range);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetKey(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
-    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Key, range);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestIndexRecord(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType type, const IDBKeyRangeData&amp;range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
-    ASSERT(isActive());
-    ASSERT(!range.isNull);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::createGet(context, index, type, *this);
-    addRequest(request.get());
-
-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, range);
-    scheduleOperation(WTFMove(operation));
-
-    return request;
-}
-
-void IDBTransaction::getRecordOnServer(TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::getRecordOnServer&quot;);
-
-    serverConnection().getRecord(operation, keyRange);
-}
-
-void IDBTransaction::didGetRecordOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didGetRecordOnServer&quot;);
-
-    if (resultData.type() == IDBResultType::Error) {
-        request.requestCompleted(resultData);
-        return;
-    }
-
-    ASSERT(resultData.type() == IDBResultType::GetRecordSuccess);
-
-    const IDBGetResult&amp; result = resultData.getResult();
-
-    if (request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
-        if (!result.keyData().isNull())
-            request.setResult(&amp;result.keyData());
-        else
-            request.setResultToUndefined();
-    } else {
-        if (resultData.getResult().valueBuffer().data())
-            request.setResultToStructuredClone(resultData.getResult().valueBuffer());
-        else
-            request.setResultToUndefined();
-    }
-
-    request.requestCompleted(resultData);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBObjectStore)&quot;);
-    ASSERT(isActive());
-    ASSERT(!range.isNull);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
-    addRequest(request.get());
-
-    scheduleOperation(createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
-
-    return request;
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBIndex)&quot;);
-    ASSERT(isActive());
-    ASSERT(!range.isNull);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::createCount(context, index, *this);
-    addRequest(request.get());
-
-    scheduleOperation(createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
-
-    return request;
-}
-
-void IDBTransaction::getCountOnServer(TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::getCountOnServer&quot;);
-
-    serverConnection().getCount(operation, keyRange);
-}
-
-void IDBTransaction::didGetCountOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didGetCountOnServer&quot;);
-
-    request.setResult(resultData.resultInteger());
-    request.requestCompleted(resultData);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestDeleteRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestDeleteRecord&quot;);
-    ASSERT(isActive());
-    ASSERT(!range.isNull);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
-    addRequest(request.get());
-
-    scheduleOperation(createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didDeleteRecordOnServer, &amp;IDBTransaction::deleteRecordOnServer, range));
-    return request;
-}
-
-void IDBTransaction::deleteRecordOnServer(TransactionOperation&amp; operation, const IDBKeyRangeData&amp; keyRange)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::deleteRecordOnServer&quot;);
-
-    serverConnection().deleteRecord(operation, keyRange);
-}
-
-void IDBTransaction::didDeleteRecordOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didDeleteRecordOnServer&quot;);
-
-    request.setResultToUndefined();
-    request.requestCompleted(resultData);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestClearObjectStore(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestClearObjectStore&quot;);
-    ASSERT(isActive());
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
-    addRequest(request.get());
-
-    uint64_t objectStoreIdentifier = objectStore.info().identifier();
-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didClearObjectStoreOnServer, &amp;IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier);
-    scheduleOperation(WTFMove(operation));
-
-    return request;
-}
-
-void IDBTransaction::clearObjectStoreOnServer(TransactionOperation&amp; operation, const uint64_t&amp; objectStoreIdentifier)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::clearObjectStoreOnServer&quot;);
-
-    serverConnection().clearObjectStore(operation, objectStoreIdentifier);
-}
-
-void IDBTransaction::didClearObjectStoreOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didClearObjectStoreOnServer&quot;);
-
-    request.setResultToUndefined();
-    request.requestCompleted(resultData);
-}
-
-Ref&lt;IDBRequest&gt; IDBTransaction::requestPutOrAdd(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBKey* key, SerializedScriptValue&amp; value, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::requestPutOrAdd&quot;);
-    ASSERT(isActive());
-    ASSERT(!isReadOnly());
-    ASSERT(objectStore.info().autoIncrement() || key);
-
-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
-    addRequest(request.get());
-
-    auto operation = createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didPutOrAddOnServer, &amp;IDBTransaction::putOrAddOnServer, key, &amp;value, overwriteMode);
-    scheduleOperation(WTFMove(operation));
-
-    return request;
-}
-
-void IDBTransaction::putOrAddOnServer(TransactionOperation&amp; operation, RefPtr&lt;IDBKey&gt; key, RefPtr&lt;SerializedScriptValue&gt; value, const IndexedDB::ObjectStoreOverwriteMode&amp; overwriteMode)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::putOrAddOnServer&quot;);
-
-    ASSERT(!isReadOnly());
-
-    serverConnection().putOrAdd(operation, key, value, overwriteMode);
-}
-
-void IDBTransaction::didPutOrAddOnServer(IDBRequest&amp; request, const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didPutOrAddOnServer&quot;);
-
-    request.setResult(resultData.resultKey());
-    request.requestCompleted(resultData);
-}
-
-void IDBTransaction::deleteObjectStore(const String&amp; objectStoreName)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStore&quot;);
-
-    ASSERT(isVersionChange());
-
-    if (auto objectStore = m_referencedObjectStores.take(objectStoreName))
-        objectStore-&gt;markAsDeleted();
-
-    auto operation = createTransactionOperation(*this, &amp;IDBTransaction::didDeleteObjectStoreOnServer, &amp;IDBTransaction::deleteObjectStoreOnServer, objectStoreName);
-    scheduleOperation(WTFMove(operation));
-}
-
-void IDBTransaction::deleteObjectStoreOnServer(TransactionOperation&amp; operation, const String&amp; objectStoreName)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::deleteObjectStoreOnServer&quot;);
-    ASSERT(isVersionChange());
-
-    serverConnection().deleteObjectStore(operation, objectStoreName);
-}
-
-void IDBTransaction::didDeleteObjectStoreOnServer(const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didDeleteObjectStoreOnServer&quot;);
-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteObjectStoreSuccess || resultData.type() == IDBResultType::Error);
-}
-
-void IDBTransaction::deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::deleteIndex&quot;);
-
-    ASSERT(isVersionChange());
-
-    auto operation = createTransactionOperation(*this, &amp;IDBTransaction::didDeleteIndexOnServer, &amp;IDBTransaction::deleteIndexOnServer, objectStoreIdentifier, indexName);
-    scheduleOperation(WTFMove(operation));
-}
-
-void IDBTransaction::deleteIndexOnServer(TransactionOperation&amp; operation, const uint64_t&amp; objectStoreIdentifier, const String&amp; indexName)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::deleteIndexOnServer&quot;);
-    ASSERT(isVersionChange());
-
-    serverConnection().deleteIndex(operation, objectStoreIdentifier, indexName);
-}
-
-void IDBTransaction::didDeleteIndexOnServer(const IDBResultData&amp; resultData)
-{
-    LOG(IndexedDB, &quot;IDBTransaction::didDeleteIndexOnServer&quot;);
-    ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::DeleteIndexSuccess || resultData.type() == IDBResultType::Error);
-}
-
-void IDBTransaction::operationDidComplete(TransactionOperation&amp; operation)
-{
-    ASSERT(m_transactionOperationMap.get(operation.identifier()) == &amp;operation);
-    m_transactionOperationMap.remove(operation.identifier());
-
-    scheduleOperationTimer();
-}
-
-void IDBTransaction::establishOnServer()
-{
-    LOG(IndexedDB, &quot;IDBTransaction::establishOnServer&quot;);
-
-    serverConnection().establishTransaction(*this);
-}
-
-void IDBTransaction::activate()
-{
-    if (isFinishedOrFinishing())
-        return;
-
-    m_state = IndexedDB::TransactionState::Active;
-}
-
-void IDBTransaction::deactivate()
-{
-    if (m_state == IndexedDB::TransactionState::Active)
-        m_state = IndexedDB::TransactionState::Inactive;
-
-    scheduleOperationTimer();
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,241 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBTransactionImpl_h
-#define IDBTransactionImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseInfo.h&quot;
-#include &quot;IDBError.h&quot;
-#include &quot;IDBIndexImpl.h&quot;
-#include &quot;IDBObjectStoreImpl.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;IDBTransactionInfo.h&quot;
-#include &quot;IndexedDB.h&quot;
-#include &quot;Timer.h&quot;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-
-namespace WebCore {
-
-class IDBCursorInfo;
-class IDBIndexInfo;
-class IDBKeyData;
-class IDBObjectStoreInfo;
-class IDBResultData;
-
-struct IDBKeyRangeData;
-
-namespace IDBClient {
-
-class IDBCursor;
-class IDBDatabase;
-class IDBIndex;
-class IDBOpenDBRequest;
-class TransactionOperation;
-
-class IDBTransaction : public WebCore::IDBTransaction {
-public:
-    static Ref&lt;IDBTransaction&gt; create(IDBDatabase&amp;, const IDBTransactionInfo&amp;);
-    static Ref&lt;IDBTransaction&gt; create(IDBDatabase&amp;, const IDBTransactionInfo&amp;, IDBOpenDBRequest&amp;);
-
-    ~IDBTransaction() final;
-
-    // IDBTransaction IDL
-    const String&amp; mode() const final;
-    WebCore::IDBDatabase* db() final;
-    RefPtr&lt;DOMError&gt; error() const final;
-    RefPtr&lt;WebCore::IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCodeWithMessage&amp;) final;
-    void abort(ExceptionCodeWithMessage&amp;) final;
-
-    EventTargetInterface eventTargetInterface() const final { return IDBTransactionEventTargetInterfaceType; }
-    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
-    void refEventTarget() final { ref(); }
-    void derefEventTarget() final { deref(); }
-    using EventTarget::dispatchEvent;
-    bool dispatchEvent(Event&amp;) final;
-
-    const char* activeDOMObjectName() const final;
-    bool canSuspendForDocumentSuspension() const final;
-    bool hasPendingActivity() const final;
-    void stop() final;
-
-    const IDBTransactionInfo&amp; info() const { return m_info; }
-    IDBDatabase&amp; database() { return m_database.get(); }
-    const IDBDatabase&amp; database() const { return m_database.get(); }
-    IDBDatabaseInfo* originalDatabaseInfo() const { return m_info.originalDatabaseInfo(); }
-
-    void didStart(const IDBError&amp;);
-    void didAbort(const IDBError&amp;);
-    void didCommit(const IDBError&amp;);
-
-    bool isVersionChange() const { return m_info.mode() == IndexedDB::TransactionMode::VersionChange; }
-    bool isReadOnly() const { return m_info.mode() == IndexedDB::TransactionMode::ReadOnly; }
-    bool isActive() const;
-
-    Ref&lt;IDBObjectStore&gt; createObjectStore(const IDBObjectStoreInfo&amp;);
-    std::unique_ptr&lt;IDBIndex&gt; createIndex(IDBObjectStore&amp;, const IDBIndexInfo&amp;);
-
-    Ref&lt;IDBRequest&gt; requestPutOrAdd(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
-    Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestDeleteRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestClearObjectStore(ScriptExecutionContext&amp;, IDBObjectStore&amp;);
-    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestGetValue(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestGetKey(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
-    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
-    void iterateCursor(IDBCursor&amp;, const IDBKeyData&amp;, unsigned long count);
-
-    void deleteObjectStore(const String&amp; objectStoreName);
-    void deleteIndex(uint64_t objectStoreIdentifier, const String&amp; indexName);
-
-    void addRequest(IDBRequest&amp;);
-    void removeRequest(IDBRequest&amp;);
-
-    void abortDueToFailedRequest(DOMError&amp;);
-
-    IDBConnectionToServer&amp; serverConnection();
-
-    void activate();
-    void deactivate();
-
-    void operationDidComplete(TransactionOperation&amp;);
-
-    bool isFinishedOrFinishing() const;
-    bool isFinished() const { return m_state == IndexedDB::TransactionState::Finished; }
-
-private:
-    IDBTransaction(IDBDatabase&amp;, const IDBTransactionInfo&amp;, IDBOpenDBRequest*);
-
-    void commit();
-
-    void notifyDidAbort(const IDBError&amp;);
-    void finishAbortOrCommit();
-
-    void scheduleOperation(RefPtr&lt;TransactionOperation&gt;&amp;&amp;);
-    void operationTimerFired();
-
-    void fireOnComplete();
-    void fireOnAbort();
-    void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
-
-    Ref&lt;IDBRequest&gt; requestIndexRecord(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
-
-    void commitOnServer(TransactionOperation&amp;);
-    void abortOnServerAndCancelRequests(TransactionOperation&amp;);
-
-    void createObjectStoreOnServer(TransactionOperation&amp;, const IDBObjectStoreInfo&amp;);
-    void didCreateObjectStoreOnServer(const IDBResultData&amp;);
-
-    void createIndexOnServer(TransactionOperation&amp;, const IDBIndexInfo&amp;);
-    void didCreateIndexOnServer(const IDBResultData&amp;);
-
-    void clearObjectStoreOnServer(TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier);
-    void didClearObjectStoreOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void putOrAddOnServer(TransactionOperation&amp;, RefPtr&lt;IDBKey&gt;, RefPtr&lt;SerializedScriptValue&gt;, const IndexedDB::ObjectStoreOverwriteMode&amp;);
-    void didPutOrAddOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void getRecordOnServer(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
-    void didGetRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void getCountOnServer(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
-    void didGetCountOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void deleteRecordOnServer(TransactionOperation&amp;, const IDBKeyRangeData&amp;);
-    void didDeleteRecordOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void deleteObjectStoreOnServer(TransactionOperation&amp;, const String&amp; objectStoreName);
-    void didDeleteObjectStoreOnServer(const IDBResultData&amp;);
-
-    void deleteIndexOnServer(TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier, const String&amp; indexName);
-    void didDeleteIndexOnServer(const IDBResultData&amp;);
-
-    Ref&lt;IDBRequest&gt; doRequestOpenCursor(ScriptExecutionContext&amp;, Ref&lt;IDBCursor&gt;&amp;&amp;);
-    void openCursorOnServer(TransactionOperation&amp;, const IDBCursorInfo&amp;);
-    void didOpenCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void iterateCursorOnServer(TransactionOperation&amp;, const IDBKeyData&amp;, const unsigned long&amp; count);
-    void didIterateCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
-
-    void transitionedToFinishing(IndexedDB::TransactionState);
-
-    void establishOnServer();
-
-    void scheduleOperationTimer();
-
-    Ref&lt;IDBDatabase&gt; m_database;
-    IDBTransactionInfo m_info;
-
-    IndexedDB::TransactionState m_state { IndexedDB::TransactionState::Inactive };
-    bool m_startedOnServer { false };
-
-    IDBError m_idbError;
-    RefPtr&lt;DOMError&gt; m_domError;
-
-    Timer m_operationTimer;
-    std::unique_ptr&lt;Timer&gt; m_activationTimer;
-
-    RefPtr&lt;IDBOpenDBRequest&gt; m_openDBRequest;
-
-    Deque&lt;RefPtr&lt;TransactionOperation&gt;&gt; m_transactionOperationQueue;
-    Deque&lt;RefPtr&lt;TransactionOperation&gt;&gt; m_abortQueue;
-    HashMap&lt;IDBResourceIdentifier, RefPtr&lt;TransactionOperation&gt;&gt; m_transactionOperationMap;
-
-    HashMap&lt;String, RefPtr&lt;IDBObjectStore&gt;&gt; m_referencedObjectStores;
-
-    HashSet&lt;RefPtr&lt;IDBRequest&gt;&gt; m_openRequests;
-
-    bool m_contextStopped { false };
-};
-
-class TransactionActivator {
-    WTF_MAKE_NONCOPYABLE(TransactionActivator);
-public:
-    TransactionActivator(IDBTransaction* transaction)
-        : m_transaction(transaction)
-    {
-        if (m_transaction)
-            m_transaction-&gt;activate();
-    }
-
-    ~TransactionActivator()
-    {
-        if (m_transaction)
-            m_transaction-&gt;deactivate();
-    }
-
-private:
-    IDBTransaction* m_transaction;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBTransactionImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;IDBVersionChangeEventImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-namespace IDBClient {
-
-IDBVersionChangeEvent::IDBVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
-    : WebCore::IDBVersionChangeEvent(eventType)
-    , m_requestIdentifier(requestIdentifier)
-    , m_oldVersion(oldVersion)
-    , m_newVersion(newVersion)
-{
-}
-
-Optional&lt;uint64_t&gt; IDBVersionChangeEvent::newVersion() const
-{
-    if (!m_newVersion)
-        return Nullopt;
-    return m_newVersion;
-}
-
-EventInterface IDBVersionChangeEvent::eventInterface() const
-{
-    return IDBVersionChangeEventInterfaceType;
-}
-
-} // namespace IDBClient
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBVersionChangeEventImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,73 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBVersionChangeEventImpl_h
-#define IDBVersionChangeEventImpl_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBResourceIdentifier.h&quot;
-#include &quot;IDBVersionChangeEvent.h&quot;
-
-namespace WebCore {
-namespace IDBClient {
-
-class IDBVersionChangeEvent final : public WebCore::IDBVersionChangeEvent {
-public:
-    static Ref&lt;IDBVersionChangeEvent&gt; create(uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
-    {
-        return adoptRef(*new IDBVersionChangeEvent(IDBResourceIdentifier::emptyValue(), oldVersion, newVersion, eventType));
-    }
-
-    static Ref&lt;IDBVersionChangeEvent&gt; create(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType)
-    {
-        return adoptRef(*new IDBVersionChangeEvent(requestIdentifier, oldVersion, newVersion, eventType));
-    }
-
-    const IDBResourceIdentifier&amp; requestIdentifier() const { return m_requestIdentifier; }
-
-    bool isVersionChangeEvent() const final { return true; }
-
-private:
-    IDBVersionChangeEvent(const IDBResourceIdentifier&amp; requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString&amp; eventType);
-
-    uint64_t oldVersion() const override { return m_oldVersion; }
-    Optional&lt;uint64_t&gt; newVersion() const override;
-    EventInterface eventInterface() const override;
-
-    IDBResourceIdentifier m_requestIdentifier;
-    uint64_t m_oldVersion;
-    uint64_t m_newVersion;
-};
-
-} // namespace IDBClient
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::IDBClient::IDBVersionChangeEvent)
-    static bool isType(const WebCore::Event&amp; event) { return event.isVersionChangeEvent(); }
-SPECIALIZE_TYPE_TRAITS_END()
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBVersionChangeEventImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientTransactionOperationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBCursorImpl.h&quot;
</del><ins>+#include &quot;IDBCursor.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBClient {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientTransactionOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBRequest.h&quot;
</ins><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><del>-#include &quot;IDBTransactionImpl.h&quot;
</del><ins>+#include &quot;IDBTransaction.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,17 +28,17 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBTransactionImpl.h&quot;
</del><ins>+#include &quot;IDBTransaction.h&quot;
</ins><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBCursorInfo IDBCursorInfo::objectStoreCursor(IDBClient::IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction)
</del><ins>+IDBCursorInfo IDBCursorInfo::objectStoreCursor(IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction)
</ins><span class="cx"> {
</span><span class="cx">     return { transaction, objectStoreIdentifier, range, direction, IndexedDB::CursorType::KeyAndValue };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBCursorInfo IDBCursorInfo::indexCursor(IDBClient::IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</del><ins>+IDBCursorInfo IDBCursorInfo::indexCursor(IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</ins><span class="cx"> {
</span><span class="cx">     return { transaction, objectStoreIdentifier, indexIdentifier, range, direction, type };
</span><span class="cx"> }
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBCursorInfo::IDBCursorInfo(IDBClient::IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</del><ins>+IDBCursorInfo::IDBCursorInfo(IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</ins><span class="cx">     : m_cursorIdentifier(transaction.serverConnection())
</span><span class="cx">     , m_transactionIdentifier(transaction.info().identifier())
</span><span class="cx">     , m_objectStoreIdentifier(objectStoreIdentifier)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBCursorInfo::IDBCursorInfo(IDBClient::IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</del><ins>+IDBCursorInfo::IDBCursorInfo(IDBTransaction&amp; transaction, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp; range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
</ins><span class="cx">     : m_cursorIdentifier(transaction.serverConnection())
</span><span class="cx">     , m_transactionIdentifier(transaction.info().identifier())
</span><span class="cx">     , m_objectStoreIdentifier(objectStoreIdentifier)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -33,9 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-namespace IDBClient {
</del><span class="cx"> class IDBTransaction;
</span><del>-}
</del><span class="cx"> 
</span><span class="cx"> namespace IndexedDB {
</span><span class="cx"> enum class CursorDirection;
</span><span class="lines">@@ -52,8 +50,8 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBCursorInfo {
</span><span class="cx"> public:
</span><del>-    static IDBCursorInfo objectStoreCursor(IDBClient::IDBTransaction&amp;, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection);
-    static IDBCursorInfo indexCursor(IDBClient::IDBTransaction&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
</del><ins>+    static IDBCursorInfo objectStoreCursor(IDBTransaction&amp;, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection);
+    static IDBCursorInfo indexCursor(IDBTransaction&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
</ins><span class="cx"> 
</span><span class="cx">     IDBResourceIdentifier identifier() const { return m_cursorIdentifier; }
</span><span class="cx">     uint64_t sourceIdentifier() const { return m_sourceIdentifier; }
</span><span class="lines">@@ -74,8 +72,8 @@
</span><span class="cx">     template&lt;class Decoder&gt; static bool decode(Decoder&amp;, IDBCursorInfo&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    IDBCursorInfo(IDBClient::IDBTransaction&amp;, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
-    IDBCursorInfo(IDBClient::IDBTransaction&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
</del><ins>+    IDBCursorInfo(IDBTransaction&amp;, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
+    IDBCursorInfo(IDBTransaction&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp;, IndexedDB::CursorDirection, IndexedDB::CursorType);
</ins><span class="cx"> 
</span><span class="cx">     IDBCursorInfo(const IDBResourceIdentifier&amp;, const IDBResourceIdentifier&amp;, uint64_t, uint64_t, const IDBKeyRangeData&amp;, IndexedDB::CursorSource, IndexedDB::CursorDirection, IndexedDB::CursorType);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -29,7 +29,8 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><del>-#include &quot;IDBOpenDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -37,7 +38,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBRequestData::IDBRequestData(const IDBClient::IDBConnectionToServer&amp; connection, const IDBClient::IDBOpenDBRequest&amp; request)
</del><ins>+IDBRequestData::IDBRequestData(const IDBClient::IDBConnectionToServer&amp; connection, const IDBOpenDBRequest&amp; request)
</ins><span class="cx">     : m_serverConnectionIdentifier(connection.identifier())
</span><span class="cx">     , m_requestIdentifier(std::make_unique&lt;IDBResourceIdentifier&gt;(connection, request))
</span><span class="cx">     , m_databaseIdentifier(request.databaseIdentifier())
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -34,20 +34,21 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBOpenDBRequest;
+class IDBTransaction;
+
</ins><span class="cx"> namespace IndexedDB {
</span><span class="cx"> enum class IndexRecordType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> class IDBConnectionToServer;
</span><del>-class IDBOpenDBRequest;
-class IDBTransaction;
</del><span class="cx"> class TransactionOperation;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class IDBRequestData {
</span><span class="cx"> public:
</span><del>-    IDBRequestData(const IDBClient::IDBConnectionToServer&amp;, const IDBClient::IDBOpenDBRequest&amp;);
</del><ins>+    IDBRequestData(const IDBClient::IDBConnectionToServer&amp;, const IDBOpenDBRequest&amp;);
</ins><span class="cx">     explicit IDBRequestData(IDBClient::TransactionOperation&amp;);
</span><span class="cx">     IDBRequestData(const IDBRequestData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBConnectionToClient.h&quot;
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><del>-#include &quot;IDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBRequest.h&quot;
</ins><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBResourceIdentifier::IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp; connection, const IDBClient::IDBRequest&amp; request)
</del><ins>+IDBResourceIdentifier::IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp; connection, const IDBRequest&amp; request)
</ins><span class="cx">     : m_idbConnectionIdentifier(connection.identifier())
</span><span class="cx">     , m_resourceNumber(request.resourceIdentifier().m_resourceNumber)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBResourceIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -32,9 +32,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBRequest;
+
</ins><span class="cx"> namespace IDBClient {
</span><span class="cx"> class IDBConnectionToServer;
</span><del>-class IDBRequest;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -44,7 +45,7 @@
</span><span class="cx"> class IDBResourceIdentifier {
</span><span class="cx"> public:
</span><span class="cx">     explicit IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;);
</span><del>-    IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;, const IDBClient::IDBRequest&amp;);
</del><ins>+    IDBResourceIdentifier(const IDBClient::IDBConnectionToServer&amp;, const IDBRequest&amp;);
</ins><span class="cx">     explicit IDBResourceIdentifier(const IDBServer::IDBConnectionToClient&amp;);
</span><span class="cx"> 
</span><span class="cx">     static IDBResourceIdentifier deletedValue();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBTransactionInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBTransactionImpl.h&quot;
</del><ins>+#include &quot;IDBTransaction.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><span class="cx"> #include &quot;IDBCursorInfo.h&quot;
</span><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><del>-#include &quot;IDBOpenDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBOpenDBRequest.h&quot;
</ins><span class="cx"> #include &quot;IDBRequestData.h&quot;
</span><span class="cx"> #include &quot;IDBResultData.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBConnectionToClient.h&quot;
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><del>-#include &quot;IDBOpenDBRequestImpl.h&quot;
</del><ins>+#include &quot;IDBOpenDBRequest.h&quot;
</ins><span class="cx"> #include &quot;IDBServer.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1946,12 +1946,6 @@
</span><span class="cx">                 510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D018B6B9AB007FC7A1 /* ImageControlsRootElementMac.h */; };
</span><span class="cx">                 510192D518B6B9B7007FC7A1 /* ImageControlsRootElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */; };
</span><span class="cx">                 510192D618B6B9B7007FC7A1 /* ImageControlsRootElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */; };
</span><del>-                5103104F1BA8CC03003329C0 /* IDBFactoryImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */; };
-                510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */; };
-                5103105A1BA8DB56003329C0 /* IDBOpenDBRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */; };
-                5103105B1BA8DB56003329C0 /* IDBOpenDBRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                5103105C1BA8DB56003329C0 /* IDBRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */; };
-                5103105D1BA8DB56003329C0 /* IDBRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510310591BA8DB30003329C0 /* IDBRequestImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 5106D7BD18BDB76F000AB166 /* ContextMenuContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5106D7BB18BDB76F000AB166 /* ContextMenuContext.cpp */; };
</span><span class="cx">                 5106D7BE18BDB76F000AB166 /* ContextMenuContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 5106D7BC18BDB76F000AB166 /* ContextMenuContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 510A58E41BAA40B100C19282 /* InProcessIDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510A58E21BAA40AE00C19282 /* InProcessIDBServer.cpp */; };
</span><span class="lines">@@ -2047,8 +2041,6 @@
</span><span class="cx">                 5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */; };
</span><span class="cx">                 5160712E1BD8307800DBC4F2 /* IDBObjectStoreInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160712C1BD8307200DBC4F2 /* IDBObjectStoreInfo.cpp */; };
</span><span class="cx">                 5160712F1BD8307800DBC4F2 /* IDBObjectStoreInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5160712D1BD8307200DBC4F2 /* IDBObjectStoreInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                516071301BD8308600DBC4F2 /* IDBObjectStoreImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516071291BD8305300DBC4F2 /* IDBObjectStoreImpl.cpp */; };
-                516071311BD8308600DBC4F2 /* IDBObjectStoreImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5160712A1BD8305300DBC4F2 /* IDBObjectStoreImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 516071321BD8308B00DBC4F2 /* TransactionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5160712B1BD8305300DBC4F2 /* TransactionOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */; };
</span><span class="cx">                 5162C7F411F77EFB00612EFE /* SchemeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5162C7F211F77EFA00612EFE /* SchemeRegistry.cpp */; };
</span><span class="lines">@@ -2160,14 +2152,6 @@
</span><span class="cx">                 5198F7A91BBDD38500E2CC5F /* UniqueIDBDatabaseTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7A71BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5198F7AC1BBDD3EB00E2CC5F /* IDBTransactionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7AA1BBDD3E300E2CC5F /* IDBTransactionInfo.cpp */; };
</span><span class="cx">                 5198F7AD1BBDD3EB00E2CC5F /* IDBTransactionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7AB1BBDD3E300E2CC5F /* IDBTransactionInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                5198F7B01BBDF5C800E2CC5F /* IDBDatabaseImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */; };
-                5198F7B11BBDF5C800E2CC5F /* IDBDatabaseImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                5198F7B41BBE003C00E2CC5F /* IDBTransactionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */; };
-                5198F7B51BBE003C00E2CC5F /* IDBTransactionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                5198F7B81BC3145100E2CC5F /* IDBVersionChangeEventImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */; };
-                5198F7B91BC3145100E2CC5F /* IDBVersionChangeEventImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */; };
-                5198F7BE1BC338AF00E2CC5F /* IDBAnyImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */; };
-                5198F7BF1BC338AF00E2CC5F /* IDBAnyImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 5198F7C01BC4856700E2CC5F /* IDBConnectionToServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */; };
</span><span class="cx">                 5198F7C11BC4856700E2CC5F /* IDBConnectionToServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58FD1BB07A9600C19282 /* IDBConnectionToServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51A052331058774F00CC9E95 /* CredentialStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A052311058774F00CC9E95 /* CredentialStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2234,14 +2218,8 @@
</span><span class="cx">                 51EE7B3A1AA5123100F92B21 /* ResourceLoadInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EE7B391AA5123100F92B21 /* ResourceLoadInfo.cpp */; };
</span><span class="cx">                 51EEAA731BEFFAB100218008 /* IndexValueEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EEAA711BEFFA7900218008 /* IndexValueEntry.cpp */; };
</span><span class="cx">                 51EEAA741BEFFAB100218008 /* IndexValueEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EEAA721BEFFA7900218008 /* IndexValueEntry.h */; };
</span><del>-                51F798E51BE88092008AE491 /* IDBCursorImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798E11BE88084008AE491 /* IDBCursorImpl.cpp */; };
-                51F798E61BE88092008AE491 /* IDBCursorImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798E21BE88084008AE491 /* IDBCursorImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                51F798E71BE88092008AE491 /* IDBIndexImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798E31BE88084008AE491 /* IDBIndexImpl.cpp */; };
-                51F798E81BE88092008AE491 /* IDBIndexImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798E41BE88084008AE491 /* IDBIndexImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 51F798EF1BE880E7008AE491 /* IDBIndexInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */; };
</span><span class="cx">                 51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                51F798F31BE88394008AE491 /* IDBCursorWithValueImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798F11BE8838D008AE491 /* IDBCursorWithValueImpl.cpp */; };
-                51F798F41BE88394008AE491 /* IDBCursorWithValueImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798F21BE8838D008AE491 /* IDBCursorWithValueImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 51FA2D78152132B300C1BA0B /* DOMWindowExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 517FBA18151AA71B00B57959 /* DOMWindowExtension.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB5502113E3E9100821176 /* JSCloseEvent.h */; };
</span><span class="cx">                 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */; };
</span><span class="lines">@@ -9499,12 +9477,6 @@
</span><span class="cx">                 510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsRootElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsRootElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 510192D818B7D7AB007FC7A1 /* imageControlsMac.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = imageControlsMac.css; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactoryImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBOpenDBRequestImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOpenDBRequestImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBRequestImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510310591BA8DB30003329C0 /* IDBRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRequestImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseIdentifier.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseIdentifier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5106D7BB18BDB76F000AB166 /* ContextMenuContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContextMenuContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9612,8 +9584,6 @@
</span><span class="cx">                 515E5FEF195101470086CA5E /* PlatformGamepad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformGamepad.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemPOSIX.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                516071291BD8305300DBC4F2 /* IDBObjectStoreImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBObjectStoreImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5160712A1BD8305300DBC4F2 /* IDBObjectStoreImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBObjectStoreImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5160712B1BD8305300DBC4F2 /* TransactionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransactionOperation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5160712C1BD8307200DBC4F2 /* IDBObjectStoreInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBObjectStoreInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5160712D1BD8307200DBC4F2 /* IDBObjectStoreInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBObjectStoreInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9705,14 +9675,6 @@
</span><span class="cx">                 5198F7A71BBDD38100E2CC5F /* UniqueIDBDatabaseTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabaseTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5198F7AA1BBDD3E300E2CC5F /* IDBTransactionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5198F7AB1BBDD3E300E2CC5F /* IDBTransactionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBVersionChangeEventImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBVersionChangeEventImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBAnyImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBAnyImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 519FE0A10DAD446E00A08F21 /* HTMLAttributeNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAttributeNames.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 519FE0A20DAD446E00A08F21 /* HTMLTagNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTagNames.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51A052311058774F00CC9E95 /* CredentialStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CredentialStorage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9820,14 +9782,8 @@
</span><span class="cx">                 51EEAA721BEFFA7900218008 /* IndexValueEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexValueEntry.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLCanvasElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><del>-                51F798E11BE88084008AE491 /* IDBCursorImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51F798E21BE88084008AE491 /* IDBCursorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51F798E31BE88084008AE491 /* IDBIndexImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51F798E41BE88084008AE491 /* IDBIndexImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndexImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndexInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51F798F11BE8838D008AE491 /* IDBCursorWithValueImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorWithValueImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51F798F21BE8838D008AE491 /* IDBCursorWithValueImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorWithValueImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51FB5502113E3E9100821176 /* JSCloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCloseEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCloseEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FB67D91AE6B5E400D06C5A /* ContentExtensionStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtensionStyleSheet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17226,31 +17182,9 @@
</span><span class="cx">                 510310421BA8C64C003329C0 /* client */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                5198F7BC1BC338A900E2CC5F /* IDBAnyImpl.cpp */,
-                                5198F7BD1BC338A900E2CC5F /* IDBAnyImpl.h */,
</del><span class="cx">                                 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */,
</span><span class="cx">                                 510A58FD1BB07A9600C19282 /* IDBConnectionToServer.h */,
</span><span class="cx">                                 5185FCBD1BB5CB770012898F /* IDBConnectionToServerDelegate.h */,
</span><del>-                                51F798E11BE88084008AE491 /* IDBCursorImpl.cpp */,
-                                51F798E21BE88084008AE491 /* IDBCursorImpl.h */,
-                                51F798F11BE8838D008AE491 /* IDBCursorWithValueImpl.cpp */,
-                                51F798F21BE8838D008AE491 /* IDBCursorWithValueImpl.h */,
-                                5198F7AE1BBDF59200E2CC5F /* IDBDatabaseImpl.cpp */,
-                                5198F7AF1BBDF59200E2CC5F /* IDBDatabaseImpl.h */,
-                                5103104A1BA8C6A6003329C0 /* IDBFactoryImpl.cpp */,
-                                5103104B1BA8C6A6003329C0 /* IDBFactoryImpl.h */,
-                                51F798E31BE88084008AE491 /* IDBIndexImpl.cpp */,
-                                51F798E41BE88084008AE491 /* IDBIndexImpl.h */,
-                                516071291BD8305300DBC4F2 /* IDBObjectStoreImpl.cpp */,
-                                5160712A1BD8305300DBC4F2 /* IDBObjectStoreImpl.h */,
-                                510310561BA8DB30003329C0 /* IDBOpenDBRequestImpl.cpp */,
-                                510310571BA8DB30003329C0 /* IDBOpenDBRequestImpl.h */,
-                                510310581BA8DB30003329C0 /* IDBRequestImpl.cpp */,
-                                510310591BA8DB30003329C0 /* IDBRequestImpl.h */,
-                                5198F7B21BBE001D00E2CC5F /* IDBTransactionImpl.cpp */,
-                                5198F7B31BBE001D00E2CC5F /* IDBTransactionImpl.h */,
-                                5198F7B61BC3141700E2CC5F /* IDBVersionChangeEventImpl.cpp */,
-                                5198F7B71BC3141700E2CC5F /* IDBVersionChangeEventImpl.h */,
</del><span class="cx">                                 51D7EFEB1BDEFA4700E93E10 /* TransactionOperation.cpp */,
</span><span class="cx">                                 5160712B1BD8305300DBC4F2 /* TransactionOperation.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -26318,7 +26252,6 @@
</span><span class="cx">                                 51E1ECC10C91C90400DC255B /* IconRecord.h in Headers */,
</span><span class="cx">                                 45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */,
</span><span class="cx">                                 5185FC781BB4C4E80012898F /* IDBAny.h in Headers */,
</span><del>-                                5198F7BF1BC338AF00E2CC5F /* IDBAnyImpl.h in Headers */,
</del><span class="cx">                                 51BA4ACC1BBC5BDD00DF3D6D /* IDBBackingStore.h in Headers */,
</span><span class="cx">                                 C585A66311D4FAC5004C3E4B /* IDBBindingUtilities.h in Headers */,
</span><span class="cx">                                 5185FCB91BB4CBF80012898F /* IDBConnectionToClient.h in Headers */,
</span><span class="lines">@@ -26326,24 +26259,19 @@
</span><span class="cx">                                 5198F7C11BC4856700E2CC5F /* IDBConnectionToServer.h in Headers */,
</span><span class="cx">                                 516D7D701BB5F0BD00AF7C77 /* IDBConnectionToServerDelegate.h in Headers */,
</span><span class="cx">                                 5185FC7B1BB4C4E80012898F /* IDBCursor.h in Headers */,
</span><del>-                                51F798E61BE88092008AE491 /* IDBCursorImpl.h in Headers */,
</del><span class="cx">                                 517138FC1BF3ADF4000D5F01 /* IDBCursorInfo.h in Headers */,
</span><span class="cx">                                 5185FC7E1BB4C4E80012898F /* IDBCursorWithValue.h in Headers */,
</span><del>-                                51F798F41BE88394008AE491 /* IDBCursorWithValueImpl.h in Headers */,
</del><span class="cx">                                 5185FC811BB4C4E80012898F /* IDBDatabase.h in Headers */,
</span><span class="cx">                                 5185FC831BB4C4E80012898F /* IDBDatabaseError.h in Headers */,
</span><span class="cx">                                 5185FC851BB4C4E80012898F /* IDBDatabaseException.h in Headers */,
</span><span class="cx">                                 5185FC871BB4C4E80012898F /* IDBDatabaseIdentifier.h in Headers */,
</span><del>-                                5198F7B11BBDF5C800E2CC5F /* IDBDatabaseImpl.h in Headers */,
</del><span class="cx">                                 51BA4AC41BBB5CD800DF3D6D /* IDBDatabaseInfo.h in Headers */,
</span><span class="cx">                                 5148453F1BB9D07E006A72ED /* IDBError.h in Headers */,
</span><span class="cx">                                 5185FC8B1BB4C4E80012898F /* IDBEventDispatcher.h in Headers */,
</span><span class="cx">                                 5185FC8D1BB4C4E80012898F /* IDBFactory.h in Headers */,
</span><span class="cx">                                 69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */,
</span><del>-                                510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */,
</del><span class="cx">                                 5185FC8F1BB4C4E80012898F /* IDBGetResult.h in Headers */,
</span><span class="cx">                                 5185FC911BB4C4E80012898F /* IDBIndex.h in Headers */,
</span><del>-                                51F798E81BE88092008AE491 /* IDBIndexImpl.h in Headers */,
</del><span class="cx">                                 51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */,
</span><span class="cx">                                 5185FC951BB4C4E80012898F /* IDBKey.h in Headers */,
</span><span class="cx">                                 5185FC971BB4C4E80012898F /* IDBKeyData.h in Headers */,
</span><span class="lines">@@ -26351,24 +26279,19 @@
</span><span class="cx">                                 5185FC9B1BB4C4E80012898F /* IDBKeyRange.h in Headers */,
</span><span class="cx">                                 5185FC9E1BB4C4E80012898F /* IDBKeyRangeData.h in Headers */,
</span><span class="cx">                                 5185FCA01BB4C4E80012898F /* IDBObjectStore.h in Headers */,
</span><del>-                                516071311BD8308600DBC4F2 /* IDBObjectStoreImpl.h in Headers */,
</del><span class="cx">                                 5160712F1BD8307800DBC4F2 /* IDBObjectStoreInfo.h in Headers */,
</span><span class="cx">                                 5185FCA41BB4C4E80012898F /* IDBOpenDBRequest.h in Headers */,
</span><del>-                                5103105B1BA8DB56003329C0 /* IDBOpenDBRequestImpl.h in Headers */,
</del><span class="cx">                                 5185FCA71BB4C4E80012898F /* IDBRecordIdentifier.h in Headers */,
</span><span class="cx">                                 5185FCA91BB4C4E80012898F /* IDBRequest.h in Headers */,
</span><span class="cx">                                 514129991C6976900059E714 /* IDBRequestCompletionEvent.h in Headers */,
</span><span class="cx">                                 510A58FA1BACC7F200C19282 /* IDBRequestData.h in Headers */,
</span><del>-                                5103105D1BA8DB56003329C0 /* IDBRequestImpl.h in Headers */,
</del><span class="cx">                                 5145B10A1BC48E2E00E86219 /* IDBResourceIdentifier.h in Headers */,
</span><span class="cx">                                 51D7236D1BB6174900478CA3 /* IDBResultData.h in Headers */,
</span><span class="cx">                                 511EC1281C50AACA0032F983 /* IDBSerialization.h in Headers */,
</span><span class="cx">                                 5185FCBB1BB4CBF80012898F /* IDBServer.h in Headers */,
</span><span class="cx">                                 5185FCAD1BB4C4E80012898F /* IDBTransaction.h in Headers */,
</span><del>-                                5198F7B51BBE003C00E2CC5F /* IDBTransactionImpl.h in Headers */,
</del><span class="cx">                                 5198F7AD1BBDD3EB00E2CC5F /* IDBTransactionInfo.h in Headers */,
</span><span class="cx">                                 5185FCB01BB4C4E80012898F /* IDBVersionChangeEvent.h in Headers */,
</span><del>-                                5198F7B91BC3145100E2CC5F /* IDBVersionChangeEventImpl.h in Headers */,
</del><span class="cx">                                 E4A814E01C7338EB00BF85AC /* IdChangeInvalidation.h in Headers */,
</span><span class="cx">                                 1A71D57C0F33819000F9CE4E /* IdentifierRep.h in Headers */,
</span><span class="cx">                                 49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
</span><span class="lines">@@ -30002,27 +29925,21 @@
</span><span class="cx">                                 B275358E0B053A66002CE64F /* IconMac.mm in Sources */,
</span><span class="cx">                                 51E1ECC00C91C90400DC255B /* IconRecord.cpp in Sources */,
</span><span class="cx">                                 5185FC771BB4C4E80012898F /* IDBAny.cpp in Sources */,
</span><del>-                                5198F7BE1BC338AF00E2CC5F /* IDBAnyImpl.cpp in Sources */,
</del><span class="cx">                                 C585A66211D4FAC5004C3E4B /* IDBBindingUtilities.cpp in Sources */,
</span><span class="cx">                                 516D7D711BB5F0BD00AF7C77 /* IDBConnectionToClient.cpp in Sources */,
</span><span class="cx">                                 5198F7C01BC4856700E2CC5F /* IDBConnectionToServer.cpp in Sources */,
</span><span class="cx">                                 5185FC7A1BB4C4E80012898F /* IDBCursor.cpp in Sources */,
</span><del>-                                51F798E51BE88092008AE491 /* IDBCursorImpl.cpp in Sources */,
</del><span class="cx">                                 517138FB1BF3ADF4000D5F01 /* IDBCursorInfo.cpp in Sources */,
</span><span class="cx">                                 5185FC7D1BB4C4E80012898F /* IDBCursorWithValue.cpp in Sources */,
</span><del>-                                51F798F31BE88394008AE491 /* IDBCursorWithValueImpl.cpp in Sources */,
</del><span class="cx">                                 5185FC801BB4C4E80012898F /* IDBDatabase.cpp in Sources */,
</span><span class="cx">                                 5185FC841BB4C4E80012898F /* IDBDatabaseException.cpp in Sources */,
</span><span class="cx">                                 5185FC861BB4C4E80012898F /* IDBDatabaseIdentifier.cpp in Sources */,
</span><del>-                                5198F7B01BBDF5C800E2CC5F /* IDBDatabaseImpl.cpp in Sources */,
</del><span class="cx">                                 51BA4AC31BBB5CD800DF3D6D /* IDBDatabaseInfo.cpp in Sources */,
</span><span class="cx">                                 5148453E1BB9D07E006A72ED /* IDBError.cpp in Sources */,
</span><span class="cx">                                 5185FC8A1BB4C4E80012898F /* IDBEventDispatcher.cpp in Sources */,
</span><span class="cx">                                 5185FC8C1BB4C4E80012898F /* IDBFactory.cpp in Sources */,
</span><del>-                                5103104F1BA8CC03003329C0 /* IDBFactoryImpl.cpp in Sources */,
</del><span class="cx">                                 512F1A781C07EB6600908239 /* IDBGetResult.cpp in Sources */,
</span><span class="cx">                                 5185FC901BB4C4E80012898F /* IDBIndex.cpp in Sources */,
</span><del>-                                51F798E71BE88092008AE491 /* IDBIndexImpl.cpp in Sources */,
</del><span class="cx">                                 51F798EF1BE880E7008AE491 /* IDBIndexInfo.cpp in Sources */,
</span><span class="cx">                                 5185FC941BB4C4E80012898F /* IDBKey.cpp in Sources */,
</span><span class="cx">                                 5185FC961BB4C4E80012898F /* IDBKeyData.cpp in Sources */,
</span><span class="lines">@@ -30030,23 +29947,18 @@
</span><span class="cx">                                 5185FC9A1BB4C4E80012898F /* IDBKeyRange.cpp in Sources */,
</span><span class="cx">                                 5185FC9D1BB4C4E80012898F /* IDBKeyRangeData.cpp in Sources */,
</span><span class="cx">                                 5185FC9F1BB4C4E80012898F /* IDBObjectStore.cpp in Sources */,
</span><del>-                                516071301BD8308600DBC4F2 /* IDBObjectStoreImpl.cpp in Sources */,
</del><span class="cx">                                 5160712E1BD8307800DBC4F2 /* IDBObjectStoreInfo.cpp in Sources */,
</span><span class="cx">                                 5185FCA31BB4C4E80012898F /* IDBOpenDBRequest.cpp in Sources */,
</span><del>-                                5103105A1BA8DB56003329C0 /* IDBOpenDBRequestImpl.cpp in Sources */,
</del><span class="cx">                                 5185FCA81BB4C4E80012898F /* IDBRequest.cpp in Sources */,
</span><span class="cx">                                 514129981C6976900059E714 /* IDBRequestCompletionEvent.cpp in Sources */,
</span><span class="cx">                                 510A58F91BACC7F200C19282 /* IDBRequestData.cpp in Sources */,
</span><del>-                                5103105C1BA8DB56003329C0 /* IDBRequestImpl.cpp in Sources */,
</del><span class="cx">                                 5145B1091BC48E2E00E86219 /* IDBResourceIdentifier.cpp in Sources */,
</span><span class="cx">                                 51D7236C1BB6174900478CA3 /* IDBResultData.cpp in Sources */,
</span><span class="cx">                                 511EC1271C50AACA0032F983 /* IDBSerialization.cpp in Sources */,
</span><span class="cx">                                 5185FCBA1BB4CBF80012898F /* IDBServer.cpp in Sources */,
</span><span class="cx">                                 5185FCAC1BB4C4E80012898F /* IDBTransaction.cpp in Sources */,
</span><del>-                                5198F7B41BBE003C00E2CC5F /* IDBTransactionImpl.cpp in Sources */,
</del><span class="cx">                                 5198F7AC1BBDD3EB00E2CC5F /* IDBTransactionInfo.cpp in Sources */,
</span><span class="cx">                                 5185FCAF1BB4C4E80012898F /* IDBVersionChangeEvent.cpp in Sources */,
</span><del>-                                5198F7B81BC3145100E2CC5F /* IDBVersionChangeEventImpl.cpp in Sources */,
</del><span class="cx">                                 E4A814DE1C7338D100BF85AC /* IdChangeInvalidation.cpp in Sources */,
</span><span class="cx">                                 1A71D57B0F33819000F9CE4E /* IdentifierRep.cpp in Sources */,
</span><span class="cx">                                 C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBCursorImpl.h&quot;
</del><ins>+#include &quot;IDBCursor.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="lines">@@ -36,11 +36,8 @@
</span><span class="cx"> 
</span><span class="cx"> void JSIDBCursor::visitAdditionalChildren(SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><del>-    if (!wrapped().isModernCursor())
-        return;
-
-    auto&amp; modernCursor = static_cast&lt;IDBClient::IDBCursor&amp;&gt;(wrapped());
-    if (auto* request = modernCursor.request())
</del><ins>+    auto&amp; cursor = static_cast&lt;IDBCursor&amp;&gt;(wrapped());
+    if (auto* request = cursor.request())
</ins><span class="cx">         visitor.addOpaqueRoot(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorWithValueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorWithValueCustom.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorWithValueCustom.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorWithValueCustom.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBCursorWithValueImpl.h&quot;
</del><ins>+#include &quot;IDBCursorWithValue.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBIndexCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBIndexCustom.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBIndexCustom.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/bindings/js/JSIDBIndexCustom.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBIndexImpl.h&quot;
</del><ins>+#include &quot;IDBIndex.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="lines">@@ -36,10 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> void JSIDBIndex::visitAdditionalChildren(SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><del>-    if (!wrapped().isModern())
-        return;
-
-    visitor.addOpaqueRoot(&amp;static_cast&lt;IDBClient::IDBIndex&amp;&gt;(wrapped()).modernObjectStore());
</del><ins>+    visitor.addOpaqueRoot(&amp;static_cast&lt;IDBIndex&amp;&gt;(wrapped()).modernObjectStore());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="cx"> #include &quot;IDBKeyPath.h&quot;
</span><del>-#include &quot;IDBObjectStoreImpl.h&quot;
</del><ins>+#include &quot;IDBObjectStore.h&quot;
</ins><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;JSIDBIndex.h&quot;
</span><span class="cx"> #include &quot;JSIDBRequest.h&quot;
</span><span class="lines">@@ -47,10 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> void JSIDBObjectStore::visitAdditionalChildren(SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><del>-    if (!wrapped().isModern())
-        return;
-
-    static_cast&lt;IDBClient::IDBObjectStore&amp;&gt;(wrapped()).visitReferencedIndexes(visitor);
</del><ins>+    static_cast&lt;IDBObjectStore&amp;&gt;(wrapped()).visitReferencedIndexes(visitor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static JSValue putOrAdd(JSC::ExecState&amp; state, bool overwrite)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -185,13 +185,10 @@
</span><span class="cx">             m_executableWithDatabase-&gt;requestCallback().sendFailure(&quot;Unexpected result type.&quot;);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        if (!requestResult-&gt;isLegacy()) {
-            m_executableWithDatabase-&gt;requestCallback().sendFailure(&quot;Only Legacy IDB is supported right now.&quot;);
-            return;
-        }
</del><span class="cx"> 
</span><span class="cx">         // FIXME (webkit.org/b/154686) - Reimplement this.
</span><del>-        m_executableWithDatabase-&gt;execute();
</del><ins>+        m_executableWithDatabase-&gt;requestCallback().sendFailure(&quot;Modern IDB is not supported yet&quot;);
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-03-28  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Remove abstract base classes for all IDB DOM classes.
+        https://bugs.webkit.org/show_bug.cgi?id=155951
+
+        Reviewed by Alex Christensen.
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+
</ins><span class="cx"> 2016-03-28  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Automation: add commands to move and resize a browsing context's window
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (198761 => 198762)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-03-28 22:41:48 UTC (rev 198761)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-03-28 22:49:04 UTC (rev 198762)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> #include &lt;WebCore/IDBIndexInfo.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBKeyRangeData.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBObjectStoreInfo.h&gt;
</span><del>-#include &lt;WebCore/IDBOpenDBRequestImpl.h&gt;
</del><ins>+#include &lt;WebCore/IDBOpenDBRequest.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IDBRequestData.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBResourceIdentifier.h&gt;
</span><span class="cx"> #include &lt;WebCore/IDBResultData.h&gt;
</span></span></pre>
</div>
</div>

</body>
</html>