<!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>[189746] 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/189746">189746</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-09-14 14:01:41 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename current concrete IDB implementation to &quot;Legacy&quot;.
https://bugs.webkit.org/show_bug.cgi?id=149118

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

This patch makes IDL bindings abstract.
It then renames the current concrete implementations of the bindings from &quot;IDB&quot; to &quot;Legacy&quot;.
Finally it moves those files and their support classes to a &quot;legacy&quot; subfolder.

* CMakeLists.txt:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
* Modules/indexeddb/IDBAny.cpp:
* Modules/indexeddb/IDBAny.h:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.cpp:
* Modules/indexeddb/IDBCursorWithValue.h:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBOpenDBRequest.h:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
* Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
* Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
* Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
* Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
* Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
* Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
* Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
* Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
* Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
* Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
* Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
* Modules/indexeddb/legacy/LegacyAny.h: Added.
* Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
* Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
* Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
* Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
* Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
* Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
* Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
* Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
* Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
* Modules/indexeddb/legacy/LegacyIndex.h: Added.
* Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
* Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
* Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
* Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
* Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
* Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:

Source/WebKit2:

* CMakeLists.txt:</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="#trunkSourceWebCoreModulesindexeddbIDBCursoridl">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl</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="#trunkSourceWebCoreModulesindexeddbIDBCursorWithValueidl">trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl</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="#trunkSourceWebCoreModulesindexeddbIDBDatabaseidl">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl</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="#trunkSourceWebCoreModulesindexeddbIDBFactoryidl">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl</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="#trunkSourceWebCoreModulesindexeddbIDBIndexidl">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl</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="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</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="#trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestidl">trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl</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="#trunkSourceWebCoreModulesindexeddbIDBRequestidl">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl</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="#trunkSourceWebCoreModulesindexeddbIDBTransactionidl">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl</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="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebCore/Modules/indexeddb/legacy/</li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBCallbacksh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCallbacks.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendOperationsh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseBackendcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseBackendh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbacksh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacks.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbacksImplcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbacksImplh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBFactoryBackendInterfaceh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBFactoryBackendInterface.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBPendingDeleteCallh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingDeleteCall.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBPendingOpenCallh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingOpenCall.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBPendingTransactionMonitorcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBPendingTransactionMonitorh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationsh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionCoordinatorcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionCoordinatorh">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyAnycpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyAnyh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorWithValuecpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyCursorWithValueh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyDatabaseh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyFactorycpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyFactoryh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyIndexcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyIndexh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequesth">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyRequestcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyRequesth">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyTransactionh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyVersionChangeEventcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyVersionChangeEventh">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCallbacksh">trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendh">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationsh">trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplcpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryBackendInterfaceh">trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBPendingDeleteCallh">trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBPendingOpenCallh">trunk/Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorh">trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendh">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationsh">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorh">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -10,6 +10,7 @@
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/gamepad/deprecated&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/geolocation&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/indexeddb&quot;
</span><ins>+    &quot;${WEBCORE_DIR}/Modules/indexeddb/legacy&quot;
</ins><span class="cx">     &quot;${WEBCORE_DIR}/Modules/indieui&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediacontrols/&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediasession&quot;
</span><span class="lines">@@ -844,12 +845,8 @@
</span><span class="cx">     Modules/indexeddb/DOMWindowIndexedDatabase.cpp
</span><span class="cx">     Modules/indexeddb/IDBAny.cpp
</span><span class="cx">     Modules/indexeddb/IDBCursor.cpp
</span><del>-    Modules/indexeddb/IDBCursorBackend.cpp
-    Modules/indexeddb/IDBCursorBackendOperations.cpp
</del><span class="cx">     Modules/indexeddb/IDBCursorWithValue.cpp
</span><span class="cx">     Modules/indexeddb/IDBDatabase.cpp
</span><del>-    Modules/indexeddb/IDBDatabaseBackend.cpp
-    Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp
</del><span class="cx">     Modules/indexeddb/IDBDatabaseException.cpp
</span><span class="cx">     Modules/indexeddb/IDBDatabaseMetadata.cpp
</span><span class="cx">     Modules/indexeddb/IDBEventDispatcher.cpp
</span><span class="lines">@@ -862,15 +859,31 @@
</span><span class="cx">     Modules/indexeddb/IDBKeyRangeData.cpp
</span><span class="cx">     Modules/indexeddb/IDBObjectStore.cpp
</span><span class="cx">     Modules/indexeddb/IDBOpenDBRequest.cpp
</span><del>-    Modules/indexeddb/IDBPendingTransactionMonitor.cpp
</del><span class="cx">     Modules/indexeddb/IDBRequest.cpp
</span><span class="cx">     Modules/indexeddb/IDBTransaction.cpp
</span><del>-    Modules/indexeddb/IDBTransactionBackend.cpp
-    Modules/indexeddb/IDBTransactionBackendOperations.cpp
-    Modules/indexeddb/IDBTransactionCoordinator.cpp
</del><span class="cx">     Modules/indexeddb/IDBVersionChangeEvent.cpp
</span><span class="cx">     Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
</span><span class="cx"> 
</span><ins>+    Modules/indexeddb/legacy/IDBCursorBackend.cpp
+    Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp
+    Modules/indexeddb/legacy/IDBDatabaseBackend.cpp
+    Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp
+    Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp
+    Modules/indexeddb/legacy/IDBTransactionBackend.cpp
+    Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp
+    Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp
+    Modules/indexeddb/legacy/LegacyAny.cpp
+    Modules/indexeddb/legacy/LegacyCursor.cpp
+    Modules/indexeddb/legacy/LegacyCursorWithValue.cpp
+    Modules/indexeddb/legacy/LegacyDatabase.cpp
+    Modules/indexeddb/legacy/LegacyFactory.cpp
+    Modules/indexeddb/legacy/LegacyIndex.cpp
+    Modules/indexeddb/legacy/LegacyObjectStore.cpp
+    Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp
+    Modules/indexeddb/legacy/LegacyRequest.cpp
+    Modules/indexeddb/legacy/LegacyTransaction.cpp
+    Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp
+
</ins><span class="cx">     Modules/mediacontrols/MediaControlsHost.cpp
</span><span class="cx"> 
</span><span class="cx">     Modules/mediasession/HTMLMediaElementMediaSession.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/ChangeLog        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,3 +1,95 @@
</span><ins>+2015-09-14  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Rename current concrete IDB implementation to &quot;Legacy&quot;.
+        https://bugs.webkit.org/show_bug.cgi?id=149118
+
+        Reviewed by Alex Christensen.
+
+        No new tests (No change in behavior).
+
+        This patch makes IDL bindings abstract.
+        It then renames the current concrete implementations of the bindings from &quot;IDB&quot; to &quot;Legacy&quot;.
+        Finally it moves those files and their support classes to a &quot;legacy&quot; subfolder.
+
+        * CMakeLists.txt:
+        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+        * Modules/indexeddb/IDBAny.cpp:
+        * Modules/indexeddb/IDBAny.h:
+        * Modules/indexeddb/IDBCursor.cpp:
+        * Modules/indexeddb/IDBCursor.h:
+        * Modules/indexeddb/IDBCursor.idl:
+        * Modules/indexeddb/IDBCursorWithValue.cpp:
+        * Modules/indexeddb/IDBCursorWithValue.h:
+        * Modules/indexeddb/IDBCursorWithValue.idl:
+        * Modules/indexeddb/IDBDatabase.cpp:
+        * Modules/indexeddb/IDBDatabase.h:
+        * Modules/indexeddb/IDBDatabase.idl:
+        * Modules/indexeddb/IDBFactory.cpp:
+        * Modules/indexeddb/IDBFactory.h:
+        * Modules/indexeddb/IDBFactory.idl:
+        * Modules/indexeddb/IDBIndex.cpp:
+        * Modules/indexeddb/IDBIndex.h:
+        * Modules/indexeddb/IDBIndex.idl:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Modules/indexeddb/IDBOpenDBRequest.cpp:
+        * Modules/indexeddb/IDBOpenDBRequest.h:
+        * Modules/indexeddb/IDBOpenDBRequest.idl:
+        * Modules/indexeddb/IDBRequest.cpp:
+        * Modules/indexeddb/IDBRequest.h:
+        * Modules/indexeddb/IDBRequest.idl:
+        * Modules/indexeddb/IDBTransaction.cpp:
+        * Modules/indexeddb/IDBTransaction.h:
+        * Modules/indexeddb/IDBTransaction.idl:
+        * Modules/indexeddb/IDBVersionChangeEvent.cpp:
+        * Modules/indexeddb/IDBVersionChangeEvent.h:
+        * Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
+        * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
+        * Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
+        * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
+        * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
+        * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
+        * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
+        * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
+        * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
+        * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
+        * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
+        * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
+        * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
+        * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
+        * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
+        * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
+        * Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
+        * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
+        * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
+        * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
+        * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
+        * Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
+        * Modules/indexeddb/legacy/LegacyAny.h: Added.
+        * Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
+        * Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
+        * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
+        * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
+        * Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
+        * Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
+        * Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
+        * Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
+        * Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
+        * Modules/indexeddb/legacy/LegacyIndex.h: Added.
+        * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
+        * Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
+        * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
+        * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
+        * Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
+        * Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
+        * Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
+        * Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
+        * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
+        * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCore.vcxproj/WebCore.vcxproj:
+
</ins><span class="cx"> 2015-09-14  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</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;IDBFactory.h&quot;
</del><ins>+#include &quot;LegacyFactory.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 = IDBFactory::create(page-&gt;databaseProvider().idbFactoryBackend());
</del><ins>+        m_idbFactory = LegacyFactory::create(page-&gt;databaseProvider().idbFactoryBackend());
</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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,191 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBCursorWithValue.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBFactory.h&quot;
-#include &quot;IDBIndex.h&quot;
-#include &quot;IDBKeyPath.h&quot;
-#include &quot;IDBObjectStore.h&quot;
-#include &quot;DOMStringList.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBAny&gt; IDBAny::createInvalid()
</del><ins>+IDBAny::IDBAny()
</ins><span class="cx"> {
</span><del>-    return adoptRef(new IDBAny(UndefinedType));
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBAny&gt; IDBAny::createNull()
-{
-    return adoptRef(new IDBAny(NullType));
-}
-
-PassRefPtr&lt;IDBAny&gt; IDBAny::createString(const String&amp; value)
-{
-    return adoptRef(new IDBAny(value));
-}
-
-IDBAny::IDBAny(Type type)
-    : m_type(type)
-    , m_integer(0)
-{
-    ASSERT(type == UndefinedType || type == NullType);
-}
-
-IDBAny::~IDBAny()
-{
-}
-
-PassRefPtr&lt;DOMStringList&gt; IDBAny::domStringList()
-{
-    ASSERT(m_type == DOMStringListType);
-    return m_domStringList;
-}
-
-PassRefPtr&lt;IDBCursor&gt; IDBAny::idbCursor()
-{
-    ASSERT(m_type == IDBCursorType);
-    return m_idbCursor;
-}
-
-PassRefPtr&lt;IDBCursorWithValue&gt; IDBAny::idbCursorWithValue()
-{
-    ASSERT(m_type == IDBCursorWithValueType);
-    return m_idbCursorWithValue;
-}
-
-PassRefPtr&lt;IDBDatabase&gt; IDBAny::idbDatabase()
-{
-    ASSERT(m_type == IDBDatabaseType);
-    return m_idbDatabase;
-}
-
-PassRefPtr&lt;IDBFactory&gt; IDBAny::idbFactory()
-{
-    ASSERT(m_type == IDBFactoryType);
-    return m_idbFactory;
-}
-
-PassRefPtr&lt;IDBIndex&gt; IDBAny::idbIndex()
-{
-    ASSERT(m_type == IDBIndexType);
-    return m_idbIndex;
-}
-
-PassRefPtr&lt;IDBObjectStore&gt; IDBAny::idbObjectStore()
-{
-    ASSERT(m_type == IDBObjectStoreType);
-    return m_idbObjectStore;
-}
-
-PassRefPtr&lt;IDBTransaction&gt; IDBAny::idbTransaction()
-{
-    ASSERT(m_type == IDBTransactionType);
-    return m_idbTransaction;
-}
-
-const Deprecated::ScriptValue&amp; IDBAny::scriptValue()
-{
-    ASSERT(m_type == ScriptValueType);
-    return m_scriptValue;
-}
-
-const String&amp; IDBAny::string()
-{
-    ASSERT(m_type == StringType);
-    return m_string;
-}
-
-int64_t IDBAny::integer()
-{
-    ASSERT(m_type == IntegerType);
-    return m_integer;
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;DOMStringList&gt; value)
-    : m_type(DOMStringListType)
-    , m_domStringList(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBCursorWithValue&gt; value)
-    : m_type(IDBCursorWithValueType)
-    , m_idbCursorWithValue(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBCursor&gt; value)
-    : m_type(IDBCursorType)
-    , m_idbCursor(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBDatabase&gt; value)
-    : m_type(IDBDatabaseType)
-    , m_idbDatabase(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBFactory&gt; value)
-    : m_type(IDBFactoryType)
-    , m_idbFactory(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBIndex&gt; value)
-    : m_type(IDBIndexType)
-    , m_idbIndex(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBTransaction&gt; value)
-    : m_type(IDBTransactionType)
-    , m_idbTransaction(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(PassRefPtr&lt;IDBObjectStore&gt; value)
-    : m_type(IDBObjectStoreType)
-    , m_idbObjectStore(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(const Deprecated::ScriptValue&amp; value)
-    : m_type(ScriptValueType)
-    , m_scriptValue(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(const IDBKeyPath&amp; value)
-    : m_type(KeyPathType)
-    , m_idbKeyPath(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(const String&amp; value)
-    : m_type(StringType)
-    , m_string(value)
-    , m_integer(0)
-{
-}
-
-IDBAny::IDBAny(int64_t value)
-    : m_type(IntegerType)
-    , m_integer(value)
-{
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBAny_h
</span><span class="lines">@@ -50,29 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBAny : public ScriptWrappable, public RefCounted&lt;IDBAny&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;IDBAny&gt; createInvalid();
-    static PassRefPtr&lt;IDBAny&gt; createNull();
-    static PassRefPtr&lt;IDBAny&gt; createString(const String&amp;);
-    template&lt;typename T&gt;
-    static PassRefPtr&lt;IDBAny&gt; create(T* idbObject)
-    {
-        return adoptRef(new IDBAny(idbObject));
-    }
-    template&lt;typename T&gt;
-    static PassRefPtr&lt;IDBAny&gt; create(const T&amp; idbObject)
-    {
-        return adoptRef(new IDBAny(idbObject));
-    }
-    template&lt;typename T&gt;
-    static PassRefPtr&lt;IDBAny&gt; create(PassRefPtr&lt;T&gt; idbObject)
-    {
-        return adoptRef(new IDBAny(idbObject));
-    }
-    static PassRefPtr&lt;IDBAny&gt; create(int64_t value)
-    {
-        return adoptRef(new IDBAny(value));
-    }
-    ~IDBAny();
</del><ins>+    virtual ~IDBAny() { }
</ins><span class="cx"> 
</span><span class="cx">     enum Type {
</span><span class="cx">         UndefinedType = 0,
</span><span class="lines">@@ -91,51 +69,22 @@
</span><span class="cx">         KeyPathType,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    Type type() const { return m_type; }
-    // Use type() to figure out which one of these you're allowed to call.
-    PassRefPtr&lt;DOMStringList&gt; domStringList();
-    PassRefPtr&lt;IDBCursor&gt; idbCursor();
-    PassRefPtr&lt;IDBCursorWithValue&gt; idbCursorWithValue();
-    PassRefPtr&lt;IDBDatabase&gt; idbDatabase();
-    PassRefPtr&lt;IDBFactory&gt; idbFactory();
-    PassRefPtr&lt;IDBIndex&gt; idbIndex();
-    PassRefPtr&lt;IDBObjectStore&gt; idbObjectStore();
-    PassRefPtr&lt;IDBTransaction&gt; idbTransaction();
-    const Deprecated::ScriptValue&amp; scriptValue();
-    int64_t integer();
-    const String&amp; string();
-    const IDBKeyPath&amp; keyPath() { return m_idbKeyPath; };
</del><ins>+    virtual Type type() const = 0;
+    virtual PassRefPtr&lt;DOMStringList&gt; domStringList() = 0;
+    virtual PassRefPtr&lt;IDBCursor&gt; idbCursor() = 0;
+    virtual PassRefPtr&lt;IDBCursorWithValue&gt; idbCursorWithValue() = 0;
+    virtual PassRefPtr&lt;IDBDatabase&gt; idbDatabase() = 0;
+    virtual PassRefPtr&lt;IDBFactory&gt; idbFactory() = 0;
+    virtual PassRefPtr&lt;IDBIndex&gt; idbIndex() = 0;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; idbObjectStore() = 0;
+    virtual PassRefPtr&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;
</ins><span class="cx"> 
</span><del>-private:
-    explicit IDBAny(Type);
-    explicit IDBAny(PassRefPtr&lt;DOMStringList&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBCursor&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBCursorWithValue&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBDatabase&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBFactory&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBIndex&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBObjectStore&gt;);
-    explicit IDBAny(PassRefPtr&lt;IDBTransaction&gt;);
-    explicit IDBAny(const IDBKeyPath&amp;);
-    explicit IDBAny(const String&amp;);
-    explicit IDBAny(const Deprecated::ScriptValue&amp;);
-    explicit IDBAny(int64_t);
-
-    const Type m_type;
-
-    // Only one of the following should ever be in use at any given time.
-    const RefPtr&lt;DOMStringList&gt; m_domStringList;
-    const RefPtr&lt;IDBCursor&gt; m_idbCursor;
-    const RefPtr&lt;IDBCursorWithValue&gt; m_idbCursorWithValue;
-    const RefPtr&lt;IDBDatabase&gt; m_idbDatabase;
-    const RefPtr&lt;IDBFactory&gt; m_idbFactory;
-    const RefPtr&lt;IDBIndex&gt; m_idbIndex;
-    const RefPtr&lt;IDBObjectStore&gt; m_idbObjectStore;
-    const RefPtr&lt;IDBTransaction&gt; m_idbTransaction;
-    const IDBKeyPath m_idbKeyPath;
-    const Deprecated::ScriptValue m_scriptValue;
-    const String m_string;
-    const int64_t m_integer;
</del><ins>+protected:
+    IDBAny();
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCallbacksh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,82 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCallbacks_h
-#define IDBCallbacks_h
-
-#include &quot;IDBDatabaseError.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyPath.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-class DOMStringList;
-class IDBCursorBackend;
-class IDBDatabaseBackend;
-class SharedBuffer;
-
-struct IDBDatabaseMetadata;
-
-class IDBCallbacks : public RefCounted&lt;IDBCallbacks&gt; {
-public:
-    virtual ~IDBCallbacks() { }
-
-    virtual void onError(PassRefPtr&lt;IDBDatabaseError&gt;) = 0;
-    // From IDBFactory.webkitGetDatabaseNames()
-    virtual void onSuccess(PassRefPtr&lt;DOMStringList&gt;) = 0;
-    // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor()
-    virtual void onSuccess(PassRefPtr&lt;IDBCursorBackend&gt;) = 0;
-    // From IDBObjectStore.add()/put(), IDBIndex.getKey()
-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;) = 0;
-    // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yield null/undefined.
-    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;) = 0;
-    // From IDBObjectStore/IDBIndex.get() (with key injection)
-    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, const IDBKeyPath&amp;) = 0;
-    // From IDBObjectStore/IDBIndex.count()
-    virtual void onSuccess(int64_t value) = 0;
-
-    // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObjectStore.delete(), IDBObjectStore.clear()
-    virtual void onSuccess() = 0;
-
-    // From IDBCursor.advance()/continue()
-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;) = 0;
-
-    // From IDBFactory.open()/deleteDatabase()
-    virtual void onBlocked(uint64_t /* existingVersion */) { ASSERT_NOT_REACHED(); }
-    // From IDBFactory.open()
-    virtual void onUpgradeNeeded(uint64_t /* oldVersion */, PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) { ASSERT_NOT_REACHED(); }
-    virtual void onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) { ASSERT_NOT_REACHED(); }
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IDBCallbacks_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,24 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBAny.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCallbacks.h&quot;
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBKey.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;
-#include &lt;inspector/ScriptCallStack.h&gt;
-#include &lt;limits&gt;
</del><ins>+#include &quot;ExceptionCode.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBCursor&gt; IDBCursor::create(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
</del><ins>+IDBCursor::IDBCursor()
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new IDBCursor(backend, direction, request, source, transaction));
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const AtomicString&amp; IDBCursor::directionNext()
</span><span class="lines">@@ -72,231 +60,6 @@
</span><span class="cx">     return prevunique;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
-IDBCursor::IDBCursor(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
-    : m_backend(backend)
-    , m_request(request)
-    , m_direction(direction)
-    , m_source(source)
-    , m_transaction(transaction)
-    , m_transactionNotifier(transaction, this)
-    , m_gotValue(false)
-{
-    ASSERT(m_backend);
-    ASSERT(m_request);
-    ASSERT(m_source-&gt;type() == IDBAny::IDBObjectStoreType || m_source-&gt;type() == IDBAny::IDBIndexType);
-    ASSERT(m_transaction);
-}
-
-IDBCursor::~IDBCursor()
-{
-}
-
-const String&amp; IDBCursor::direction() const
-{
-    LOG(StorageAPI, &quot;IDBCursor::direction&quot;);
-    return directionToString(m_direction);
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::key() const
-{
-    LOG(StorageAPI, &quot;IDBCursor::key&quot;);
-    return m_currentKeyValue;
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::primaryKey() const
-{
-    LOG(StorageAPI, &quot;IDBCursor::primaryKey&quot;);
-    return m_currentPrimaryKeyValue;
-}
-
-const Deprecated::ScriptValue&amp; IDBCursor::value() const
-{
-    LOG(StorageAPI, &quot;IDBCursor::value&quot;);
-    return m_currentValue;
-}
-
-IDBAny* IDBCursor::source() const
-{
-    return m_source.get();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBCursor::update(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBCursor::update&quot;);
-
-    if (!m_gotValue || isKeyCursor()) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (m_transaction-&gt;isReadOnly()) {
-        ec = IDBDatabaseException::ReadOnlyError;
-        return 0;
-    }
-
-    RefPtr&lt;IDBObjectStore&gt; objectStore = effectiveObjectStore();
-    const IDBKeyPath&amp; keyPath = objectStore-&gt;metadata().keyPath;
-    const bool usesInLineKeys = !keyPath.isNull();
-    if (usesInLineKeys) {
-        RefPtr&lt;IDBKey&gt; keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_request-&gt;requestState()-&gt;exec(), value, keyPath);
-        if (!keyPathKey || !keyPathKey-&gt;isEqual(m_currentPrimaryKey.get())) {
-            ec = IDBDatabaseException::DataError;
-            return 0;
-        }
-    }
-
-    return objectStore-&gt;put(IDBDatabaseBackend::CursorUpdate, IDBAny::create(this), state, value, m_currentPrimaryKey, ec);
-}
-
-void IDBCursor::advance(unsigned long count, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    LOG(StorageAPI, &quot;IDBCursor::advance&quot;);
-    if (!m_gotValue) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return;
-    }
-
-    if (!count) {
-        ec = TypeError;
-        return;
-    }
-
-    m_request-&gt;setPendingCursor(this);
-    m_gotValue = false;
-    m_backend-&gt;advance(count, m_request, ec);
-    ASSERT(!ec);
-}
-
-void IDBCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
-{
-    DOMRequestState requestState(context);
-    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
-    continueFunction(key.release(), ec);
-}
-
-void IDBCursor::continueFunction(PassRefPtr&lt;IDBKey&gt; key, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    LOG(StorageAPI, &quot;IDBCursor::continue&quot;);
-    if (key &amp;&amp; !key-&gt;isValid()) {
-        ec = IDBDatabaseException::DataError;
-        return;
-    }
-
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return;
-    }
-
-    if (!m_gotValue) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-
-    if (key) {
-        ASSERT(m_currentKey);
-        if (m_direction == IndexedDB::CursorDirection::Next || m_direction == IndexedDB::CursorDirection::NextNoDuplicate) {
-            if (!m_currentKey-&gt;isLessThan(key.get())) {
-                ec = IDBDatabaseException::DataError;
-                return;
-            }
-        } else {
-            if (!key-&gt;isLessThan(m_currentKey.get())) {
-                ec = IDBDatabaseException::DataError;
-                return;
-            }
-        }
-    }
-
-    // FIXME: We're not using the context from when continue was called, which means the callback
-    //        will be on the original context openCursor was called on. Is this right?
-    m_request-&gt;setPendingCursor(this);
-    m_gotValue = false;
-    m_backend-&gt;continueFunction(key, m_request, ec);
-    ASSERT(!ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    LOG(StorageAPI, &quot;IDBCursor::delete&quot;);
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (m_transaction-&gt;isReadOnly()) {
-        ec = IDBDatabaseException::ReadOnlyError;
-        return 0;
-    }
-
-    if (!m_gotValue || isKeyCursor()) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    m_backend-&gt;deleteFunction(request, ec);
-    ASSERT(!ec);
-    return request.release();
-}
-
-void IDBCursor::postSuccessHandlerCallback()
-{
-    m_backend-&gt;postSuccessHandlerCallback();
-}
-
-void IDBCursor::close()
-{
-    m_transactionNotifier.cursorFinished();
-    if (m_request) {
-        m_request-&gt;finishCursor();
-        m_request = nullptr;
-    }
-}
-
-void IDBCursor::setValueReady(DOMRequestState* state, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, Deprecated::ScriptValue&amp; value)
-{
-    m_currentKey = key;
-    m_currentKeyValue = idbKeyToScriptValue(state, m_currentKey);
-
-    m_currentPrimaryKey = primaryKey;
-    m_currentPrimaryKeyValue = idbKeyToScriptValue(state, m_currentPrimaryKey);
-
-    if (!isKeyCursor()) {
-        RefPtr&lt;IDBObjectStore&gt; objectStore = effectiveObjectStore();
-        const IDBObjectStoreMetadata metadata = objectStore-&gt;metadata();
-        if (metadata.autoIncrement &amp;&amp; !metadata.keyPath.isNull()) {
-#ifndef NDEBUG
-            RefPtr&lt;IDBKey&gt; expectedKey = createIDBKeyFromScriptValueAndKeyPath(m_request-&gt;requestState()-&gt;exec(), value, metadata.keyPath);
-            ASSERT(!expectedKey || expectedKey-&gt;isEqual(m_currentPrimaryKey.get()));
-#endif
-            bool injected = injectIDBKeyIntoScriptValue(m_request-&gt;requestState(), m_currentPrimaryKey, value, metadata.keyPath);
-            // FIXME: There is no way to report errors here. Move this into onSuccessWithContinuation so that we can abort the transaction there. See: https://bugs.webkit.org/show_bug.cgi?id=92278
-            ASSERT_UNUSED(injected, injected);
-        }
-    }
-    m_currentValue = value;
-
-    m_gotValue = true;
-}
-
-PassRefPtr&lt;IDBObjectStore&gt; IDBCursor::effectiveObjectStore()
-{
-    if (m_source-&gt;type() == IDBAny::IDBObjectStoreType)
-        return m_source-&gt;idbObjectStore();
-    RefPtr&lt;IDBIndex&gt; index = m_source-&gt;idbIndex();
-    return index-&gt;objectStore();
-}
-
</del><span class="cx"> IndexedDB::CursorDirection IDBCursor::stringToDirection(const String&amp; directionString, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     if (directionString == IDBCursor::directionNext())
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBCursor_h
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> class DOMRequestState;
</span><span class="cx"> class IDBAny;
</span><span class="cx"> class IDBCallbacks;
</span><del>-class IDBCursorBackend;
</del><span class="cx"> class IDBRequest;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx"> 
</span><span class="lines">@@ -58,50 +57,26 @@
</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><span class="cx"> 
</span><del>-    static Ref&lt;IDBCursor&gt; create(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
-    virtual ~IDBCursor();
</del><ins>+    virtual ~IDBCursor() { }
</ins><span class="cx"> 
</span><span class="cx">     // Implement the IDL
</span><del>-    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() const;
</del><ins>+    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() const = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; update(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
-    void advance(unsigned long, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; update(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;) = 0;
+    virtual void advance(unsigned long, ExceptionCode&amp;) = 0;
</ins><span class="cx">     // FIXME: Try to modify the code generator so this overload is unneeded.
</span><del>-    void continueFunction(ScriptExecutionContext*, ExceptionCode&amp; ec) { continueFunction(static_cast&lt;IDBKey*&gt;(nullptr), ec); }
-    void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, ExceptionCode&amp;);
</del><ins>+    virtual void continueFunction(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    void continueFunction(PassRefPtr&lt;IDBKey&gt;, ExceptionCode&amp;);
-    void postSuccessHandlerCallback();
-    void close();
-    void setValueReady(DOMRequestState*, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, Deprecated::ScriptValue&amp;);
-    PassRefPtr&lt;IDBKey&gt; idbPrimaryKey() { return m_currentPrimaryKey; }
-
</del><span class="cx"> protected:
</span><del>-    IDBCursor(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
-    virtual bool isKeyCursor() const { return true; }
</del><ins>+    IDBCursor();
</ins><span class="cx"> 
</span><del>-private:
-    PassRefPtr&lt;IDBObjectStore&gt; effectiveObjectStore();
-
-    RefPtr&lt;IDBCursorBackend&gt; m_backend;
-    RefPtr&lt;IDBRequest&gt; m_request;
-    const IndexedDB::CursorDirection m_direction;
-    RefPtr&lt;IDBAny&gt; m_source;
-    RefPtr&lt;IDBTransaction&gt; m_transaction;
-    IDBTransaction::OpenCursorNotifier m_transactionNotifier;
-    bool m_gotValue;
-    // These values are held because m_backend may advance while they
-    // are still valid for the current success handlers.
-    Deprecated::ScriptValue m_currentKeyValue;
-    Deprecated::ScriptValue m_currentPrimaryKeyValue;
-    RefPtr&lt;IDBKey&gt; m_currentKey;
-    RefPtr&lt;IDBKey&gt; m_currentPrimaryKey;
-    Deprecated::ScriptValue m_currentValue;
</del><ins>+    virtual bool isKeyCursor() const { return true; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> [
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBCursor {
</span><span class="cx">     readonly attribute IDBAny source;
</span><span class="cx">     readonly attribute DOMString direction;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,109 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBCursorBackend.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBCallbacks.h&quot;
-#include &quot;IDBCursorBackendOperations.h&quot;
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBDatabaseError.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBOperation.h&quot;
-#include &quot;IDBServerConnection.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;SharedBuffer.h&quot;
-
-namespace WebCore {
-
-IDBCursorBackend::IDBCursorBackend(int64_t cursorID, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
-    : m_taskType(taskType)
-    , m_cursorType(cursorType)
-    , m_transaction(&amp;transaction)
-    , m_objectStoreID(objectStoreID)
-    , m_cursorID(cursorID)
-    , m_savedCursorID(0)
-    , m_closed(false)
-{
-    m_transaction-&gt;registerOpenCursor(this);
-}
-
-IDBCursorBackend::~IDBCursorBackend()
-{
-    m_transaction-&gt;unregisterOpenCursor(this);
-}
-
-void IDBCursorBackend::continueFunction(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
-{
-    LOG(StorageAPI, &quot;IDBCursorBackend::continue&quot;);
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    m_transaction-&gt;scheduleTask(m_taskType, CursorIterationOperation::create(this, key, callbacks));
-}
-
-void IDBCursorBackend::advance(unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
-{
-    LOG(StorageAPI, &quot;IDBCursorBackend::advance&quot;);
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    m_transaction-&gt;scheduleTask(CursorAdvanceOperation::create(this, count, callbacks));
-}
-
-void IDBCursorBackend::deleteFunction(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
-{
-    LOG(StorageAPI, &quot;IDBCursorBackend::delete&quot;);
-    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::create(primaryKey());
-    m_transaction-&gt;database().deleteRange(m_transaction-&gt;id(), m_objectStoreID, keyRange.release(), prpCallbacks);
-}
-
-void IDBCursorBackend::close()
-{
-    LOG(StorageAPI, &quot;IDBCursorBackend::close&quot;);
-    clear();
-    m_closed = true;
-    m_savedCursorID = 0;
-}
-
-void IDBCursorBackend::updateCursorData(IDBKey* key, IDBKey* primaryKey, SharedBuffer* valueBuffer)
-{
-    m_currentKey = key;
-    m_currentPrimaryKey = primaryKey;
-    m_currentValueBuffer = valueBuffer;
-}
-
-void IDBCursorBackend::clear()
-{
-    m_cursorID = 0;
-    m_currentKey = nullptr;
-    m_currentPrimaryKey = nullptr;
-    m_currentValueBuffer = nullptr;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,96 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCursorBackend_h
-#define IDBCursorBackend_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBTransactionBackend.h&quot;
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WebCore {
-
-class IDBKeyRange;
-class SharedBuffer;
-
-class IDBCursorBackend : public RefCounted&lt;IDBCursorBackend&gt; {
-public:
-    static Ref&lt;IDBCursorBackend&gt; create(int64_t cursorID, IndexedDB::CursorType cursorType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
-    {
-        return adoptRef(*new IDBCursorBackend(cursorID, cursorType, IDBDatabaseBackend::NormalTask, transaction, objectStoreID));
-    }
-    static Ref&lt;IDBCursorBackend&gt; create(int64_t cursorID, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
-    {
-        return adoptRef(*new IDBCursorBackend(cursorID, cursorType, taskType, transaction, objectStoreID));
-    }
-    ~IDBCursorBackend();
-
-    void advance(unsigned long, PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
-    void continueFunction(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
-    void deleteFunction(PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
-    void postSuccessHandlerCallback() { }
-
-    IDBKey* key() const { return m_currentKey.get(); }
-    IDBKey* primaryKey() const { return m_currentPrimaryKey.get(); }
-    SharedBuffer* valueBuffer() const { return (m_cursorType == IndexedDB::CursorType::KeyOnly) ? nullptr : m_currentValueBuffer.get(); }
-    void updateCursorData(IDBKey*, IDBKey* primaryKey, SharedBuffer* valueBuffer);
-
-    void close();
-
-    IndexedDB::CursorType cursorType() const { return m_cursorType; }
-
-    int64_t id() const { return m_cursorID; }
-
-    IDBTransactionBackend&amp; transaction() { return *m_transaction; }
-
-    void clear();
-    void setSavedCursorID(int64_t cursorID) { m_savedCursorID = cursorID; }
-
-private:
-    IDBCursorBackend(int64_t cursorID, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, IDBTransactionBackend&amp;, int64_t objectStoreID);
-
-    IDBDatabaseBackend::TaskType m_taskType;
-    IndexedDB::CursorType m_cursorType;
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-
-    int64_t m_cursorID;
-    int64_t m_savedCursorID;
-
-    RefPtr&lt;IDBKey&gt; m_currentKey;
-    RefPtr&lt;IDBKey&gt; m_currentPrimaryKey;
-    RefPtr&lt;SharedBuffer&gt; m_currentValueBuffer;
-
-    bool m_closed;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
-#endif // IDBCursorBackend_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,90 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2013 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBCursorBackendOperations.h&quot;
-
-#include &quot;IDBServerConnection.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;Logging.h&quot;
-
-namespace WebCore {
-
-void CursorAdvanceOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;CursorAdvanceOperation&quot;);
-
-    RefPtr&lt;CursorAdvanceOperation&gt; operation(this);
-    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
-        if (error) {
-            m_cursor-&gt;clear();
-            m_callbacks-&gt;onError(error);
-        } else if (!key) {
-            // If there's no error but also no key, then the cursor reached the end.
-            m_cursor-&gt;clear();
-            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
-        } else {
-            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
-            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
-        }
-
-        // FIXME: Cursor operations should be able to pass along an error instead of success
-        completionCallback();
-    };
-
-    m_cursor-&gt;transaction().database().serverConnection().cursorAdvance(*m_cursor, *this, callback);
-}
-
-void CursorIterationOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;CursorIterationOperation&quot;);
-
-    RefPtr&lt;CursorIterationOperation&gt; operation(this);
-    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
-        if (error) {
-            m_cursor-&gt;clear();
-            m_callbacks-&gt;onError(error);
-        } else if (!key) {
-            // If there's no error but also no key, then the cursor reached the end.
-            m_cursor-&gt;clear();
-            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
-        } else {
-            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
-            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
-        }
-
-        // FIXME: Cursor operations should be able to pass along an error instead of success
-        completionCallback();
-    };
-
-    m_cursor-&gt;transaction().database().serverConnection().cursorIterate(*m_cursor, *this, callback);
-}
-
-} // namespace WebCore
-
-#endif // ENABLED(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,88 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2013 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCursorBackendOperations_h
-#define IDBCursorBackendOperations_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBOperation.h&quot;
-
-namespace WebCore {
-
-class CursorIterationOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(PassRefPtr&lt;IDBCursorBackend&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new CursorIterationOperation(cursor, key, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; completionCallback) override final;
-
-    int64_t cursorID() const { return m_cursor-&gt;id(); }
-    IDBKey* key() const { return m_key.get(); }
-
-private:
-    CursorIterationOperation(PassRefPtr&lt;IDBCursorBackend&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_cursor(cursor)
-        , m_key(key)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBCursorBackend&gt; m_cursor;
-    RefPtr&lt;IDBKey&gt; m_key;
-    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-class CursorAdvanceOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(PassRefPtr&lt;IDBCursorBackend&gt; cursor, unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new CursorAdvanceOperation(cursor, count, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; completionCallback) override final;
-
-    int64_t cursorID() const { return m_cursor-&gt;id(); }
-    unsigned long count() const { return m_count; }
-
-private:
-    CursorAdvanceOperation(PassRefPtr&lt;IDBCursorBackend&gt; cursor, unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_cursor(cursor)
-        , m_count(count)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBCursorBackend&gt; m_cursor;
-    unsigned long m_count;
-    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBCursorBackendOperations_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,31 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBKey.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBCursorWithValue&gt; IDBCursorWithValue::create(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
</del><ins>+IDBCursorWithValue::IDBCursorWithValue()
</ins><span class="cx"> {
</span><del>-    return adoptRef(new IDBCursorWithValue(backend, direction, request, source, transaction));
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBCursorWithValue&gt; IDBCursorWithValue::fromCursor(PassRefPtr&lt;IDBCursor&gt; prpCursor)
-{
-    RefPtr&lt;IDBCursorWithValue&gt; cursorWithValue(static_cast&lt;IDBCursorWithValue*&gt;(prpCursor.get()));
-    return cursorWithValue.release();
-}
-
-IDBCursorWithValue::IDBCursorWithValue(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
-    : IDBCursor(backend, direction, request, source, transaction)
-{
-}
-
-IDBCursorWithValue::~IDBCursorWithValue()
-{
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBCursorWithValue_h
</span><span class="lines">@@ -34,22 +34,16 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBCursorWithValue : public IDBCursor {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;IDBCursorWithValue&gt; create(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
-    static PassRefPtr&lt;IDBCursorWithValue&gt; fromCursor(PassRefPtr&lt;IDBCursor&gt;);
-    virtual ~IDBCursorWithValue();
</del><ins>+    virtual ~IDBCursorWithValue() { }
</ins><span class="cx"> 
</span><del>-    // The value attribute defined in the IDL is simply implemented in IDBCursor (but not exposed via
-    // its IDL). This is to make the implementation more simple while matching what the spec says.
-
</del><span class="cx"> protected:
</span><del>-    virtual bool isKeyCursor() const override { return false; }
</del><ins>+    IDBCursorWithValue();
</ins><span class="cx"> 
</span><del>-private:
-    IDBCursorWithValue(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
</del><ins>+    virtual bool isKeyCursor() const override { return false; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#endif // IDBCursorWithValue_h
</del><ins>+#endif // LegacyCursorWithValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValueidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> [
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBCursorWithValue : IDBCursor {
</span><span class="cx">     readonly attribute any value;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,373 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMStringList.h&quot;
-#include &quot;EventQueue.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;IDBAny.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBDatabaseError.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBEventDispatcher.h&quot;
-#include &quot;IDBIndex.h&quot;
-#include &quot;IDBKeyPath.h&quot;
-#include &quot;IDBObjectStore.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;IDBVersionChangeEvent.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &lt;atomic&gt;
-#include &lt;inspector/ScriptCallStack.h&gt;
-#include &lt;limits&gt;
-#include &lt;wtf/Atomics.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBDatabase&gt; IDBDatabase::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseBackend&gt; database, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks)
-{
-    Ref&lt;IDBDatabase&gt; idbDatabase(adoptRef(*new IDBDatabase(context, database, callbacks)));
-    idbDatabase-&gt;suspendIfNeeded();
-    return idbDatabase;
-}
-
-IDBDatabase::IDBDatabase(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseBackend&gt; backend, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks)
</del><ins>+IDBDatabase::IDBDatabase(ScriptExecutionContext* context)
</ins><span class="cx">     : ActiveDOMObject(context)
</span><del>-    , m_backend(backend)
-    , m_closePending(false)
-    , m_isClosed(false)
-    , m_contextStopped(false)
-    , m_databaseCallbacks(callbacks)
</del><span class="cx"> {
</span><del>-    // We pass a reference of this object before it can be adopted.
-    relaxAdoptionRequirement();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBDatabase::~IDBDatabase()
-{
-    // This does what IDBDatabase::close does, but without any ref/deref of the
-    // database since it is already in the process of being deleted. The logic here
-    // is also simpler since we know there are no transactions (since they ref the
-    // database when they are alive).
-
-    ASSERT(m_transactions.isEmpty());
-
-    if (!m_closePending) {
-        m_closePending = true;
-        m_backend-&gt;close(m_databaseCallbacks);
-    }
-
-    if (auto* context = scriptExecutionContext()) {
-        // Remove any pending versionchange events scheduled to fire on this
-        // connection. They would have been scheduled by the backend when another
-        // connection called setVersion, but the frontend connection is being
-        // closed before they could fire.
-        for (auto&amp; event : m_enqueuedEvents)
-            context-&gt;eventQueue().cancelEvent(*event);
-    }
-}
-
-int64_t IDBDatabase::nextTransactionId()
-{
-    // Only keep a 32-bit counter to allow ports to use the other 32
-    // bits of the id.
-    static std::atomic&lt;uint32_t&gt; currentTransactionId;
-
-    return ++currentTransactionId;
-}
-
-void IDBDatabase::transactionCreated(IDBTransaction* transaction)
-{
-    ASSERT(transaction);
-    ASSERT(!m_transactions.contains(transaction-&gt;id()));
-    m_transactions.add(transaction-&gt;id(), transaction);
-
-    if (transaction-&gt;isVersionChange()) {
-        ASSERT(!m_versionChangeTransaction);
-        m_versionChangeTransaction = transaction;
-    }
-}
-
-void IDBDatabase::transactionFinished(IDBTransaction* transaction)
-{
-    ASSERT(transaction);
-    ASSERT(m_transactions.contains(transaction-&gt;id()));
-    ASSERT(m_transactions.get(transaction-&gt;id()) == transaction);
-    m_transactions.remove(transaction-&gt;id());
-
-    if (transaction-&gt;isVersionChange()) {
-        ASSERT(m_versionChangeTransaction == transaction);
-        m_versionChangeTransaction = nullptr;
-    }
-
-    if (m_closePending &amp;&amp; m_transactions.isEmpty())
-        closeConnection();
-}
-
-void IDBDatabase::onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
-{
-    ASSERT(m_transactions.contains(transactionId));
-    m_transactions.get(transactionId)-&gt;onAbort(error);
-}
-
-void IDBDatabase::onComplete(int64_t transactionId)
-{
-    ASSERT(m_transactions.contains(transactionId));
-    m_transactions.get(transactionId)-&gt;onComplete();
-}
-
-PassRefPtr&lt;DOMStringList&gt; IDBDatabase::objectStoreNames() const
-{
-    RefPtr&lt;DOMStringList&gt; objectStoreNames = DOMStringList::create();
-    for (auto&amp; objectStore : m_metadata.objectStores.values())
-        objectStoreNames-&gt;append(objectStore.name);
-    objectStoreNames-&gt;sort();
-    return objectStoreNames.release();
-}
-
-uint64_t IDBDatabase::version() const
-{
-    // NoIntVersion is a special value for internal use only and shouldn't be exposed to script.
-    // DefaultIntVersion should be exposed instead.
-    return m_metadata.version != IDBDatabaseMetadata::NoIntVersion ? m_metadata.version : static_cast&lt;uint64_t&gt;(IDBDatabaseMetadata::DefaultIntVersion);
-}
-
-PassRefPtr&lt;IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp; name, const Dictionary&amp; options, ExceptionCode&amp; ec)
-{
-    IDBKeyPath keyPath;
-    bool autoIncrement = false;
-    if (!options.isUndefinedOrNull()) {
-        String keyPathString;
-        Vector&lt;String&gt; keyPathArray;
-        if (options.get(&quot;keyPath&quot;, keyPathArray))
-            keyPath = IDBKeyPath(keyPathArray);
-        else if (options.getWithUndefinedOrNullCheck(&quot;keyPath&quot;, keyPathString))
-            keyPath = IDBKeyPath(keyPathString);
-
-        options.get(&quot;autoIncrement&quot;, autoIncrement);
-    }
-
-    return createObjectStore(name, keyPath, autoIncrement, ec);
-}
-
-PassRefPtr&lt;IDBObjectStore&gt; IDBDatabase::createObjectStore(const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBDatabase::createObjectStore&quot;);
-    if (!m_versionChangeTransaction) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_versionChangeTransaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-
-    if (containsObjectStore(name)) {
-        ec = IDBDatabaseException::ConstraintError;
-        return 0;
-    }
-
-    if (!keyPath.isNull() &amp;&amp; !keyPath.isValid()) {
-        ec = IDBDatabaseException::SyntaxError;
-        return 0;
-    }
-
-    if (autoIncrement &amp;&amp; ((keyPath.type() == IDBKeyPath::StringType &amp;&amp; keyPath.string().isEmpty()) || keyPath.type() == IDBKeyPath::ArrayType)) {
-        ec = IDBDatabaseException::InvalidAccessError;
-        return 0;
-    }
-
-    int64_t objectStoreId = m_metadata.maxObjectStoreId + 1;
-    m_backend-&gt;createObjectStore(m_versionChangeTransaction-&gt;id(), objectStoreId, name, keyPath, autoIncrement);
-
-    IDBObjectStoreMetadata metadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
-    RefPtr&lt;IDBObjectStore&gt; objectStore = IDBObjectStore::create(metadata, m_versionChangeTransaction.get());
-    m_metadata.objectStores.set(metadata.id, metadata);
-    ++m_metadata.maxObjectStoreId;
-
-    m_versionChangeTransaction-&gt;objectStoreCreated(name, objectStore);
-    return objectStore.release();
-}
-
-void IDBDatabase::deleteObjectStore(const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBDatabase::deleteObjectStore&quot;);
-    if (!m_versionChangeTransaction) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-    if (!m_versionChangeTransaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return;
-    }
-
-    int64_t objectStoreId = findObjectStoreId(name);
-    if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
-        ec = IDBDatabaseException::NotFoundError;
-        return;
-    }
-
-    m_backend-&gt;deleteObjectStore(m_versionChangeTransaction-&gt;id(), objectStoreId);
-    m_versionChangeTransaction-&gt;objectStoreDeleted(name);
-    m_metadata.objectStores.remove(objectStoreId);
-}
-
-PassRefPtr&lt;IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext* context, const Vector&lt;String&gt;&amp; scope, const String&amp; modeString, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBDatabase::transaction&quot;);
-    if (!scope.size()) {
-        ec = IDBDatabaseException::InvalidAccessError;
-        return 0;
-    }
-
-    IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec);
-    if (ec)
-        return 0;
-
-    if (m_versionChangeTransaction || m_closePending) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-
-    Vector&lt;int64_t&gt; objectStoreIds;
-    for (auto&amp; name : scope) {
-        int64_t objectStoreId = findObjectStoreId(name);
-        if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
-            ec = IDBDatabaseException::NotFoundError;
-            return 0;
-        }
-        objectStoreIds.append(objectStoreId);
-    }
-
-    int64_t transactionId = nextTransactionId();
-    m_backend-&gt;createTransaction(transactionId, m_databaseCallbacks, objectStoreIds, mode);
-
-    RefPtr&lt;IDBTransaction&gt; transaction = IDBTransaction::create(context, transactionId, scope, mode, this);
-    return transaction.release();
-}
-
-PassRefPtr&lt;IDBTransaction&gt; IDBDatabase::transaction(ScriptExecutionContext* context, const String&amp; storeName, const String&amp; mode, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;DOMStringList&gt; storeNames = DOMStringList::create();
-    storeNames-&gt;append(storeName);
-    return transaction(context, storeNames, mode, ec);
-}
-
-void IDBDatabase::forceClose()
-{
-    for (auto&amp; transaction : m_transactions.values())
-        transaction-&gt;abort(IGNORE_EXCEPTION);
-    this-&gt;close();
-}
-
-void IDBDatabase::close()
-{
-    LOG(StorageAPI, &quot;IDBDatabase::close&quot;);
-    if (m_closePending)
-        return;
-
-    m_closePending = true;
-
-    if (m_transactions.isEmpty())
-        closeConnection();
-}
-
-void IDBDatabase::closeConnection()
-{
-    ASSERT(m_closePending);
-    ASSERT(m_transactions.isEmpty());
-
-    // Closing may result in deallocating the last transaction, which could result in deleting
-    // this IDBDatabase. We need the deallocation to happen after we are through.
-    Ref&lt;IDBDatabase&gt; protect(*this);
-
-    m_backend-&gt;close(m_databaseCallbacks);
-
-    if (m_contextStopped || !scriptExecutionContext())
-        return;
-
-    EventQueue&amp; eventQueue = scriptExecutionContext()-&gt;eventQueue();
-    // Remove any pending versionchange events scheduled to fire on this
-    // connection. They would have been scheduled by the backend when another
-    // connection called setVersion, but the frontend connection is being
-    // closed before they could fire.
-    for (auto&amp; event : m_enqueuedEvents) {
-        bool removed = eventQueue.cancelEvent(*event);
-        ASSERT_UNUSED(removed, removed);
-    }
-
-    m_isClosed = true;
-}
-
-void IDBDatabase::onVersionChange(uint64_t oldVersion, uint64_t newVersion)
-{
-    LOG(StorageAPI, &quot;IDBDatabase::onVersionChange&quot;);
-    if (m_contextStopped || !scriptExecutionContext())
-        return;
-
-    if (m_closePending)
-        return;
-
-    ASSERT(newVersion != IDBDatabaseMetadata::NoIntVersion);
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, newVersion, eventNames().versionchangeEvent));
-}
-
-void IDBDatabase::enqueueEvent(PassRefPtr&lt;Event&gt; event)
-{
-    ASSERT(!m_contextStopped);
-    ASSERT(!m_isClosed);
-    ASSERT(scriptExecutionContext());
-    event-&gt;setTarget(this);
-    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event.get());
-    m_enqueuedEvents.append(event);
-}
-
-bool IDBDatabase::dispatchEvent(PassRefPtr&lt;Event&gt; event)
-{
-    LOG(StorageAPI, &quot;IDBDatabase::dispatchEvent&quot;);
-    ASSERT(event-&gt;type() == eventNames().versionchangeEvent);
-    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
-        if (m_enqueuedEvents[i].get() == event.get())
-            m_enqueuedEvents.remove(i);
-    }
-    return EventTarget::dispatchEvent(event.get());
-}
-
-int64_t IDBDatabase::findObjectStoreId(const String&amp; name) const
-{
-    for (auto&amp; objectStore : m_metadata.objectStores) {
-        if (objectStore.value.name == name) {
-            ASSERT(objectStore.key != IDBObjectStoreMetadata::InvalidId);
-            return objectStore.key;
-        }
-    }
-    return IDBObjectStoreMetadata::InvalidId;
-}
-
-bool IDBDatabase::hasPendingActivity() const
-{
-    // The script wrapper must not be collected before the object is closed or
-    // we can't fire a &quot;versionchange&quot; event to let script manually close the connection.
-    return !m_closePending &amp;&amp; hasEventListeners() &amp;&amp; !m_contextStopped;
-}
-
-void IDBDatabase::stop()
-{
-    // Stop fires at a deterministic time, so we need to call close in it.
-    close();
-
-    m_contextStopped = true;
-}
-
-const char* IDBDatabase::activeDOMObjectName() const
-{
-    return &quot;IDBDatabase&quot;;
-}
-
-bool IDBDatabase::canSuspendForPageCache() const
-{
-    return m_isClosed;
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBDatabase_h
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;Dictionary.h&quot;
</span><span class="cx"> #include &quot;Event.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><del>-#include &quot;IDBDatabaseCallbacks.h&quot;
</del><span class="cx"> #include &quot;IDBDatabaseMetadata.h&quot;
</span><span class="cx"> #include &quot;IDBObjectStore.h&quot;
</span><span class="cx"> #include &quot;IDBTransaction.h&quot;
</span><span class="lines">@@ -49,90 +48,29 @@
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-class IDBDatabase final : public RefCounted&lt;IDBDatabase&gt;, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
</del><ins>+class IDBDatabase : public RefCounted&lt;IDBDatabase&gt;, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBDatabase&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseBackend&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
-    ~IDBDatabase();
</del><ins>+    virtual ~IDBDatabase() { }
</ins><span class="cx"> 
</span><del>-    void setMetadata(const IDBDatabaseMetadata&amp; metadata) { m_metadata = metadata; }
-    void transactionCreated(IDBTransaction*);
-    void transactionFinished(IDBTransaction*);
-
</del><span class="cx">     // Implement the IDL
</span><del>-    const String name() const { return m_metadata.name; }
-    uint64_t version() const;
-    PassRefPtr&lt;DOMStringList&gt; objectStoreNames() const;
</del><ins>+    virtual const String name() const = 0;
+    virtual uint64_t version() const = 0;
+    virtual PassRefPtr&lt;DOMStringList&gt; objectStoreNames() const = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext* context, PassRefPtr&lt;DOMStringList&gt; scope, const String&amp; mode, ExceptionCode&amp; ec) { return transaction(context, *scope, mode, ec); }
-    PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCode&amp;);
-    void deleteObjectStore(const String&amp; name, ExceptionCode&amp;);
-    void close();
</del><ins>+    virtual PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCode&amp;) = 0;
+    virtual void deleteObjectStore(const String&amp; name, ExceptionCode&amp;) = 0;
+    virtual void close() = 0;
</ins><span class="cx"> 
</span><del>-    // IDBDatabaseCallbacks
-    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion);
-    virtual void onAbort(int64_t, PassRefPtr&lt;IDBDatabaseError&gt;);
-    virtual void onComplete(int64_t);
</del><ins>+    virtual const IDBDatabaseMetadata metadata() const = 0;
</ins><span class="cx"> 
</span><del>-    // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override final { return IDBDatabaseEventTargetInterfaceType; }
-    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
-
-    bool isClosePending() const { return m_closePending; }
-    void forceClose();
-    const IDBDatabaseMetadata metadata() const { return m_metadata; }
-    void enqueueEvent(PassRefPtr&lt;Event&gt;);
-
-    using EventTarget::dispatchEvent;
-    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
-
-    int64_t findObjectStoreId(const String&amp; name) const;
-    bool containsObjectStore(const String&amp; name) const
-    {
-        return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId;
-    }
-
-    IDBDatabaseBackend* backend() const { return m_backend.get(); }
-
-    static int64_t nextTransactionId();
-
</del><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>-    // ActiveDOMObject API.
-    bool hasPendingActivity() const override;
-
-private:
-    IDBDatabase(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseBackend&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
-
-    // ActiveDOMObject API.
-    void stop() override;
-    const char* activeDOMObjectName() const override;
-    bool canSuspendForPageCache() const override;
-
-    // EventTarget
-    virtual void refEventTarget() override final { ref(); }
-    virtual void derefEventTarget() override final { deref(); }
-
-    void closeConnection();
-
-    IDBDatabaseMetadata m_metadata;
-    RefPtr&lt;IDBDatabaseBackend&gt; m_backend;
-    RefPtr&lt;IDBTransaction&gt; m_versionChangeTransaction;
-    typedef HashMap&lt;int64_t, IDBTransaction*&gt; TransactionMap;
-    TransactionMap m_transactions;
-
-    bool m_closePending;
-    bool m_isClosed;
-    bool m_contextStopped;
-
-    // Keep track of the versionchange events waiting to be fired on this
-    // database so that we can cancel them if the database closes.
-    Vector&lt;RefPtr&lt;Event&gt;&gt; m_enqueuedEvents;
-
-    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
</del><ins>+protected:
+    IDBDatabase(ScriptExecutionContext*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">     JSGenerateToJSObject,
</span><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBDatabase : EventTarget {
</span><span class="cx">     readonly attribute DOMString name;
</span><span class="cx">     readonly attribute unsigned long long version;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,622 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBDatabaseBackend.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBFactoryBackendInterface.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBRecordIdentifier.h&quot;
-#include &quot;IDBServerConnection.h&quot;
-#include &quot;IDBTransactionBackend.h&quot;
-#include &quot;IDBTransactionCoordinator.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;SharedBuffer.h&quot;
-#include &lt;wtf/TemporaryChange.h&gt;
-
-namespace WebCore {
-
-Ref&lt;IDBDatabaseBackend&gt; IDBDatabaseBackend::create(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface* factory, IDBServerConnection&amp; serverConnection)
-{
-    Ref&lt;IDBDatabaseBackend&gt; backend = adoptRef(*new IDBDatabaseBackend(name, uniqueIdentifier, factory, serverConnection));
-    backend-&gt;openInternalAsync();
-    
-    return backend;
-}
-
-IDBDatabaseBackend::IDBDatabaseBackend(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface* factory, IDBServerConnection&amp; serverConnection)
-    : m_metadata(name, InvalidId, 0, InvalidId)
-    , m_identifier(uniqueIdentifier)
-    , m_factory(factory)
-    , m_serverConnection(serverConnection)
-    , m_transactionCoordinator(std::make_unique&lt;IDBTransactionCoordinator&gt;())
-    , m_closingConnection(false)
-    , m_didOpenInternal(false)
-{
-    ASSERT(!m_metadata.name.isNull());
-}
-
-void IDBDatabaseBackend::addObjectStore(const IDBObjectStoreMetadata&amp; objectStore, int64_t newMaxObjectStoreId)
-{
-    ASSERT(!m_metadata.objectStores.contains(objectStore.id));
-    if (newMaxObjectStoreId != IDBObjectStoreMetadata::InvalidId) {
-        ASSERT(m_metadata.maxObjectStoreId &lt; newMaxObjectStoreId);
-        m_metadata.maxObjectStoreId = newMaxObjectStoreId;
-    }
-    m_metadata.objectStores.set(objectStore.id, objectStore);
-}
-
-void IDBDatabaseBackend::removeObjectStore(int64_t objectStoreId)
-{
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    m_metadata.objectStores.remove(objectStoreId);
-}
-
-void IDBDatabaseBackend::addIndex(int64_t objectStoreId, const IDBIndexMetadata&amp; index, int64_t newMaxIndexId)
-{
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
-
-    ASSERT(!objectStore.indexes.contains(index.id));
-    objectStore.indexes.set(index.id, index);
-    if (newMaxIndexId != IDBIndexMetadata::InvalidId) {
-        ASSERT(objectStore.maxIndexId &lt; newMaxIndexId);
-        objectStore.maxIndexId = newMaxIndexId;
-    }
-    m_metadata.objectStores.set(objectStoreId, objectStore);
-}
-
-void IDBDatabaseBackend::removeIndex(int64_t objectStoreId, int64_t indexId)
-{
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
-
-    ASSERT(objectStore.indexes.contains(indexId));
-    objectStore.indexes.remove(indexId);
-    m_metadata.objectStores.set(objectStoreId, objectStore);
-}
-
-void IDBDatabaseBackend::openInternalAsync()
-{
-    RefPtr&lt;IDBDatabaseBackend&gt; self = this;
-    m_serverConnection-&gt;getOrEstablishIDBDatabaseMetadata([self](const IDBDatabaseMetadata&amp; metadata, bool success) {
-        self-&gt;didOpenInternalAsync(metadata, success);
-    });
-}
-
-void IDBDatabaseBackend::didOpenInternalAsync(const IDBDatabaseMetadata&amp; metadata, bool success)
-{
-    m_didOpenInternal = true;
-
-    if (!success) {
-        processPendingOpenCalls(false);
-        return;
-    }
-
-    m_metadata = metadata;
-
-    processPendingCalls();
-}
-
-IDBDatabaseBackend::~IDBDatabaseBackend()
-{
-    m_factory-&gt;removeIDBDatabaseBackend(m_identifier);
-}
-
-void IDBDatabaseBackend::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::createObjectStore&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
-
-    ASSERT(!m_metadata.objectStores.contains(objectStoreId));
-    IDBObjectStoreMetadata objectStoreMetadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
-
-    transaction-&gt;scheduleCreateObjectStoreOperation(objectStoreMetadata);
-    addObjectStore(objectStoreMetadata, objectStoreId);
-}
-
-void IDBDatabaseBackend::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteObjectStore&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
-
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    const IDBObjectStoreMetadata&amp; objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
-
-    transaction-&gt;scheduleDeleteObjectStoreOperation(objectStoreMetadata);
-    removeObjectStore(objectStoreId);
-}
-
-void IDBDatabaseBackend::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::createIndex&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
-
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
-
-    ASSERT(!objectStore.indexes.contains(indexId));
-    const IDBIndexMetadata indexMetadata(name, indexId, keyPath, unique, multiEntry);
-
-    transaction-&gt;scheduleCreateIndexOperation(objectStoreId, indexMetadata);
-
-    addIndex(objectStoreId, indexMetadata, indexId);
-}
-
-void IDBDatabaseBackend::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteIndex&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
-
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
-
-    ASSERT(objectStore.indexes.contains(indexId));
-    const IDBIndexMetadata&amp; indexMetadata = objectStore.indexes.get(indexId);
-
-    transaction-&gt;scheduleDeleteIndexOperation(objectStoreId, indexMetadata);
-
-    removeIndex(objectStoreId, indexId);
-}
-
-void IDBDatabaseBackend::commit(int64_t transactionId)
-{
-    // The frontend suggests that we commit, but we may have previously initiated an abort, and so have disposed of the transaction. onAbort has already been dispatched to the frontend, so it will find out about that asynchronously.
-    if (m_transactions.contains(transactionId))
-        m_transactions.get(transactionId)-&gt;commit();
-}
-
-void IDBDatabaseBackend::abort(int64_t transactionId)
-{
-    // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
-    if (m_transactions.contains(transactionId))
-        m_transactions.get(transactionId)-&gt;abort();
-}
-
-void IDBDatabaseBackend::abort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
-{
-    // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
-    if (m_transactions.contains(transactionId))
-        m_transactions.get(transactionId)-&gt;abort(error);
-}
-
-void IDBDatabaseBackend::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, bool keyOnly, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::get&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-
-    transaction-&gt;scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, callbacks);
-}
-
-void IDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::put&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
-
-    const IDBObjectStoreMetadata objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
-
-    ASSERT(objectStoreMetadata.autoIncrement || key.get());
-
-    transaction-&gt;schedulePutOperation(objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys);
-}
-
-void IDBDatabaseBackend::setIndexKeys(int64_t transactionID, int64_t objectStoreID, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const Vector&lt;int64_t, 1&gt;&amp; indexIDs, const Vector&lt;IndexKeys, 1&gt;&amp; indexKeys)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::setIndexKeys&quot;);
-    ASSERT(prpPrimaryKey);
-    ASSERT(m_metadata.objectStores.contains(objectStoreID));
-
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionID);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
-
-    RefPtr&lt;IDBKey&gt; primaryKey = prpPrimaryKey;
-    m_serverConnection-&gt;setIndexKeys(transactionID, m_metadata.id, objectStoreID, m_metadata.objectStores.get(objectStoreID), *primaryKey, indexIDs, indexKeys, [transaction](PassRefPtr&lt;IDBDatabaseError&gt; error) {
-        if (error)
-            transaction-&gt;abort(error);
-    });
-}
-
-void IDBDatabaseBackend::setIndexesReady(int64_t transactionId, int64_t, const Vector&lt;int64_t, 1&gt;&amp; indexIds)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::setIndexesReady&quot;);
-
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-
-    transaction-&gt;scheduleSetIndexesReadyOperation(indexIds.size());
-}
-
-void IDBDatabaseBackend::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::openCursor&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-
-    transaction-&gt;scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, taskType, callbacks);
-}
-
-void IDBDatabaseBackend::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::count&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-
-    ASSERT(m_metadata.objectStores.contains(objectStoreId));
-    transaction-&gt;scheduleCountOperation(objectStoreId, indexId, keyRange, callbacks);
-}
-
-
-void IDBDatabaseBackend::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteRange&quot;);
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
-
-    transaction-&gt;scheduleDeleteRangeOperation(objectStoreId, keyRange, callbacks);
-}
-
-void IDBDatabaseBackend::clearObjectStore(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    LOG(StorageAPI, &quot;IDBDatabaseBackend::clearObjectStore %lli in transaction %lli&quot;, static_cast&lt;long long&gt;(objectStoreId), static_cast&lt;long long&gt;(transactionId));
-    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
-    if (!transaction)
-        return;
-    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
-
-    transaction-&gt;scheduleClearObjectStoreOperation(objectStoreId, callbacks);
-}
-
-void IDBDatabaseBackend::transactionStarted(IDBTransactionBackend* transaction)
-{
-    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
-        ASSERT(!m_runningVersionChangeTransaction);
-        m_runningVersionChangeTransaction = transaction;
-    }
-}
-
-void IDBDatabaseBackend::transactionFinished(IDBTransactionBackend* rawTransaction)
-{
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
-    ASSERT(m_transactions.contains(transaction-&gt;id()));
-    ASSERT(m_transactions.get(transaction-&gt;id()) == transaction.get());
-    m_transactions.remove(transaction-&gt;id());
-    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
-        ASSERT(transaction.get() == m_runningVersionChangeTransaction.get());
-        m_runningVersionChangeTransaction = nullptr;
-    }
-}
-
-void IDBDatabaseBackend::transactionFinishedAndAbortFired(IDBTransactionBackend* rawTransaction)
-{
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
-    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
-        // If this was an open-with-version call, there will be a &quot;second
-        // half&quot; open call waiting for us in processPendingCalls.
-        // FIXME: When we no longer support setVersion, assert such a thing.
-        if (m_pendingSecondHalfOpen) {
-            m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;Version change transaction was aborted in upgradeneeded event handler.&quot;));
-            m_pendingSecondHalfOpen = nullptr;
-        }
-        processPendingCalls();
-    }
-}
-
-void IDBDatabaseBackend::transactionFinishedAndCompleteFired(IDBTransactionBackend* rawTransaction)
-{
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
-    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange)
-        processPendingCalls();
-}
-
-size_t IDBDatabaseBackend::connectionCount()
-{
-    // This does not include pending open calls, as those should not block version changes and deletes.
-    return m_databaseCallbacksSet.size();
-}
-
-void IDBDatabaseBackend::processPendingCalls()
-{
-    // processPendingCalls() will be called again after openInternalAsync() completes.
-    if (!m_didOpenInternal)
-        return;
-
-    if (m_pendingSecondHalfOpen) {
-        ASSERT(m_pendingSecondHalfOpen-&gt;version() == m_metadata.version);
-        ASSERT(m_metadata.id != InvalidId);
-        m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onSuccess(this, this-&gt;metadata());
-        m_pendingSecondHalfOpen = nullptr;
-        // Fall through when complete, as pending deletes may be (partially) unblocked.
-    }
-
-    // Note that this check is only an optimization to reduce queue-churn and
-    // not necessary for correctness; deleteDatabase and openConnection will
-    // requeue their calls if this condition is true.
-    if (m_runningVersionChangeTransaction)
-        return;
-
-    if (!m_pendingDeleteCalls.isEmpty() &amp;&amp; isDeleteDatabaseBlocked())
-        return;
-    while (!m_pendingDeleteCalls.isEmpty()) {
-        std::unique_ptr&lt;IDBPendingDeleteCall&gt; pendingDeleteCall = m_pendingDeleteCalls.takeFirst();
-        m_deleteCallbacksWaitingCompletion.add(pendingDeleteCall-&gt;callbacks());
-        deleteDatabaseAsync(pendingDeleteCall-&gt;callbacks());
-    }
-
-    // deleteDatabaseAsync should never re-queue calls.
-    ASSERT(m_pendingDeleteCalls.isEmpty());
-
-    // If there are any database deletions waiting for completion, we're done for now.
-    // Further callbacks will be handled in a future call to processPendingCalls().
-    if (!m_deleteCallbacksWaitingCompletion.isEmpty())
-        return;
-
-    if (m_runningVersionChangeTransaction)
-        return;
-
-    processPendingOpenCalls(true);
-}
-
-void IDBDatabaseBackend::processPendingOpenCalls(bool success)
-{
-    // Open calls can be requeued if an open call started a version change transaction or deletes the database.
-    Deque&lt;std::unique_ptr&lt;IDBPendingOpenCall&gt;&gt; pendingOpenCalls;
-    m_pendingOpenCalls.swap(pendingOpenCalls);
-
-    while (!pendingOpenCalls.isEmpty()) {
-        std::unique_ptr&lt;IDBPendingOpenCall&gt; pendingOpenCall = pendingOpenCalls.takeFirst();
-        if (success) {
-            if (m_metadata.id == InvalidId) {
-                // This database was deleted then quickly re-opened.
-                // openInternalAsync() will recreate it in the backing store and then resume processing pending callbacks.
-                pendingOpenCalls.prepend(WTF::move(pendingOpenCall));
-                pendingOpenCalls.swap(m_pendingOpenCalls);
-
-                openInternalAsync();
-                return;
-            }
-            openConnectionInternal(pendingOpenCall-&gt;callbacks(), pendingOpenCall-&gt;databaseCallbacks(), pendingOpenCall-&gt;transactionId(), pendingOpenCall-&gt;version());
-        } else {
-            String message;
-            if (pendingOpenCall-&gt;version() == IDBDatabaseMetadata::NoIntVersion)
-                message = &quot;Internal error opening database with no version specified.&quot;;
-            else
-                message = String::format(&quot;Internal error opening database with version %llu&quot;, static_cast&lt;unsigned long long&gt;(pendingOpenCall-&gt;version()));
-            pendingOpenCall-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, message));
-        }
-    }
-}
-
-void IDBDatabaseBackend::createTransaction(int64_t transactionID, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, IndexedDB::TransactionMode mode)
-{
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = IDBTransactionBackend::create(this, transactionID, callbacks, objectStoreIDs, mode);
-
-    ASSERT(!m_transactions.contains(transactionID));
-    m_transactions.add(transactionID, transaction.get());
-}
-
-void IDBDatabaseBackend::openConnection(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
-{
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
-
-    m_pendingOpenCalls.append(std::make_unique&lt;IDBPendingOpenCall&gt;(*callbacks, *databaseCallbacks, transactionId, version));
-
-    processPendingCalls();
-}
-
-void IDBDatabaseBackend::openConnectionInternal(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
-{
-    ASSERT(m_pendingDeleteCalls.isEmpty());
-    ASSERT(!m_runningVersionChangeTransaction);
-
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
-
-    // We infer that the database didn't exist from its lack of version.
-    bool isNewDatabase = m_metadata.version == IDBDatabaseMetadata::NoIntVersion;
-
-    if (version == IDBDatabaseMetadata::DefaultIntVersion &amp;&amp; !isNewDatabase) {
-        m_databaseCallbacksSet.add(databaseCallbacks);
-        callbacks-&gt;onSuccess(this, this-&gt;metadata());
-        return;
-    }
-
-    if (isNewDatabase &amp;&amp; version == IDBDatabaseMetadata::DefaultIntVersion) {
-        // Spec says: If no version is specified and no database exists, set database version to 1.
-        version = 1;
-    }
-
-    if (version &gt; m_metadata.version || m_metadata.version == IDBDatabaseMetadata::NoIntVersion) {
-        runIntVersionChangeTransaction(callbacks, databaseCallbacks, transactionId, version);
-        return;
-    }
-
-    if (version &lt; m_metadata.version &amp;&amp; m_metadata.version != IDBDatabaseMetadata::NoIntVersion) {
-        callbacks-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::VersionError, String::format(&quot;The requested version (%llu) is less than the existing version (%llu).&quot;, static_cast&lt;unsigned long long&gt;(version), static_cast&lt;unsigned long long&gt;(m_metadata.version))));
-        return;
-    }
-
-    ASSERT(version == m_metadata.version);
-    m_databaseCallbacksSet.add(databaseCallbacks);
-    callbacks-&gt;onSuccess(this, this-&gt;metadata());
-}
-
-void IDBDatabaseBackend::runIntVersionChangeTransaction(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
-{
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
-    ASSERT(callbacks);
-    for (auto&amp; callback : m_databaseCallbacksSet) {
-        // Front end ensures the event is not fired at connections that have closePending set.
-        if (callback != databaseCallbacks)
-            callback-&gt;onVersionChange(m_metadata.version, requestedVersion);
-    }
-    // The spec dictates we wait until all the version change events are
-    // delivered and then check m_databaseCallbacks.empty() before proceeding
-    // or firing a blocked event, but instead we should be consistent with how
-    // the old setVersion (incorrectly) did it.
-    // FIXME: Remove the call to onBlocked and instead wait until the frontend
-    // tells us that all the blocked events have been delivered. See
-    // https://bugs.webkit.org/show_bug.cgi?id=71130
-    if (connectionCount())
-        callbacks-&gt;onBlocked(m_metadata.version);
-    // FIXME: Add test for m_runningVersionChangeTransaction.
-    if (m_runningVersionChangeTransaction || connectionCount()) {
-        m_pendingOpenCalls.append(std::make_unique&lt;IDBPendingOpenCall&gt;(*callbacks, *databaseCallbacks, transactionId, requestedVersion));
-        return;
-    }
-
-    Vector&lt;int64_t&gt; objectStoreIds;
-    createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionMode::VersionChange);
-    RefPtr&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionId);
-
-    transaction-&gt;scheduleVersionChangeOperation(requestedVersion, callbacks, databaseCallbacks, m_metadata);
-
-    ASSERT(!m_pendingSecondHalfOpen);
-    m_databaseCallbacksSet.add(databaseCallbacks);
-}
-
-void IDBDatabaseBackend::deleteDatabase(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks)
-{
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    if (isDeleteDatabaseBlocked()) {
-        for (auto&amp; callback : m_databaseCallbacksSet) {
-            // Front end ensures the event is not fired at connections that have closePending set.
-            callback-&gt;onVersionChange(m_metadata.version, 0);
-        }
-        // FIXME: Only fire onBlocked if there are open connections after the
-        // VersionChangeEvents are received, not just set up to fire.
-        // https://bugs.webkit.org/show_bug.cgi?id=71130
-        callbacks-&gt;onBlocked(m_metadata.version);
-        m_pendingDeleteCalls.append(std::make_unique&lt;IDBPendingDeleteCall&gt;(callbacks.release()));
-        return;
-    }
-    deleteDatabaseAsync(callbacks.release());
-}
-
-bool IDBDatabaseBackend::isDeleteDatabaseBlocked()
-{
-    return connectionCount();
-}
-
-void IDBDatabaseBackend::deleteDatabaseAsync(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks)
-{
-    ASSERT(!isDeleteDatabaseBlocked());
-
-    RefPtr&lt;IDBDatabaseBackend&gt; self(this);
-    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
-    m_serverConnection-&gt;deleteDatabase(m_metadata.name, [self, callbacks](bool success) {
-        self-&gt;m_deleteCallbacksWaitingCompletion.remove(callbacks);
-
-        // If this IDBDatabaseBackend was closed while waiting for deleteDatabase to complete, no point in performing any callbacks.
-        if (!self-&gt;m_serverConnection-&gt;isClosed())
-            return;
-
-        if (success) {
-            self-&gt;m_metadata.id = InvalidId;
-            self-&gt;m_metadata.version = IDBDatabaseMetadata::NoIntVersion;
-            self-&gt;m_metadata.objectStores.clear();
-            callbacks-&gt;onSuccess();
-        } else
-            callbacks-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error deleting database.&quot;));
-
-        self-&gt;processPendingCalls();
-    });
-}
-
-void IDBDatabaseBackend::close(PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpCallbacks)
-{
-    RefPtr&lt;IDBDatabaseCallbacks&gt; callbacks = prpCallbacks;
-    ASSERT(m_databaseCallbacksSet.contains(callbacks));
-
-    m_databaseCallbacksSet.remove(callbacks);
-    if (m_pendingSecondHalfOpen &amp;&amp; m_pendingSecondHalfOpen-&gt;databaseCallbacks() == callbacks) {
-        m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;The connection was closed.&quot;));
-        m_pendingSecondHalfOpen = nullptr;
-    }
-
-    if (connectionCount() &gt; 1)
-        return;
-
-    // processPendingCalls allows the inspector to process a pending open call
-    // and call close, reentering IDBDatabaseBackend::close. Then the
-    // backend would be removed both by the inspector closing its connection, and
-    // by the connection that first called close.
-    // To avoid that situation, don't proceed in case of reentrancy.
-    if (m_closingConnection)
-        return;
-    TemporaryChange&lt;bool&gt; closingConnection(m_closingConnection, true);
-    processPendingCalls();
-
-    // FIXME: Add a test for the m_pendingOpenCalls cases below.
-    if (!connectionCount() &amp;&amp; !m_pendingOpenCalls.size() &amp;&amp; !m_pendingDeleteCalls.size()) {
-        TransactionMap transactions(m_transactions);
-        RefPtr&lt;IDBDatabaseError&gt; error = IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Connection is closing.&quot;);
-        for (auto&amp; transaction : transactions.values())
-            transaction-&gt;abort(error);
-
-        ASSERT(m_transactions.isEmpty());
-
-        m_serverConnection-&gt;close();
-
-        // This check should only be false in unit tests.
-        ASSERT(m_factory);
-        if (m_factory)
-            m_factory-&gt;removeIDBDatabaseBackend(m_identifier);
-    }
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,175 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseBackend_h
-#define IDBDatabaseBackend_h
-
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBDatabaseMetadata.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBPendingDeleteCall.h&quot;
-#include &quot;IDBPendingOpenCall.h&quot;
-
-#include &lt;stdint.h&gt;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/ListHashSet.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBDatabase;
-class IDBFactoryBackendInterface;
-class IDBKey;
-class IDBKeyPath;
-class IDBServerConnection;
-class IDBTransactionBackend;
-class IDBTransactionCoordinator;
-class SharedBuffer;
-
-struct IDBDatabaseMetadata;
-struct IDBIndexMetadata;
-struct IDBObjectStoreMetadata;
-
-typedef Vector&lt;RefPtr&lt;IDBKey&gt;&gt; IndexKeys;
-typedef int ExceptionCode;
-
-class IDBDatabaseBackend : public RefCounted&lt;IDBDatabaseBackend&gt; {
-public:
-    WEBCORE_EXPORT static Ref&lt;IDBDatabaseBackend&gt; create(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface*, IDBServerConnection&amp;);
-    WEBCORE_EXPORT ~IDBDatabaseBackend();
-
-    IDBServerConnection&amp; serverConnection() { return m_serverConnection.get(); }
-
-    static const int64_t InvalidId = 0;
-    int64_t id() const { return m_metadata.id; }
-    void addObjectStore(const IDBObjectStoreMetadata&amp;, int64_t newMaxObjectStoreId);
-    void removeObjectStore(int64_t objectStoreId);
-    void addIndex(int64_t objectStoreId, const IDBIndexMetadata&amp;, int64_t newMaxIndexId);
-    void removeIndex(int64_t objectStoreId, int64_t indexId);
-
-    WEBCORE_EXPORT void openConnection(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version);
-    WEBCORE_EXPORT void deleteDatabase(PassRefPtr&lt;IDBCallbacks&gt;);
-
-    // IDBDatabaseBackend
-    void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement);
-    void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
-    void createTransaction(int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
-    void close(PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
-
-    void commit(int64_t transactionId);
-    void abort(int64_t transactionId);
-    void abort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;);
-
-    void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry);
-    void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId);
-
-    IDBTransactionCoordinator* transactionCoordinator() const { return m_transactionCoordinator.get(); }
-    void transactionStarted(IDBTransactionBackend*);
-    void transactionFinished(IDBTransactionBackend*);
-    void transactionFinishedAndCompleteFired(IDBTransactionBackend*);
-    void transactionFinishedAndAbortFired(IDBTransactionBackend*);
-
-    enum TaskType {
-        NormalTask = 0,
-        PreemptiveTask
-    };
-
-    enum PutMode {
-        AddOrUpdate,
-        AddOnly,
-        CursorUpdate
-    };
-
-    static const int64_t MinimumIndexId = 30;
-
-    void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, bool keyOnly, PassRefPtr&lt;IDBCallbacks&gt;);
-    void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt;, PutMode, PassRefPtr&lt;IDBCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp;);
-    void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const Vector&lt;int64_t, 1&gt;&amp; indexIds, const Vector&lt;IndexKeys, 1&gt;&amp;);
-    void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector&lt;int64_t, 1&gt;&amp; indexIds);
-    void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr&lt;IDBCallbacks&gt;);
-    void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
-    void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
-    void clearObjectStore(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt;);
-
-    const IDBDatabaseMetadata&amp; metadata() const { return m_metadata; }
-    void setCurrentVersion(uint64_t version) { m_metadata.version = version; }
-
-    bool hasPendingSecondHalfOpen() { return m_pendingSecondHalfOpen.get(); }
-    void setPendingSecondHalfOpen(std::unique_ptr&lt;IDBPendingOpenCall&gt; pendingOpenCall) { m_pendingSecondHalfOpen = WTF::move(pendingOpenCall); }
-
-    IDBFactoryBackendInterface&amp; factoryBackend() { return *m_factory; }
-
-    class VersionChangeOperation;
-    class VersionChangeAbortOperation;
-
-private:
-    IDBDatabaseBackend(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface*, IDBServerConnection&amp;);
-
-    void openConnectionInternal(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version);
-
-    void openInternalAsync();
-    void didOpenInternalAsync(const IDBDatabaseMetadata&amp;, bool success);
-
-    void runIntVersionChangeTransaction(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, int64_t requestedVersion);
-    size_t connectionCount();
-    void processPendingCalls();
-    void processPendingOpenCalls(bool success);
-
-    bool isDeleteDatabaseBlocked();
-    void deleteDatabaseAsync(PassRefPtr&lt;IDBCallbacks&gt;);
-
-    IDBDatabaseMetadata m_metadata;
-
-    String m_identifier;
-
-    RefPtr&lt;IDBFactoryBackendInterface&gt; m_factory;
-    Ref&lt;IDBServerConnection&gt; m_serverConnection;
-
-    std::unique_ptr&lt;IDBTransactionCoordinator&gt; m_transactionCoordinator;
-    RefPtr&lt;IDBTransactionBackend&gt; m_runningVersionChangeTransaction;
-
-    typedef HashMap&lt;int64_t, IDBTransactionBackend*&gt; TransactionMap;
-    TransactionMap m_transactions;
-
-    Deque&lt;std::unique_ptr&lt;IDBPendingOpenCall&gt;&gt; m_pendingOpenCalls;
-    std::unique_ptr&lt;IDBPendingOpenCall&gt; m_pendingSecondHalfOpen;
-
-    Deque&lt;std::unique_ptr&lt;IDBPendingDeleteCall&gt;&gt; m_pendingDeleteCalls;
-    HashSet&lt;RefPtr&lt;IDBCallbacks&gt;&gt; m_deleteCallbacksWaitingCompletion;
-
-    typedef ListHashSet&lt;RefPtr&lt;IDBDatabaseCallbacks&gt;&gt; DatabaseCallbacksSet;
-    DatabaseCallbacksSet m_databaseCallbacksSet;
-
-    bool m_closingConnection;
-    bool m_didOpenInternal;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
-#endif // IDBDatabaseBackend_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseCallbacks_h
-#define IDBDatabaseCallbacks_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseError.h&quot;
-#include &quot;IndexedDB.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-class IDBDatabase;
-
-class IDBDatabaseCallbacks : public RefCounted&lt;IDBDatabaseCallbacks&gt; {
-public:
-    virtual ~IDBDatabaseCallbacks() { }
-
-    virtual void onForcedClose() = 0;
-    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion) = 0;
-
-    virtual void onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;) = 0;
-    virtual void onComplete(int64_t transactionId) = 0;
-
-    virtual void connect(IDBDatabase*) = 0;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IDBDatabaseCallbacks_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,82 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBDatabaseCallbacksImpl.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabase.h&quot;
-
-namespace WebCore {
-
-Ref&lt;IDBDatabaseCallbacksImpl&gt; IDBDatabaseCallbacksImpl::create()
-{
-    return adoptRef(*new IDBDatabaseCallbacksImpl());
-}
-
-IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl()
-    : m_database(nullptr)
-{
-}
-
-IDBDatabaseCallbacksImpl::~IDBDatabaseCallbacksImpl()
-{
-}
-
-void IDBDatabaseCallbacksImpl::onForcedClose()
-{
-    if (m_database)
-        m_database-&gt;forceClose();
-}
-
-void IDBDatabaseCallbacksImpl::onVersionChange(uint64_t oldVersion, uint64_t newVersion)
-{
-    if (m_database)
-        m_database-&gt;onVersionChange(oldVersion, newVersion);
-}
-
-void IDBDatabaseCallbacksImpl::connect(IDBDatabase* database)
-{
-    ASSERT(!m_database);
-    ASSERT(database);
-    m_database = database;
-}
-
-void IDBDatabaseCallbacksImpl::onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
-{
-    if (m_database)
-        m_database-&gt;onAbort(transactionId, error);
-}
-
-void IDBDatabaseCallbacksImpl::onComplete(int64_t transactionId)
-{
-    if (m_database)
-        m_database-&gt;onComplete(transactionId);
-}
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseCallbacksImpl_h
-#define IDBDatabaseCallbacksImpl_h
-
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBDatabase;
-
-class IDBDatabaseCallbacksImpl final : public IDBDatabaseCallbacks {
-public:
-    static Ref&lt;IDBDatabaseCallbacksImpl&gt; create();
-    virtual ~IDBDatabaseCallbacksImpl() override;
-
-    // IDBDatabaseCallbacks
-    virtual void onForcedClose() override;
-    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion) override;
-
-    virtual void onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;) override;
-    virtual void onComplete(int64_t transactionId) override;
-
-    virtual void connect(IDBDatabase*) override;
-
-private:
-    IDBDatabaseCallbacksImpl();
-
-    // The initial IDBOpenDBRequest or final IDBDatabase maintains a RefPtr to this
-    IDBDatabase* m_database;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IDBDatabaseCallbacksImpl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,29 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -31,137 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;Document.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;Frame.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBDatabaseCallbacksImpl.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBFactoryBackendInterface.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBOpenDBRequest.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;Page.h&quot;
-#include &quot;PageGroup.h&quot;
-#include &quot;SchemeRegistry.h&quot;
-#include &quot;SecurityOrigin.h&quot;
-#include &quot;WorkerGlobalScope.h&quot;
-#include &quot;WorkerLoaderProxy.h&quot;
-#include &quot;WorkerThread.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBFactory::IDBFactory(IDBFactoryBackendInterface* factory)
-    : m_backend(factory)
</del><ins>+IDBFactory::IDBFactory()
</ins><span class="cx"> {
</span><del>-    // We pass a reference to this object before it can be adopted.
-    relaxAdoptionRequirement();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBFactory::~IDBFactory()
-{
-}
-
-static bool isContextValid(ScriptExecutionContext* context)
-{
-    ASSERT(is&lt;Document&gt;(*context) || context-&gt;isWorkerGlobalScope());
-    if (is&lt;Document&gt;(*context)) {
-        Document&amp; document = downcast&lt;Document&gt;(*context);
-        return document.frame() &amp;&amp; document.page() &amp;&amp; (!document.page()-&gt;usesEphemeralSession() || SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document.securityOrigin()-&gt;protocol()));
-    }
-    return true;
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBFactory::getDatabaseNames(ScriptExecutionContext* context, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBFactory::getDatabaseNames&quot;);
-    if (!isContextValid(context))
-        return 0;
-    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
-        ec = SECURITY_ERR;
-        return 0;
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), 0);
-    m_backend-&gt;getDatabaseNames(request, *(context-&gt;securityOrigin()), *(context-&gt;topOrigin()), context);
-    return request;
-}
-
-PassRefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext* context, const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBFactory::open&quot;);
-    return openInternal(context, name, 0, IndexedDB::VersionNullness::Null, ec);
-}
-
-PassRefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext* context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBFactory::open&quot;);
-    if (!version) {
-        ec = TypeError;
-        return 0;
-    }
-    return openInternal(context, name, version, IndexedDB::VersionNullness::NonNull, ec);
-}
-
-PassRefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::openInternal(ScriptExecutionContext* context, const String&amp; name, uint64_t version, IndexedDB::VersionNullness versionNullness, ExceptionCode&amp; ec)
-{
-    ASSERT(version &gt;= 1 || versionNullness == IndexedDB::VersionNullness::Null);
-    if (name.isNull()) {
-        ec = TypeError;
-        return 0;
-    }
-    if (!isContextValid(context))
-        return 0;
-    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
-        ec = SECURITY_ERR;
-        return 0;
-    }
-
-    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = IDBDatabaseCallbacksImpl::create();
-    int64_t transactionId = IDBDatabase::nextTransactionId();
-    RefPtr&lt;IDBOpenDBRequest&gt; request = IDBOpenDBRequest::create(context, databaseCallbacks, transactionId, version, versionNullness);
-    m_backend-&gt;open(name, version, transactionId, request, databaseCallbacks, *(context-&gt;securityOrigin()), *(context-&gt;topOrigin()));
-    return request;
-}
-
-PassRefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBFactory::deleteDatabase&quot;);
-    if (name.isNull()) {
-        ec = TypeError;
-        return 0;
-    }
-    if (!isContextValid(context))
-        return 0;
-    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
-        ec = SECURITY_ERR;
-        return 0;
-    }
-
-    RefPtr&lt;IDBOpenDBRequest&gt; request = IDBOpenDBRequest::create(context, 0, 0, 0, IndexedDB::VersionNullness::Null);
-    m_backend-&gt;deleteDatabase(name, *context-&gt;securityOrigin(), *context-&gt;topOrigin(), request, context);
-    return request;
-}
-
-short IDBFactory::cmp(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; firstValue, const Deprecated::ScriptValue&amp; secondValue, ExceptionCode&amp; ec)
-{
-    DOMRequestState requestState(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 = IDBDatabaseException::DataError;
-        return 0;
-    }
-
-    return static_cast&lt;short&gt;(first-&gt;compare(second.get()));
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,30 +1,28 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><ins>+
</ins><span class="cx"> #ifndef IDBFactory_h
</span><span class="cx"> #define IDBFactory_h
</span><span class="cx"> 
</span><span class="lines">@@ -46,38 +44,27 @@
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-class IDBFactory : public ScriptWrappable, public RefCounted&lt;IDBFactory&gt; {
</del><ins>+class IDBFactory : public RefCounted&lt;IDBFactory&gt; {
</ins><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;IDBFactory&gt; create(IDBFactoryBackendInterface* factory)
-    {
-        // FIXME: While the feature is under development we'll handle a null factory backend here,
-        // returning null, so javascript can't try to use the feature.
-        // Once the feature is fully functional we should remove the null factory backend.
-        return factory ? adoptRef(new IDBFactory(factory)) : nullptr;
-    }
-    ~IDBFactory();
</del><ins>+    virtual ~IDBFactory() { }
</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>-    PassRefPtr&lt;IDBRequest&gt; getDatabaseNames(ScriptExecutionContext*, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; getDatabaseNames(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, unsigned long long version, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, unsigned long long version, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCode&amp;);
</del><ins>+    virtual short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-private:
-    IDBFactory(IDBFactoryBackendInterface*);
-
-    PassRefPtr&lt;IDBOpenDBRequest&gt; openInternal(ScriptExecutionContext*, const String&amp; name, uint64_t version, IndexedDB::VersionNullness, ExceptionCode&amp;);
-
-    RefPtr&lt;IDBFactoryBackendInterface&gt; m_backend;
</del><ins>+protected:
+    IDBFactory();
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#endif // IDBFactory_h
</del><ins>+#endif // LegacyFactory_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><del>-    ImplementationLacksVTable,
</del><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBFactory {
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest deleteDatabase(DOMString name);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryBackendInterfaceh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,73 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBFactoryBackendInterface_h
-#define IDBFactoryBackendInterface_h
-
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IndexedDB.h&quot;
-
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBCallbacks;
-class IDBCursorBackend;
-class IDBDatabase;
-class IDBDatabaseBackend;
-class IDBDatabaseCallbacks;
-class IDBTransactionBackend;
-class SecurityOrigin;
-class ScriptExecutionContext;
-
-typedef int ExceptionCode;
-
-// This class is shared by IDBFactory (async) and IDBFactorySync (sync).
-// This is implemented by IDBFactoryBackendImpl and optionally others (in order to proxy
-// calls across process barriers). All calls to these classes should be non-blocking and
-// trigger work on a background thread if necessary.
-class IDBFactoryBackendInterface : public RefCounted&lt;IDBFactoryBackendInterface&gt; {
-public:
-    virtual ~IDBFactoryBackendInterface() { }
-
-    virtual void getDatabaseNames(PassRefPtr&lt;IDBCallbacks&gt;, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin, ScriptExecutionContext*) = 0;
-    virtual void open(const String&amp; name, uint64_t version, int64_t transactionId, PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin) = 0;
-    virtual void deleteDatabase(const String&amp; name, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin, PassRefPtr&lt;IDBCallbacks&gt;, ScriptExecutionContext*) = 0;
-
-    virtual void removeIDBDatabaseBackend(const String&amp; uniqueIdentifier) = 0;
-
-};
-
-} // namespace WebCore
-
-#endif // IDBFactoryBackendInterface_h
-
-#endif // IDBFactoryBackendInterface_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,183 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyRange.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;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBIndex::IDBIndex(const IDBIndexMetadata&amp; metadata, IDBObjectStore* objectStore, IDBTransaction* transaction)
-    : m_metadata(metadata)
-    , m_objectStore(objectStore)
-    , m_transaction(transaction)
-    , m_deleted(false)
</del><ins>+IDBIndex::IDBIndex()
</ins><span class="cx"> {
</span><del>-    ASSERT(m_objectStore);
-    ASSERT(m_transaction);
-    ASSERT(m_metadata.id != IDBIndexMetadata::InvalidId);
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBIndex::~IDBIndex()
-{
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, const String&amp; directionString, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::openCursor&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
-    if (ec)
-        return 0;
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
-    backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, direction, false, IDBDatabaseBackend::NormalTask, request);
-    return request;
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::openCursor&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return openCursor(context, keyRange.release(), direction, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::count&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;count(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, request);
-    return request;
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::count&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return count(context, keyRange.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, const String&amp; directionString, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::openKeyCursor&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
-    if (ec)
-        return 0;
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyOnly, direction);
-    backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, direction, true, IDBDatabaseBackend::NormalTask, request);
-    return request;
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::openKeyCursor&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return openKeyCursor(context, keyRange.release(), direction, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::get&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return get(context, keyRange.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::get&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (!keyRange) {
-        ec = IDBDatabaseException::DataError;
-        return 0;
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;get(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, false, request);
-    return request;
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::getKey&quot;);
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-
-    return getKey(context, keyRange.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBIndex::getKey&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (!keyRange) {
-        ec = IDBDatabaseException::DataError;
-        return 0;
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;get(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, true, request);
-    return request;
-}
-
-IDBDatabaseBackend* IDBIndex::backendDB() const
-{
-    return m_transaction-&gt;backendDB();
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBIndex_h
</span><span class="lines">@@ -43,55 +43,43 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBObjectStore;
</span><span class="cx"> 
</span><del>-class IDBIndex : public ScriptWrappable, public RefCounted&lt;IDBIndex&gt; {
</del><ins>+class IDBIndex : public RefCounted&lt;IDBIndex&gt; {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBIndex&gt; create(const IDBIndexMetadata&amp; metadata, IDBObjectStore* objectStore, IDBTransaction* transaction)
-    {
-        return adoptRef(*new IDBIndex(metadata, objectStore, transaction));
-    }
-    ~IDBIndex();
</del><ins>+    virtual ~IDBIndex() { }
</ins><span class="cx"> 
</span><span class="cx">     // Implement the IDL
</span><del>-    const String name() const { return m_metadata.name; }
-    PassRefPtr&lt;IDBObjectStore&gt; objectStore() const { return m_objectStore; }
-    PassRefPtr&lt;IDBAny&gt; keyPathAny() const { return IDBAny::create(m_metadata.keyPath); }
-    const IDBKeyPath keyPath() const { return m_metadata.keyPath; }
-    bool unique() const { return m_metadata.unique; }
-    bool multiEntry() const { return m_metadata.multiEntry; }
-    int64_t id() const { return m_metadata.id; }
</del><ins>+    virtual const String name() const = 0;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; objectStore() const = 0;
+    virtual PassRefPtr&lt;IDBAny&gt; keyPathAny() const = 0;
+    virtual const IDBKeyPath keyPath() const = 0;
+    virtual bool unique() const = 0;
+    virtual bool multiEntry() const = 0;
+    virtual int64_t id() const = 0;
</ins><span class="cx"> 
</span><del>-    // FIXME: Try to modify the code generator so this is unneeded.
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec) { return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec) { return openCursor(context, key, IDBCursor::directionNext(), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext* context, ExceptionCode&amp; ec) { return count(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec) { return openKeyCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec) { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec) { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
-    PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    void markDeleted() { m_deleted = true; }
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    IDBDatabaseBackend* backendDB() const;
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-private:
-    IDBIndex(const IDBIndexMetadata&amp;, IDBObjectStore*, IDBTransaction*);
-
-    IDBIndexMetadata m_metadata;
-    RefPtr&lt;IDBObjectStore&gt; m_objectStore;
-    RefPtr&lt;IDBTransaction&gt; m_transaction;
-    bool m_deleted;
</del><ins>+protected:
+    IDBIndex();
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><del>-    ImplementationLacksVTable,
</del><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBIndex {
</span><span class="cx">     readonly attribute DOMString name;
</span><span class="cx">     readonly attribute IDBObjectStore objectStore;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,547 +28,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMStringList.h&quot;
-#include &quot;IDBAny.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCursorWithValue.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBIndex.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyData.h&quot;
-#include &quot;IDBKeyPath.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;SerializedScriptValue.h&quot;
-#include &quot;SharedBuffer.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBObjectStore::IDBObjectStore(const IDBObjectStoreMetadata&amp; metadata, IDBTransaction* transaction)
-    : m_metadata(metadata)
-    , m_transaction(transaction)
-    , m_deleted(false)
</del><ins>+IDBObjectStore::IDBObjectStore()
</ins><span class="cx"> {
</span><del>-    ASSERT(m_transaction);
-    // We pass a reference to this object before it can be adopted.
-    relaxAdoptionRequirement();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;DOMStringList&gt; IDBObjectStore::indexNames() const
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::indexNames&quot;);
-    RefPtr&lt;DOMStringList&gt; indexNames = DOMStringList::create();
-    for (auto&amp; index : m_metadata.indexes.values())
-        indexNames-&gt;append(index.name);
-    indexNames-&gt;sort();
-    return indexNames.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::get&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!keyRange) {
-        ec = IDBDatabaseException::DataError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;get(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, keyRange, false, request);
-    return request.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return get(context, keyRange.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::add(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::add&quot;);
-    return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, key, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::add(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::add&quot;);
-    return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, static_cast&lt;IDBKey*&gt;(nullptr), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::put&quot;);
-    return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, key, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::put&quot;);
-    return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, static_cast&lt;IDBKey*&gt;(nullptr), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBAny&gt; source, JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
-{
-    ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
-    DOMRequestState requestState(context);
-    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
-    return put(putMode, source, state, value, key.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBAny&gt; source, JSC::ExecState* state, Deprecated::ScriptValue&amp; value, PassRefPtr&lt;IDBKey&gt; prpKey, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;IDBKey&gt; key = prpKey;
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return nullptr;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return nullptr;
-    }
-    if (m_transaction-&gt;isReadOnly()) {
-        ec = IDBDatabaseException::ReadOnlyError;
-        return nullptr;
-    }
-
-    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::create(state, value.jsValue(), nullptr, nullptr);
-    if (state-&gt;hadException())
-        return nullptr;
-
-    if (serializedValue-&gt;hasBlobURLs()) {
-        // FIXME: Add Blob/File/FileList support
-        ec = IDBDatabaseException::DataCloneError;
-        return nullptr;
-    }
-
-    const IDBKeyPath&amp; keyPath = m_metadata.keyPath;
-    const bool usesInLineKeys = !keyPath.isNull();
-    const bool hasKeyGenerator = autoIncrement();
-
-    ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
-    DOMRequestState requestState(context);
-
-    if (putMode != IDBDatabaseBackend::CursorUpdate &amp;&amp; usesInLineKeys &amp;&amp; key) {
-        ec = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-    if (!usesInLineKeys &amp;&amp; !hasKeyGenerator &amp;&amp; !key) {
-        ec = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-    if (usesInLineKeys) {
-        RefPtr&lt;IDBKey&gt; keyPathKey = createIDBKeyFromScriptValueAndKeyPath(requestState.exec(), value, keyPath);
-        if (keyPathKey &amp;&amp; !keyPathKey-&gt;isValid()) {
-            ec = IDBDatabaseException::DataError;
-            return nullptr;
-        }
-        if (!hasKeyGenerator &amp;&amp; !keyPathKey) {
-            ec = IDBDatabaseException::DataError;
-            return nullptr;
-        }
-        if (hasKeyGenerator &amp;&amp; !keyPathKey) {
-            if (!canInjectIDBKeyIntoScriptValue(&amp;requestState, value, keyPath)) {
-                ec = IDBDatabaseException::DataError;
-                return nullptr;
-            }
-        }
-        if (keyPathKey)
-            key = keyPathKey;
-    }
-    if (key &amp;&amp; !key-&gt;isValid()) {
-        ec = IDBDatabaseException::DataError;
-        return nullptr;
-    }
-
-    Vector&lt;int64_t&gt; indexIds;
-    Vector&lt;IndexKeys&gt; indexKeys;
-    for (auto&amp; index : m_metadata.indexes) {
-        Vector&lt;IDBKeyData&gt; keyDatas;
-        generateIndexKeysForValue(requestState.exec(), index.value, value, keyDatas);
-        indexIds.append(index.key);
-
-        // FIXME: Much of the Indexed DB code needs to use IDBKeyData directly to avoid wasteful conversions like this.
-        Vector&lt;RefPtr&lt;IDBKey&gt;&gt; keys;
-        for (auto&amp; keyData : keyDatas) {
-            RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
-            if (key)
-                keys.append(key.release());
-        }
-        indexKeys.append(keys);
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, source, m_transaction.get());
-    Vector&lt;uint8_t&gt; valueBytes = serializedValue-&gt;toWireBytes();
-    // This is a hack to account for disagreements about whether SerializedScriptValue should deal in Vector&lt;uint8_t&gt; or Vector&lt;char&gt;.
-    // See https://lists.webkit.org/pipermail/webkit-dev/2013-February/023682.html
-    Vector&lt;char&gt;* valueBytesSigned = reinterpret_cast&lt;Vector&lt;char&gt;*&gt;(&amp;valueBytes);
-    RefPtr&lt;SharedBuffer&gt; valueBuffer = SharedBuffer::adoptVector(*valueBytesSigned);
-    backendDB()-&gt;put(m_transaction-&gt;id(), id(), valueBuffer, key.release(), static_cast&lt;IDBDatabaseBackend::PutMode&gt;(putMode), request, indexIds, indexKeys);
-    return request.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::delete&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (m_transaction-&gt;isReadOnly()) {
-        ec = IDBDatabaseException::ReadOnlyError;
-        return 0;
-    }
-    if (!keyRange) {
-        ec = IDBDatabaseException::DataError;
-        return 0;
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;deleteRange(m_transaction-&gt;id(), id(), keyRange, request);
-    return request.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return deleteFunction(context, keyRange.release(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::clear(ScriptExecutionContext* context, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::clear&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (m_transaction-&gt;isReadOnly()) {
-        ec = IDBDatabaseException::ReadOnlyError;
-        return 0;
-    }
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;clearObjectStore(m_transaction-&gt;id(), id(), request);
-    return request.release();
-}
-
-namespace {
-// This class creates the index keys for a given index by extracting
-// them from the SerializedScriptValue, for all the existing values in
-// the objectStore. It only needs to be kept alive by virtue of being
-// a listener on an IDBRequest object, in the same way that JavaScript
-// cursor success handlers are kept alive.
-class IndexPopulator : public EventListener {
-public:
-    static Ref&lt;IndexPopulator&gt; create(PassRefPtr&lt;IDBDatabaseBackend&gt; backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-    {
-        return adoptRef(*new IndexPopulator(backend, transactionId, objectStoreId, indexMetadata));
-    }
-
-    virtual bool operator==(const EventListener&amp; other)
-    {
-        return this == &amp;other;
-    }
-
-private:
-    IndexPopulator(PassRefPtr&lt;IDBDatabaseBackend&gt; backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-        : EventListener(CPPEventListenerType)
-        , m_databaseBackend(backend)
-        , m_transactionId(transactionId)
-        , m_objectStoreId(objectStoreId)
-        , m_indexMetadata(indexMetadata)
-    {
-    }
-
-    virtual void handleEvent(ScriptExecutionContext*, Event* event)
-    {
-        ASSERT(event-&gt;type() == eventNames().successEvent);
-        EventTarget* target = event-&gt;target();
-        IDBRequest* request = static_cast&lt;IDBRequest*&gt;(target);
-
-        RefPtr&lt;IDBAny&gt; cursorAny = request-&gt;result(ASSERT_NO_EXCEPTION);
-        RefPtr&lt;IDBCursorWithValue&gt; cursor;
-        if (cursorAny-&gt;type() == IDBAny::IDBCursorWithValueType)
-            cursor = cursorAny-&gt;idbCursorWithValue();
-
-        Vector&lt;int64_t, 1&gt; indexIds;
-        indexIds.append(m_indexMetadata.id);
-        if (cursor) {
-            cursor-&gt;continueFunction(static_cast&lt;IDBKey*&gt;(nullptr), ASSERT_NO_EXCEPTION);
-
-            RefPtr&lt;IDBKey&gt; primaryKey = cursor-&gt;idbPrimaryKey();
-            Deprecated::ScriptValue value = cursor-&gt;value();
-
-            Vector&lt;IDBKeyData&gt; indexKeyDatas;
-            generateIndexKeysForValue(request-&gt;requestState()-&gt;exec(), m_indexMetadata, value, indexKeyDatas);
-
-            Vector&lt;RefPtr&lt;IDBKey&gt;&gt; indexKeys;
-            for (auto&amp; indexKeyData : indexKeyDatas) {
-                RefPtr&lt;IDBKey&gt; key = indexKeyData.maybeCreateIDBKey();
-                if (key)
-                    indexKeys.append(key.release());
-            }
-            Vector&lt;IDBObjectStore::IndexKeys, 1&gt; indexKeysList;
-            indexKeysList.append(indexKeys);
-
-            m_databaseBackend-&gt;setIndexKeys(m_transactionId, m_objectStoreId, primaryKey, indexIds, indexKeysList);
-        } else {
-            // Now that we are done indexing, tell the backend to go
-            // back to processing tasks of type NormalTask.
-            m_databaseBackend-&gt;setIndexesReady(m_transactionId, m_objectStoreId, indexIds);
-            m_databaseBackend = nullptr;
-        }
-
-    }
-
-    RefPtr&lt;IDBDatabaseBackend&gt; m_databaseBackend;
-    const int64_t m_transactionId;
-    const int64_t m_objectStoreId;
-    const IDBIndexMetadata m_indexMetadata;
-};
-}
-
-PassRefPtr&lt;IDBIndex&gt; IDBObjectStore::createIndex(ScriptExecutionContext* context, const String&amp; name, const IDBKeyPath&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec)
-{
-    bool unique = false;
-    options.get(&quot;unique&quot;, unique);
-
-    bool multiEntry = false;
-    options.get(&quot;multiEntry&quot;, multiEntry);
-
-    return createIndex(context, name, keyPath, unique, multiEntry, ec);
-}
-
-PassRefPtr&lt;IDBIndex&gt; IDBObjectStore::createIndex(ScriptExecutionContext* context, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::createIndex&quot;);
-    if (!m_transaction-&gt;isVersionChange() || m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    if (!keyPath.isValid()) {
-        ec = IDBDatabaseException::SyntaxError;
-        return 0;
-    }
-    if (name.isNull()) {
-        ec = TypeError;
-        return 0;
-    }
-    if (containsIndex(name)) {
-        ec = IDBDatabaseException::ConstraintError;
-        return 0;
-    }
-
-    if (keyPath.type() == IDBKeyPath::ArrayType &amp;&amp; multiEntry) {
-        ec = IDBDatabaseException::InvalidAccessError;
-        return 0;
-    }
-
-    int64_t indexId = m_metadata.maxIndexId + 1;
-    backendDB()-&gt;createIndex(m_transaction-&gt;id(), id(), indexId, name, keyPath, unique, multiEntry);
-
-    ++m_metadata.maxIndexId;
-
-    IDBIndexMetadata metadata(name, indexId, keyPath, unique, multiEntry);
-    RefPtr&lt;IDBIndex&gt; index = IDBIndex::create(metadata, this, m_transaction.get());
-    m_indexMap.set(name, index);
-    m_metadata.indexes.set(indexId, metadata);
-
-    ASSERT(!ec);
-    if (ec)
-        return 0;
-
-    ASSERT_UNUSED(context, context);
-    return index.release();
-}
-
-PassRefPtr&lt;IDBIndex&gt; IDBObjectStore::index(const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::index&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (m_transaction-&gt;isFinished()) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-
-    IDBIndexMap::iterator it = m_indexMap.find(name);
-    if (it != m_indexMap.end())
-        return it-&gt;value;
-
-    int64_t indexId = findIndexId(name);
-    if (indexId == IDBIndexMetadata::InvalidId) {
-        ec = IDBDatabaseException::NotFoundError;
-        return 0;
-    }
-
-    const IDBIndexMetadata* indexMetadata(nullptr);
-    for (auto&amp; index : m_metadata.indexes.values()) {
-        if (index.name == name) {
-            indexMetadata = &amp;index;
-            break;
-        }
-    }
-    ASSERT(indexMetadata);
-    ASSERT(indexMetadata-&gt;id != IDBIndexMetadata::InvalidId);
-
-    RefPtr&lt;IDBIndex&gt; index = IDBIndex::create(*indexMetadata, this, m_transaction.get());
-    m_indexMap.set(name, index);
-    return index.release();
-}
-
-void IDBObjectStore::deleteIndex(const String&amp; name, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::deleteIndex&quot;);
-    if (!m_transaction-&gt;isVersionChange() || m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return;
-    }
-    int64_t indexId = findIndexId(name);
-    if (indexId == IDBIndexMetadata::InvalidId) {
-        ec = IDBDatabaseException::NotFoundError;
-        return;
-    }
-
-    backendDB()-&gt;deleteIndex(m_transaction-&gt;id(), id(), indexId);
-
-    m_metadata.indexes.remove(indexId);
-    IDBIndexMap::iterator it = m_indexMap.find(name);
-    if (it != m_indexMap.end()) {
-        it-&gt;value-&gt;markDeleted();
-        m_indexMap.remove(name);
-    }
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec)
-{
-    return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
-{
-    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    return openCursor(context, key, IDBCursor::directionNext(), ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, const String&amp; direction, ExceptionCode&amp; ec)
-{
-    return openCursor(context, range, direction, IDBDatabaseBackend::NormalTask, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, const String&amp; directionString, IDBDatabaseBackend::TaskType taskType, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::openCursor&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
-    if (ec)
-        return 0;
-
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
-
-    backendDB()-&gt;openCursor(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast&lt;IDBDatabaseBackend::TaskType&gt;(taskType), request);
-    return request.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return openCursor(context, keyRange.release(), direction, ec);
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, ExceptionCode&amp; ec)
-{
-    LOG(StorageAPI, &quot;IDBObjectStore::count&quot;);
-    if (m_deleted) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    if (!m_transaction-&gt;isActive()) {
-        ec = IDBDatabaseException::TransactionInactiveError;
-        return 0;
-    }
-    RefPtr&lt;IDBRequest&gt; request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
-    backendDB()-&gt;count(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, range, request);
-    return request.release();
-}
-
-PassRefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
-{
-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
-    if (ec)
-        return 0;
-    return count(context, keyRange.release(), ec);
-}
-
-void IDBObjectStore::transactionFinished()
-{
-    ASSERT(m_transaction-&gt;isFinished());
-
-    // Break reference cycles.
-    m_indexMap.clear();
-}
-
-int64_t IDBObjectStore::findIndexId(const String&amp; name) const
-{
-    for (auto&amp; index : m_metadata.indexes) {
-        if (index.value.name == name) {
-            ASSERT(index.key != IDBIndexMetadata::InvalidId);
-            return index.key;
-        }
-    }
-    return IDBIndexMetadata::InvalidId;
-}
-
-IDBDatabaseBackend* IDBObjectStore::backendDB() const
-{
-    return m_transaction-&gt;backendDB();
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,41 +1,34 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBObjectStore_h
</span><span class="cx"> #define IDBObjectStore_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Dictionary.h&quot;
</span><del>-#include &quot;IDBCursor.h&quot;
-#include &quot;IDBDatabaseMetadata.h&quot;
-#include &quot;IDBIndex.h&quot;
-#include &quot;IDBKey.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBRequest.h&quot;
-#include &quot;IDBTransaction.h&quot;
</del><ins>+#include &quot;ExceptionCode.h&quot;
</ins><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><del>-#include &quot;SerializedScriptValue.h&quot;
</del><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="lines">@@ -43,85 +36,65 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+namespace Deprecated {
+class ScriptValue;
+}
+
+namespace JSC {
+class ExecState;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DOMStringList;
</span><span class="cx"> class IDBAny;
</span><ins>+class IDBIndex;
+class IDBKeyPath;
+class IDBKeyRange;
+class IDBRequest;
+class IDBTransaction;
+class ScriptExecutionContext;
</ins><span class="cx"> 
</span><del>-class IDBObjectStore : public ScriptWrappable, public RefCounted&lt;IDBObjectStore&gt; {
</del><ins>+class IDBObjectStore : public RefCounted&lt;IDBObjectStore&gt; {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBObjectStore&gt; create(const IDBObjectStoreMetadata&amp; metadata, IDBTransaction* transaction)
-    {
-        return adoptRef(*new IDBObjectStore(metadata, transaction));
-    }
-    ~IDBObjectStore() { }
</del><ins>+    virtual ~IDBObjectStore() { }
</ins><span class="cx"> 
</span><span class="cx">     // Implement the IDBObjectStore IDL
</span><del>-    int64_t id() const { return m_metadata.id; }
-    const String name() const { return m_metadata.name; }
-    PassRefPtr&lt;IDBAny&gt; keyPathAny() const { return IDBAny::create(m_metadata.keyPath); }
-    const IDBKeyPath keyPath() const { return m_metadata.keyPath; }
-    PassRefPtr&lt;DOMStringList&gt; indexNames() const;
-    PassRefPtr&lt;IDBTransaction&gt; transaction() const { return m_transaction; }
-    bool autoIncrement() const { return m_metadata.autoIncrement; }
</del><ins>+    virtual int64_t id() const = 0;
+    virtual const String name() const = 0;
+    virtual PassRefPtr&lt;IDBAny&gt; keyPathAny() const = 0;
+    virtual const IDBKeyPath keyPath() const = 0;
+    virtual PassRefPtr&lt;DOMStringList&gt; indexNames() const = 0;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction() const = 0;
+    virtual bool autoIncrement() const = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, IDBDatabaseBackend::TaskType, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext*, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext* context, const String&amp; name, const String&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
-    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext* context, const String&amp; name, const Vector&lt;String&gt;&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
-    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext*, const String&amp; name, const IDBKeyPath&amp;, const Dictionary&amp;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext*, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext*, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCode&amp;);
-    void deleteIndex(const String&amp; name, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCode&amp;) = 0;
+    virtual void deleteIndex(const String&amp; name, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext* context, ExceptionCode&amp; ec) { return count(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
</del><ins>+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) = 0;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBRequest&gt; put(IDBDatabaseBackend::PutMode, PassRefPtr&lt;IDBAny&gt; source, JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
-    PassRefPtr&lt;IDBRequest&gt; put(IDBDatabaseBackend::PutMode, PassRefPtr&lt;IDBAny&gt; source, JSC::ExecState*, Deprecated::ScriptValue&amp;, PassRefPtr&lt;IDBKey&gt;, ExceptionCode&amp;);
-    void markDeleted() { m_deleted = true; }
-    void transactionFinished();
-
-    IDBObjectStoreMetadata metadata() const { return m_metadata; }
-    void setMetadata(const IDBObjectStoreMetadata&amp; metadata) { m_metadata = metadata; }
-
-    typedef Vector&lt;RefPtr&lt;IDBKey&gt;&gt; IndexKeys;
-    typedef HashMap&lt;String, IndexKeys&gt; IndexKeyMap;
-
-    IDBDatabaseBackend* backendDB() const;
-
-private:
-    IDBObjectStore(const IDBObjectStoreMetadata&amp;, IDBTransaction*);
-
-    int64_t findIndexId(const String&amp; name) const;
-    bool containsIndex(const String&amp; name) const
-    {
-        return findIndexId(name) != IDBIndexMetadata::InvalidId;
-    }
-
-    IDBObjectStoreMetadata m_metadata;
-    RefPtr&lt;IDBTransaction&gt; m_transaction;
-    bool m_deleted;
-
-    typedef HashMap&lt;String, RefPtr&lt;IDBIndex&gt;&gt; IDBIndexMap;
-    IDBIndexMap m_indexMap;
</del><ins>+protected:
+    IDBObjectStore();
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><del>-    ImplementationLacksVTable,
</del><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBObjectStore {
</span><span class="cx">     [TreatReturnedNullStringAs=Null] readonly attribute DOMString name;
</span><span class="cx">     [ImplementedAs=keyPathAny] readonly attribute IDBAny keyPath;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,128 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBDatabaseCallbacksImpl.h&quot;
-#include &quot;IDBPendingTransactionMonitor.h&quot;
-#include &quot;IDBVersionChangeEvent.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBOpenDBRequest&gt; IDBOpenDBRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness versionNullness)
</del><ins>+IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context)
+    : IDBRequest(context)
</ins><span class="cx"> {
</span><del>-    Ref&lt;IDBOpenDBRequest&gt; request(adoptRef(*new IDBOpenDBRequest(context, callbacks, transactionId, version, versionNullness)));
-    request-&gt;suspendIfNeeded();
-    return request;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness versionNullness)
-    : IDBRequest(context, IDBAny::createNull(), IDBDatabaseBackend::NormalTask, 0)
-    , m_databaseCallbacks(callbacks)
-    , m_transactionId(transactionId)
-    , m_version(version)
-    , m_versionNullness(versionNullness)
-{
-    ASSERT(!m_result);
-}
-
-IDBOpenDBRequest::~IDBOpenDBRequest()
-{
-}
-
-EventTargetInterface IDBOpenDBRequest::eventTargetInterface() const
-{
-    return IDBOpenDBRequestEventTargetInterfaceType;
-}
-
-void IDBOpenDBRequest::onBlocked(uint64_t oldVersion)
-{
-    LOG(StorageAPI, &quot;IDBOpenDBRequest::onBlocked()&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-    
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, m_version, eventNames().blockedEvent));
-}
-
-void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr&lt;IDBDatabaseBackend&gt; prpDatabaseBackend, const IDBDatabaseMetadata&amp; metadata)
-{
-    LOG(StorageAPI, &quot;IDBOpenDBRequest::onUpgradeNeeded()&quot;);
-    if (m_contextStopped || !scriptExecutionContext()) {
-        RefPtr&lt;IDBDatabaseBackend&gt; db = prpDatabaseBackend;
-        db-&gt;abort(m_transactionId);
-        db-&gt;close(m_databaseCallbacks);
-        return;
-    }
-    if (!shouldEnqueueEvent())
-        return;
-
-    ASSERT(m_databaseCallbacks);
-
-    RefPtr&lt;IDBDatabaseBackend&gt; databaseBackend = prpDatabaseBackend;
-
-    RefPtr&lt;IDBDatabase&gt; idbDatabase = IDBDatabase::create(scriptExecutionContext(), databaseBackend, m_databaseCallbacks);
-    idbDatabase-&gt;setMetadata(metadata);
-    m_databaseCallbacks-&gt;connect(idbDatabase.get());
-    m_databaseCallbacks = nullptr;
-
-    IDBDatabaseMetadata oldMetadata(metadata);
-    oldMetadata.version = oldVersion;
-
-    m_transaction = IDBTransaction::create(scriptExecutionContext(), m_transactionId, idbDatabase.get(), this, oldMetadata);
-    m_result = IDBAny::create(idbDatabase.release());
-
-    if (m_versionNullness == IndexedDB::VersionNullness::Null)
-        m_version = 1;
-    enqueueEvent(IDBVersionChangeEvent::create(oldVersion, m_version, eventNames().upgradeneededEvent));
-}
-
-void IDBOpenDBRequest::onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt; prpBackend, const IDBDatabaseMetadata&amp; metadata)
-{
-    LOG(StorageAPI, &quot;IDBOpenDBRequest::onSuccess()&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    RefPtr&lt;IDBDatabaseBackend&gt; backend = prpBackend;
-    RefPtr&lt;IDBDatabase&gt; idbDatabase;
-    if (m_result) {
-        idbDatabase = m_result-&gt;idbDatabase();
-        ASSERT(idbDatabase);
-        ASSERT(!m_databaseCallbacks);
-    } else {
-        ASSERT(m_databaseCallbacks);
-        idbDatabase = IDBDatabase::create(scriptExecutionContext(), backend.release(), m_databaseCallbacks);
-        m_databaseCallbacks-&gt;connect(idbDatabase.get());
-        m_databaseCallbacks = nullptr;
-        m_result = IDBAny::create(idbDatabase.get());
-    }
-    idbDatabase-&gt;setMetadata(metadata);
-    enqueueEvent(Event::create(eventNames().successEvent, false, false));
-}
-
-bool IDBOpenDBRequest::shouldEnqueueEvent() const
-{
-    if (m_contextStopped || !scriptExecutionContext())
-        return false;
-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-    if (m_requestAborted)
-        return false;
-    return true;
-}
-
-bool IDBOpenDBRequest::dispatchEvent(PassRefPtr&lt;Event&gt; event)
-{
-    // If the connection closed between onUpgradeNeeded and the delivery of the &quot;success&quot; event,
-    // an &quot;error&quot; event should be fired instead.
-    if (event-&gt;type() == eventNames().successEvent &amp;&amp; m_result-&gt;type() == IDBAny::IDBDatabaseType &amp;&amp; m_result-&gt;idbDatabase()-&gt;isClosePending()) {
-        m_result = nullptr;
-        onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;The connection was closed.&quot;));
-        return false;
-    }
-
-    return IDBRequest::dispatchEvent(event);
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBOpenDBRequest_h
</span><span class="lines">@@ -33,33 +33,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class IDBDatabaseCallbacks;
-
</del><span class="cx"> class IDBOpenDBRequest : public IDBRequest {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;IDBOpenDBRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness);
-    virtual ~IDBOpenDBRequest();
</del><ins>+    virtual ~IDBOpenDBRequest() { }
</ins><span class="cx"> 
</span><del>-    using IDBRequest::onSuccess;
-
-    virtual void onBlocked(uint64_t existingVersion) override;
-    virtual void onUpgradeNeeded(uint64_t oldVersion, PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) override;
-    virtual void onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) override;
-
-    // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override;
-    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
-
</del><span class="cx"> protected:
</span><del>-    virtual bool shouldEnqueueEvent() const override;
-
-private:
-    IDBOpenDBRequest(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness);
-
-    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
-    const int64_t m_transactionId;
-    uint64_t m_version;
-    IndexedDB::VersionNullness m_versionNullness;
</del><ins>+    IDBOpenDBRequest(ScriptExecutionContext*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">     JSGenerateToJSObject,
</span><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBOpenDBRequest : IDBRequest {
</span><span class="cx">     attribute EventHandler onblocked;
</span><span class="cx">     attribute EventHandler onupgradeneeded;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBPendingDeleteCallh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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 IDBPendingDeleteCall_h
-#define IDBPendingDeleteCall_h
-
-#include &quot;IDBCallbacks.h&quot;
-#include &lt;wtf/RefPtr.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBPendingDeleteCall {
-public:
-    explicit IDBPendingDeleteCall(PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_callbacks(callbacks)
-    {
-    }
-
-    IDBCallbacks* callbacks() { return m_callbacks.get(); }
-
-private:
-    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBPendingDeleteCall_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBPendingOpenCallh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,63 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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 IDBPendingOpenCall_h
-#define IDBPendingOpenCall_h
-
-#include &lt;wtf/RefPtr.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBCallbacks;
-class IDBDatabaseCallbacks;
-
-class IDBPendingOpenCall {
-public:
-    IDBPendingOpenCall(IDBCallbacks&amp; callbacks, IDBDatabaseCallbacks&amp; databaseCallbacks, int64_t transactionId, uint64_t version)
-        : m_callbacks(&amp;callbacks)
-        , m_databaseCallbacks(&amp;databaseCallbacks)
-        , m_version(version)
-        , m_transactionId(transactionId)
-    {
-    }
-
-    IDBCallbacks* callbacks() { return m_callbacks.get(); }
-    IDBDatabaseCallbacks* databaseCallbacks() { return m_databaseCallbacks.get(); }
-    uint64_t version() { return m_version; }
-    int64_t transactionId() const { return m_transactionId; }
-
-private:
-    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
-    uint64_t m_version;
-    const int64_t m_transactionId;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBPendingOpenCall_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBPendingTransactionMonitor.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &lt;mutex&gt;
-#include &lt;wtf/ThreadSpecific.h&gt;
-
-using WTF::ThreadSpecific;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-typedef Vector&lt;RefPtr&lt;IDBTransaction&gt;&gt; TransactionList;
-
-static ThreadSpecific&lt;TransactionList&gt;&amp; transactions()
-{
-    // FIXME: Move the Vector to ScriptExecutionContext to avoid dealing with
-    // thread-local storage.
-    static std::once_flag onceFlag;
-    static ThreadSpecific&lt;TransactionList&gt;* transactions;
-    std::call_once(onceFlag, []{
-        transactions = new ThreadSpecific&lt;TransactionList&gt;;
-    });
-
-    return *transactions;
-}
-
-void IDBPendingTransactionMonitor::addNewTransaction(PassRefPtr&lt;IDBTransaction&gt; transaction)
-{
-    transactions()-&gt;append(transaction);
-}
-
-void IDBPendingTransactionMonitor::deactivateNewTransactions()
-{
-    ThreadSpecific&lt;TransactionList&gt;&amp; list = transactions();
-    for (auto&amp; transaction : *list)
-        transaction-&gt;setActive(false);
-    // FIXME: Exercise this call to clear() in a layout test.
-    list-&gt;clear();
-}
-
-};
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBPendingTransactionMonitor_h
-#define IDBPendingTransactionMonitor_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &lt;wtf/Noncopyable.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-
-class IDBTransaction;
-
-// This class keeps track of the transactions created during the current
-// Javascript execution context. Transactions have an internal |active| flag
-// which is set to true on creation, but must be set to false when control
-// returns to the event loop.
-
-class IDBPendingTransactionMonitor {
-    WTF_MAKE_NONCOPYABLE(IDBPendingTransactionMonitor);
-public:
-    static void addNewTransaction(PassRefPtr&lt;IDBTransaction&gt;);
-    static void deactivateNewTransactions();
-
-private:
-    IDBPendingTransactionMonitor();
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
-#endif // IDBPendingTransactionMonitor_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,29 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -31,547 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;EventException.h&quot;
-#include &quot;EventListener.h&quot;
-#include &quot;EventNames.h&quot;
-#include &quot;EventQueue.h&quot;
-#include &quot;ExceptionCodePlaceholder.h&quot;
-#include &quot;IDBBindingUtilities.h&quot;
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBCursorWithValue.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBEventDispatcher.h&quot;
-#include &quot;IDBTransaction.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
-#include &quot;SharedBuffer.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBAny&gt; source, IDBTransaction* transaction)
-{
-    Ref&lt;IDBRequest&gt; request(adoptRef(*new IDBRequest(context, source, IDBDatabaseBackend::NormalTask, transaction)));
-    request-&gt;suspendIfNeeded();
-    // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
-    if (transaction)
-        transaction-&gt;registerRequest(request.ptr());
-    return request;
-}
-
-Ref&lt;IDBRequest&gt; IDBRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBAny&gt; source, IDBDatabaseBackend::TaskType taskType, IDBTransaction* transaction)
-{
-    Ref&lt;IDBRequest&gt; request(adoptRef(*new IDBRequest(context, source, taskType, transaction)));
-    request-&gt;suspendIfNeeded();
-    // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
-    if (transaction)
-        transaction-&gt;registerRequest(request.ptr());
-    return request;
-}
-
-IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr&lt;IDBAny&gt; source, IDBDatabaseBackend::TaskType taskType, IDBTransaction* transaction)
</del><ins>+IDBRequest::IDBRequest(ScriptExecutionContext* context)
</ins><span class="cx">     : ActiveDOMObject(context)
</span><del>-    , m_result(nullptr)
-    , m_errorCode(0)
-    , m_contextStopped(false)
-    , m_transaction(transaction)
-    , m_readyState(PENDING)
-    , m_requestAborted(false)
-    , m_source(source)
-    , m_taskType(taskType)
-    , m_hasPendingActivity(true)
-    , m_cursorType(IndexedDB::CursorType::KeyAndValue)
-    , m_cursorDirection(IndexedDB::CursorDirection::Next)
-    , m_cursorFinished(false)
-    , m_pendingCursor(nullptr)
-    , m_didFireUpgradeNeededEvent(false)
-    , m_preventPropagation(false)
-    , m_requestState(context)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBRequest::~IDBRequest()
-{
-}
-
-PassRefPtr&lt;IDBAny&gt; IDBRequest::result(ExceptionCode&amp; ec) const
-{
-    if (m_readyState != DONE) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    return m_result;
-}
-
-PassRefPtr&lt;DOMError&gt; IDBRequest::error(ExceptionCode&amp; ec) const
-{
-    if (m_readyState != DONE) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    return m_error;
-}
-
-unsigned short IDBRequest::errorCode(ExceptionCode&amp; ec) const
-{
-    if (m_readyState != DONE) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-    return m_errorCode;
-}
-
-PassRefPtr&lt;IDBAny&gt; IDBRequest::source() const
-{
-    return m_source;
-}
-
-PassRefPtr&lt;IDBTransaction&gt; IDBRequest::transaction() const
-{
-    return m_transaction;
-}
-
-const String&amp; IDBRequest::readyState() const
-{
-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pending, (&quot;pending&quot;, AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, done, (&quot;done&quot;, AtomicString::ConstructFromLiteral));
-
-    if (m_readyState == PENDING)
-        return pending;
-
-    return done;
-}
-
-void IDBRequest::markEarlyDeath()
-{
-    ASSERT(m_readyState == PENDING);
-    m_readyState = EarlyDeath;
-    if (m_transaction)
-        m_transaction-&gt;unregisterRequest(this);
-}
-
-void IDBRequest::abort()
-{
-    ASSERT(!m_requestAborted);
-    if (m_contextStopped || !scriptExecutionContext())
-        return;
-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-    if (m_readyState == DONE)
-        return;
-
-    // Enqueued events may be the only reference to this object.
-    RefPtr&lt;IDBRequest&gt; self(this);
-
-    EventQueue&amp; eventQueue = scriptExecutionContext()-&gt;eventQueue();
-    for (auto&amp; event : m_enqueuedEvents) {
-        bool removed = eventQueue.cancelEvent(*event);
-        ASSERT_UNUSED(removed, removed);
-    }
-    m_enqueuedEvents.clear();
-
-    m_errorCode = 0;
-    m_error = nullptr;
-    m_errorMessage = String();
-    m_result = nullptr;
-    onError(IDBDatabaseError::create(IDBDatabaseException::AbortError));
-    m_requestAborted = true;
-}
-
-void IDBRequest::setCursorDetails(IndexedDB::CursorType cursorType, IndexedDB::CursorDirection direction)
-{
-    ASSERT(m_readyState == PENDING);
-    ASSERT(!m_pendingCursor);
-    m_cursorType = cursorType;
-    m_cursorDirection = direction;
-}
-
-void IDBRequest::setPendingCursor(PassRefPtr&lt;IDBCursor&gt; cursor)
-{
-    ASSERT(m_readyState == DONE);
-    ASSERT(scriptExecutionContext());
-    ASSERT(m_transaction);
-    ASSERT(!m_pendingCursor);
-    ASSERT(cursor == getResultCursor());
-
-    m_pendingCursor = cursor;
-    m_result = nullptr;
-    m_readyState = PENDING;
-    m_errorCode = 0;
-    m_error = nullptr;
-    m_errorMessage = String();
-    m_transaction-&gt;registerRequest(this);
-}
-
-RefPtr&lt;IDBCursor&gt; IDBRequest::getResultCursor()
-{
-    if (!m_result)
-        return nullptr;
-    if (m_result-&gt;type() == IDBAny::IDBCursorType)
-        return m_result-&gt;idbCursor();
-    if (m_result-&gt;type() == IDBAny::IDBCursorWithValueType)
-        return m_result-&gt;idbCursorWithValue();
-    return nullptr;
-}
-
-void IDBRequest::setResultCursor(PassRefPtr&lt;IDBCursor&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, const Deprecated::ScriptValue&amp; value)
-{
-    ASSERT(m_readyState == PENDING);
-    m_cursorKey = key;
-    m_cursorPrimaryKey = primaryKey;
-    m_cursorValue = value;
-
-    if (m_cursorType == IndexedDB::CursorType::KeyOnly) {
-        m_result = IDBAny::create(cursor);
-        return;
-    }
-
-    m_result = IDBAny::create(IDBCursorWithValue::fromCursor(cursor));
-}
-
-void IDBRequest::finishCursor()
-{
-    m_cursorFinished = true;
-    if (m_readyState != PENDING)
-        m_hasPendingActivity = false;
-}
-
-bool IDBRequest::shouldEnqueueEvent() const
-{
-    if (m_contextStopped || !scriptExecutionContext())
-        return false;
-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-    if (m_requestAborted)
-        return false;
-    ASSERT(m_readyState == PENDING);
-    ASSERT(!m_errorCode &amp;&amp; m_errorMessage.isNull() &amp;&amp; !m_error &amp;&amp; !m_result);
-    return true;
-}
-
-void IDBRequest::onError(PassRefPtr&lt;IDBDatabaseError&gt; error)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onError() (%s) '%s'&quot;, error-&gt;name().utf8().data(), error-&gt;message().utf8().data());
-    if (!shouldEnqueueEvent())
-        return;
-
-    m_errorCode = error-&gt;code();
-    m_errorMessage = error-&gt;message();
-    m_error = DOMError::create(IDBDatabaseException::getErrorName(error-&gt;idbCode()));
-    m_pendingCursor = nullptr;
-    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
-}
-
-static PassRefPtr&lt;Event&gt; createSuccessEvent()
-{
-    return Event::create(eventNames().successEvent, false, false);
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;DOMStringList&gt; domStringList)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(DOMStringList)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    m_result = IDBAny::create(domStringList);
-    enqueueEvent(createSuccessEvent());
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;IDBCursorBackend&gt; prpBackend)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(IDBCursor)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    DOMRequestState::Scope scope(m_requestState);
-
-    RefPtr&lt;IDBCursorBackend&gt; backend = prpBackend;
-    RefPtr&lt;IDBKey&gt; key = backend-&gt;key();
-    RefPtr&lt;IDBKey&gt; primaryKey = backend-&gt;primaryKey();
-
-    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), backend-&gt;valueBuffer(), !!key);
-
-    ASSERT(!m_pendingCursor);
-    RefPtr&lt;IDBCursor&gt; cursor;
-    switch (m_cursorType) {
-    case IndexedDB::CursorType::KeyOnly:
-        cursor = IDBCursor::create(backend.release(), m_cursorDirection, this, m_source.get(), m_transaction.get());
-        break;
-    case IndexedDB::CursorType::KeyAndValue:
-        cursor = IDBCursorWithValue::create(backend.release(), m_cursorDirection, this, m_source.get(), m_transaction.get());
-        break;
-    default:
-        ASSERT_NOT_REACHED();
-    }
-    setResultCursor(cursor, key.release(), primaryKey.release(), value);
-
-    enqueueEvent(createSuccessEvent());
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; idbKey)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(IDBKey)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    if (idbKey &amp;&amp; idbKey-&gt;isValid()) {
-        DOMRequestState::Scope scope(m_requestState);
-        m_result = IDBAny::create(idbKeyToScriptValue(requestState(), idbKey));
-    } else
-        m_result = IDBAny::createInvalid();
-    enqueueEvent(createSuccessEvent());
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;SharedBuffer&gt; valueBuffer)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(SharedBuffer)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    DOMRequestState::Scope scope(m_requestState);
-
-    // FIXME: By not knowing whether or not the key is defined here, we don't know
-    // if a null valueBuffer means the value is null or the value is undefined.
-    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), valueBuffer, true);
-    onSuccessInternal(value);
-}
-
-#ifndef NDEBUG
-static PassRefPtr&lt;IDBObjectStore&gt; effectiveObjectStore(PassRefPtr&lt;IDBAny&gt; source)
-{
-    if (source-&gt;type() == IDBAny::IDBObjectStoreType)
-        return source-&gt;idbObjectStore();
-    if (source-&gt;type() == IDBAny::IDBIndexType)
-        return source-&gt;idbIndex()-&gt;objectStore();
-
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-#endif
-
-void IDBRequest::onSuccess(PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const IDBKeyPath&amp; keyPath)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(SharedBuffer, IDBKey, IDBKeyPath)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-#ifndef NDEBUG
-    ASSERT(keyPath == effectiveObjectStore(m_source)-&gt;keyPath());
-#endif
-    DOMRequestState::Scope scope(m_requestState);
-
-    // FIXME: By not knowing whether or not the key is defined here, we don't know
-    // if a null valueBuffer means the value is null or the value is undefined.
-    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), valueBuffer, true);
-
-    RefPtr&lt;IDBKey&gt; primaryKey = prpPrimaryKey;
-
-    if (!keyPath.isNull()) {
-#ifndef NDEBUG
-        RefPtr&lt;IDBKey&gt; expectedKey = createIDBKeyFromScriptValueAndKeyPath(requestState()-&gt;exec(), value, keyPath);
-        ASSERT(!expectedKey || expectedKey-&gt;isEqual(primaryKey.get()));
-#endif
-        bool injected = injectIDBKeyIntoScriptValue(requestState(), primaryKey, value, keyPath);
-        ASSERT_UNUSED(injected, injected);
-    }
-
-    onSuccessInternal(value);
-}
-
-void IDBRequest::onSuccess(int64_t value)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(int64_t)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-    return onSuccessInternal(SerializedScriptValue::numberValue(value));
-}
-
-void IDBRequest::onSuccess()
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess()&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-    return onSuccessInternal(SerializedScriptValue::undefinedValue());
-}
-
-void IDBRequest::onSuccessInternal(PassRefPtr&lt;SerializedScriptValue&gt; value)
-{
-    ASSERT(!m_contextStopped);
-    DOMRequestState::Scope scope(m_requestState);
-    return onSuccessInternal(deserializeIDBValue(requestState(), value));
-}
-
-void IDBRequest::onSuccessInternal(const Deprecated::ScriptValue&amp; value)
-{
-    m_result = IDBAny::create(value);
-    if (m_pendingCursor) {
-        m_pendingCursor-&gt;close();
-        m_pendingCursor = nullptr;
-    }
-    enqueueEvent(createSuccessEvent());
-}
-
-void IDBRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; buffer)
-{
-    LOG(StorageAPI, &quot;IDBRequest::onSuccess(key, primaryKey, valueBuffer)&quot;);
-    if (!shouldEnqueueEvent())
-        return;
-
-    DOMRequestState::Scope scope(m_requestState);
-
-    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), buffer, !!key);
-
-    ASSERT(m_pendingCursor);
-    setResultCursor(m_pendingCursor.release(), key, primaryKey, value);
-    enqueueEvent(createSuccessEvent());
-}
-
-bool IDBRequest::hasPendingActivity() const
-{
-    // FIXME: In an ideal world, we should return true as long as anyone has a or can
-    //        get a handle to us and we have event listeners. This is order to handle
-    //        user generated events properly.
-    return m_hasPendingActivity &amp;&amp; !m_contextStopped;
-}
-
-void IDBRequest::stop()
-{
-    if (m_contextStopped)
-        return;
-
-    m_contextStopped = true;
-    m_requestState.clear();
-    if (m_readyState == PENDING)
-        markEarlyDeath();
-}
-
-bool IDBRequest::canSuspendForPageCache() const
-{
-    return !m_hasPendingActivity;
-}
-
-const char* IDBRequest::activeDOMObjectName() const
-{
-    return &quot;IDBRequest&quot;;
-}
-
-EventTargetInterface IDBRequest::eventTargetInterface() const
-{
-    return IDBRequestEventTargetInterfaceType;
-}
-
-bool IDBRequest::dispatchEvent(PassRefPtr&lt;Event&gt; event)
-{
-    LOG(StorageAPI, &quot;IDBRequest::dispatchEvent&quot;);
-    ASSERT(m_readyState == PENDING);
-    ASSERT(!m_contextStopped);
-    ASSERT(m_hasPendingActivity);
-    ASSERT(m_enqueuedEvents.size());
-    ASSERT(scriptExecutionContext());
-    ASSERT(event-&gt;target() == this);
-    ASSERT_WITH_MESSAGE(m_readyState &lt; DONE, &quot;When dispatching event %s, m_readyState &lt; DONE(%d), was %d&quot;, event-&gt;type().string().utf8().data(), DONE, m_readyState);
-
-    DOMRequestState::Scope scope(m_requestState);
-
-    if (event-&gt;type() != eventNames().blockedEvent)
-        m_readyState = DONE;
-
-    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
-        if (m_enqueuedEvents[i].get() == event.get())
-            m_enqueuedEvents.remove(i);
-    }
-
-    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
-    targets.append(this);
-    if (m_transaction &amp;&amp; !m_preventPropagation) {
-        targets.append(m_transaction);
-        // If there ever are events that are associated with a database but
-        // that do not have a transaction, then this will not work and we need
-        // this object to actually hold a reference to the database (to ensure
-        // it stays alive).
-        targets.append(m_transaction-&gt;db());
-    }
-
-    // Cursor properties should not updated until the success event is being dispatched.
-    RefPtr&lt;IDBCursor&gt; cursorToNotify;
-    if (event-&gt;type() == eventNames().successEvent) {
-        cursorToNotify = getResultCursor();
-        if (cursorToNotify) {
-            cursorToNotify-&gt;setValueReady(requestState(), m_cursorKey.release(), m_cursorPrimaryKey.release(), m_cursorValue);
-            m_cursorValue.clear();
-        }
-    }
-
-    if (event-&gt;type() == eventNames().upgradeneededEvent) {
-        ASSERT(!m_didFireUpgradeNeededEvent);
-        m_didFireUpgradeNeededEvent = true;
-    }
-
-    // FIXME: When we allow custom event dispatching, this will probably need to change.
-    ASSERT_WITH_MESSAGE(event-&gt;type() == eventNames().successEvent || event-&gt;type() == eventNames().errorEvent || event-&gt;type() == eventNames().blockedEvent || event-&gt;type() == eventNames().upgradeneededEvent, &quot;event type was %s&quot;, event-&gt;type().string().utf8().data());
-    const bool setTransactionActive = m_transaction &amp;&amp; (event-&gt;type() == eventNames().successEvent || event-&gt;type() == eventNames().upgradeneededEvent || (event-&gt;type() == eventNames().errorEvent &amp;&amp; m_errorCode != IDBDatabaseException::AbortError));
-
-    if (setTransactionActive)
-        m_transaction-&gt;setActive(true);
-
-    bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets);
-
-    if (m_transaction) {
-        if (m_readyState == DONE)
-            m_transaction-&gt;unregisterRequest(this);
-
-        // Possibly abort the transaction. This must occur after unregistering (so this request
-        // doesn't receive a second error) and before deactivating (which might trigger commit).
-        if (event-&gt;type() == eventNames().errorEvent &amp;&amp; dontPreventDefault &amp;&amp; !m_requestAborted) {
-            m_transaction-&gt;setError(m_error, m_errorMessage);
-            m_transaction-&gt;abort(IGNORE_EXCEPTION);
-        }
-
-        // If this was the last request in the transaction's list, it may commit here.
-        if (setTransactionActive)
-            m_transaction-&gt;setActive(false);
-    }
-
-    if (cursorToNotify)
-        cursorToNotify-&gt;postSuccessHandlerCallback();
-
-    if (m_readyState == DONE &amp;&amp; (!cursorToNotify || m_cursorFinished) &amp;&amp; event-&gt;type() != eventNames().upgradeneededEvent)
-        m_hasPendingActivity = false;
-
-    return dontPreventDefault;
-}
-
-void IDBRequest::uncaughtExceptionInEventHandler()
-{
-    if (m_transaction &amp;&amp; !m_requestAborted) {
-        m_transaction-&gt;setError(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)), &quot;Uncaught exception in event handler.&quot;);
-        m_transaction-&gt;abort(IGNORE_EXCEPTION);
-    }
-}
-
-void IDBRequest::transactionDidFinishAndDispatch()
-{
-    ASSERT(m_transaction);
-    ASSERT(m_transaction-&gt;isVersionChange());
-    ASSERT(m_readyState == DONE);
-    ASSERT(scriptExecutionContext());
-    m_transaction = nullptr;
-    m_readyState = PENDING;
-}
-
-void IDBRequest::enqueueEvent(PassRefPtr&lt;Event&gt; event)
-{
-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-
-    if (m_contextStopped || !scriptExecutionContext())
-        return;
-
-    ASSERT_WITH_MESSAGE(m_readyState == PENDING || m_didFireUpgradeNeededEvent, &quot;When queueing event %s, m_readyState was %d&quot;, event-&gt;type().string().utf8().data(), m_readyState);
-
-    event-&gt;setTarget(this);
-
-    if (scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event.get()))
-        m_enqueuedEvents.append(event);
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,29 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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.
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBRequest_h
</span><span class="lines">@@ -39,10 +36,7 @@
</span><span class="cx"> #include &quot;EventListener.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;IDBAny.h&quot;
</span><del>-#include &quot;IDBCallbacks.h&quot;
</del><span class="cx"> #include &quot;IDBCursor.h&quot;
</span><del>-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
</del><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -51,18 +45,15 @@
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-class IDBRequest : public ScriptWrappable, public IDBCallbacks, public EventTargetWithInlineData, public ActiveDOMObject {
</del><ins>+class IDBRequest : public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBAny&gt; source, IDBTransaction*);
-    static Ref&lt;IDBRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBAny&gt; source, IDBDatabaseBackend::TaskType, IDBTransaction*);
-    virtual ~IDBRequest();
</del><ins>+    virtual ~IDBRequest() { }
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBAny&gt; result(ExceptionCode&amp;) const;
-    unsigned short errorCode(ExceptionCode&amp;) const;
-    PassRefPtr&lt;DOMError&gt; error(ExceptionCode&amp;) const;
-    PassRefPtr&lt;IDBAny&gt; source() const;
-    PassRefPtr&lt;IDBTransaction&gt; transaction() const;
-    void preventPropagation() { m_preventPropagation = true; }
</del><ins>+    virtual PassRefPtr&lt;IDBAny&gt; result(ExceptionCode&amp;) const = 0;
+    virtual unsigned short errorCode(ExceptionCode&amp;) const = 0;
+    virtual PassRefPtr&lt;DOMError&gt; error(ExceptionCode&amp;) const = 0;
+    virtual PassRefPtr&lt;IDBAny&gt; source() const = 0;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction() const = 0;
</ins><span class="cx"> 
</span><span class="cx">     // Defined in the IDL
</span><span class="cx">     enum ReadyState {
</span><span class="lines">@@ -71,96 +62,14 @@
</span><span class="cx">         EarlyDeath = 3
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    const String&amp; readyState() const;
</del><ins>+    virtual const String&amp; readyState() const = 0;
</ins><span class="cx"> 
</span><del>-    void markEarlyDeath();
-    void setCursorDetails(IndexedDB::CursorType, IndexedDB::CursorDirection);
-    void setPendingCursor(PassRefPtr&lt;IDBCursor&gt;);
-    void finishCursor();
-    void abort();
-
-    // IDBCallbacks
-    virtual void onError(PassRefPtr&lt;IDBDatabaseError&gt;) override;
-    virtual void onSuccess(PassRefPtr&lt;DOMStringList&gt;) override;
-    virtual void onSuccess(PassRefPtr&lt;IDBCursorBackend&gt;) override;
-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;) override;
-    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;) override;
-    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, const IDBKeyPath&amp;) override;
-    virtual void onSuccess(int64_t) override;
-    virtual void onSuccess() override;
-    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;) override;
-
-    // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override;
-    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
-    virtual void uncaughtExceptionInEventHandler() override final;
-
-    using EventTarget::dispatchEvent;
-    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
-
-    void transactionDidFinishAndDispatch();
-
-    using RefCounted&lt;IDBCallbacks&gt;::ref;
-    using RefCounted&lt;IDBCallbacks&gt;::deref;
-
-    IDBDatabaseBackend::TaskType taskType() { return m_taskType; }
-
-    DOMRequestState* requestState() { return &amp;m_requestState; }
-
-    // ActiveDOMObject API.
-    bool hasPendingActivity() const override;
-
</del><span class="cx"> protected:
</span><del>-    IDBRequest(ScriptExecutionContext*, PassRefPtr&lt;IDBAny&gt; source, IDBDatabaseBackend::TaskType, IDBTransaction*);
-    void enqueueEvent(PassRefPtr&lt;Event&gt;);
-    virtual bool shouldEnqueueEvent() const;
-    void onSuccessInternal(PassRefPtr&lt;SerializedScriptValue&gt;);
-    void onSuccessInternal(const Deprecated::ScriptValue&amp;);
-
-    RefPtr&lt;IDBAny&gt; m_result;
-    unsigned short m_errorCode;
-    String m_errorMessage;
-    RefPtr&lt;DOMError&gt; m_error;
-    bool m_contextStopped;
-    RefPtr&lt;IDBTransaction&gt; m_transaction;
-    ReadyState m_readyState;
-    bool m_requestAborted; // May be aborted by transaction then receive async onsuccess; ignore vs. assert.
-
-private:
-    // ActiveDOMObject API.
-    void stop() override;
-    const char* activeDOMObjectName() const override;
-    bool canSuspendForPageCache() const override;
-
-    // EventTarget API.
-    virtual void refEventTarget() override final { ref(); }
-    virtual void derefEventTarget() override final { deref(); }
-
-    RefPtr&lt;IDBCursor&gt; getResultCursor();
-    void setResultCursor(PassRefPtr&lt;IDBCursor&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, const Deprecated::ScriptValue&amp;);
-
-    RefPtr&lt;IDBAny&gt; m_source;
-    const IDBDatabaseBackend::TaskType m_taskType;
-
-    bool m_hasPendingActivity;
-    Vector&lt;RefPtr&lt;Event&gt;&gt; m_enqueuedEvents;
-
-    // Only used if the result type will be a cursor.
-    IndexedDB::CursorType m_cursorType;
-    IndexedDB::CursorDirection m_cursorDirection;
-    bool m_cursorFinished;
-    RefPtr&lt;IDBCursor&gt; m_pendingCursor;
-    RefPtr&lt;IDBKey&gt; m_cursorKey;
-    RefPtr&lt;IDBKey&gt; m_cursorPrimaryKey;
-    Deprecated::ScriptValue m_cursorValue;
-    bool m_didFireUpgradeNeededEvent;
-    bool m_preventPropagation;
-
-    DOMRequestState m_requestState;
</del><ins>+    IDBRequest(ScriptExecutionContext*);
</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><span class="cx"> 
</span><del>-#endif // IDBRequest_h
</del><ins>+#endif // LegacyRequest_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -33,7 +33,8 @@
</span><span class="cx">     ActiveDOMObject,
</span><span class="cx">     EventTarget,
</span><span class="cx">     JSGenerateToJSObject,
</span><del>-    JSGenerateToNativeObject
</del><ins>+    JSGenerateToNativeObject,
+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBRequest : EventTarget {
</span><span class="cx">     [GetterRaisesException] readonly attribute IDBAny result;
</span><span class="cx">     [GetterRaisesException] readonly attribute DOMError error;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -28,36 +28,15 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;EventException.h&quot;
-#include &quot;EventQueue.h&quot;
-#include &quot;ExceptionCodePlaceholder.h&quot;
-#include &quot;IDBDatabase.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBEventDispatcher.h&quot;
-#include &quot;IDBIndex.h&quot;
-#include &quot;IDBObjectStore.h&quot;
-#include &quot;IDBOpenDBRequest.h&quot;
-#include &quot;IDBPendingTransactionMonitor.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;ScriptExecutionContext.h&quot;
</del><ins>+#include &quot;ExceptionCode.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBTransaction&gt; IDBTransaction::create(ScriptExecutionContext* context, int64_t id, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode mode, IDBDatabase* db)
</del><ins>+IDBTransaction::IDBTransaction(ScriptExecutionContext* context)
+    : ActiveDOMObject(context)
</ins><span class="cx"> {
</span><del>-    IDBOpenDBRequest* openDBRequest = nullptr;
-    Ref&lt;IDBTransaction&gt; transaction(adoptRef(*new IDBTransaction(context, id, objectStoreNames, mode, db, openDBRequest, IDBDatabaseMetadata())));
-    transaction-&gt;suspendIfNeeded();
-    return transaction;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBTransaction&gt; IDBTransaction::create(ScriptExecutionContext* context, int64_t id, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata&amp; previousMetadata)
-{
-    Ref&lt;IDBTransaction&gt; transaction(adoptRef(*new IDBTransaction(context, id, Vector&lt;String&gt;(), IndexedDB::TransactionMode::VersionChange, db, openDBRequest, previousMetadata)));
-    transaction-&gt;suspendIfNeeded();
-    return transaction;
-}
-
</del><span class="cx"> const AtomicString&amp; IDBTransaction::modeReadOnly()
</span><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, readonly, (&quot;readonly&quot;, AtomicString::ConstructFromLiteral));
</span><span class="lines">@@ -88,249 +67,6 @@
</span><span class="cx">     return readwrite;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
-IDBTransaction::IDBTransaction(ScriptExecutionContext* context, int64_t id, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode mode, IDBDatabase* db, IDBOpenDBRequest* openDBRequest, const IDBDatabaseMetadata&amp; previousMetadata)
-    : ActiveDOMObject(context)
-    , m_id(id)
-    , m_database(db)
-    , m_objectStoreNames(objectStoreNames)
-    , m_openDBRequest(openDBRequest)
-    , m_mode(mode)
-    , m_state(Active)
-    , m_hasPendingActivity(true)
-    , m_contextStopped(false)
-    , m_previousMetadata(previousMetadata)
-{
-    if (mode == IndexedDB::TransactionMode::VersionChange) {
-        // Not active until the callback.
-        m_state = Inactive;
-    }
-
-    // We pass a reference of this object before it can be adopted.
-    relaxAdoptionRequirement();
-    if (m_state == Active)
-        IDBPendingTransactionMonitor::addNewTransaction(this);
-    m_database-&gt;transactionCreated(this);
-}
-
-IDBTransaction::~IDBTransaction()
-{
-    ASSERT(m_state == Finished || m_contextStopped);
-    ASSERT(m_requestList.isEmpty() || m_contextStopped);
-}
-
-const String&amp; IDBTransaction::mode() const
-{
-    return modeToString(m_mode);
-}
-
-void IDBTransaction::setError(PassRefPtr&lt;DOMError&gt; error, const String&amp; errorMessage)
-{
-    ASSERT(m_state != Finished);
-    ASSERT(error);
-
-    // The first error to be set is the true cause of the
-    // transaction abort.
-    if (!m_error) {
-        m_error = error;
-        m_errorMessage = errorMessage;
-    }
-}
-
-PassRefPtr&lt;IDBObjectStore&gt; IDBTransaction::objectStore(const String&amp; name, ExceptionCode&amp; ec)
-{
-    if (m_state == Finished) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return 0;
-    }
-
-    IDBObjectStoreMap::iterator it = m_objectStoreMap.find(name);
-    if (it != m_objectStoreMap.end())
-        return it-&gt;value;
-
-    if (!isVersionChange() &amp;&amp; !m_objectStoreNames.contains(name)) {
-        ec = IDBDatabaseException::NotFoundError;
-        return 0;
-    }
-
-    int64_t objectStoreId = m_database-&gt;findObjectStoreId(name);
-    if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
-        ASSERT(isVersionChange());
-        ec = IDBDatabaseException::NotFoundError;
-        return 0;
-    }
-
-    const IDBDatabaseMetadata&amp; metadata = m_database-&gt;metadata();
-
-    RefPtr&lt;IDBObjectStore&gt; objectStore = IDBObjectStore::create(metadata.objectStores.get(objectStoreId), this);
-    objectStoreCreated(name, objectStore);
-    return objectStore.release();
-}
-
-void IDBTransaction::objectStoreCreated(const String&amp; name, PassRefPtr&lt;IDBObjectStore&gt; prpObjectStore)
-{
-    ASSERT(m_state != Finished);
-    RefPtr&lt;IDBObjectStore&gt; objectStore = prpObjectStore;
-    m_objectStoreMap.set(name, objectStore);
-    if (isVersionChange())
-        m_objectStoreCleanupMap.set(objectStore, objectStore-&gt;metadata());
-}
-
-void IDBTransaction::objectStoreDeleted(const String&amp; name)
-{
-    ASSERT(m_state != Finished);
-    ASSERT(isVersionChange());
-    IDBObjectStoreMap::iterator it = m_objectStoreMap.find(name);
-    if (it != m_objectStoreMap.end()) {
-        RefPtr&lt;IDBObjectStore&gt; objectStore = it-&gt;value;
-        m_objectStoreMap.remove(name);
-        objectStore-&gt;markDeleted();
-        m_objectStoreCleanupMap.set(objectStore, objectStore-&gt;metadata());
-        m_deletedObjectStores.add(objectStore);
-    }
-}
-
-void IDBTransaction::setActive(bool active)
-{
-    LOG(StorageAPI, &quot;IDBTransaction::setActive(%s) for transaction id %lli&quot;, active ? &quot;true&quot; : &quot;false&quot;, static_cast&lt;long long&gt;(m_id));
-    ASSERT_WITH_MESSAGE(m_state != Finished, &quot;A finished transaction tried to setActive(%s)&quot;, active ? &quot;true&quot; : &quot;false&quot;);
-    if (m_state == Finishing)
-        return;
-    ASSERT(active != (m_state == Active));
-    m_state = active ? Active : Inactive;
-
-    if (!active &amp;&amp; m_requestList.isEmpty())
-        backendDB()-&gt;commit(m_id);
-}
-
-void IDBTransaction::abort(ExceptionCode&amp; ec)
-{
-    if (m_state == Finishing || m_state == Finished) {
-        ec = IDBDatabaseException::InvalidStateError;
-        return;
-    }
-
-    m_state = Finishing;
-
-    while (!m_requestList.isEmpty()) {
-        RefPtr&lt;IDBRequest&gt; request = *m_requestList.begin();
-        m_requestList.remove(request);
-        request-&gt;abort();
-    }
-
-    RefPtr&lt;IDBTransaction&gt; selfRef = this;
-    backendDB()-&gt;abort(m_id);
-}
-
-IDBTransaction::OpenCursorNotifier::OpenCursorNotifier(PassRefPtr&lt;IDBTransaction&gt; transaction, IDBCursor* cursor)
-    : m_transaction(transaction),
-      m_cursor(cursor)
-{
-    m_transaction-&gt;registerOpenCursor(m_cursor);
-}
-
-IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier()
-{
-    if (m_cursor)
-        m_transaction-&gt;unregisterOpenCursor(m_cursor);
-}
-
-void IDBTransaction::OpenCursorNotifier::cursorFinished()
-{
-    if (m_cursor) {
-        m_transaction-&gt;unregisterOpenCursor(m_cursor);
-        m_cursor = nullptr;
-        m_transaction = nullptr;
-    }
-}
-
-void IDBTransaction::registerOpenCursor(IDBCursor* cursor)
-{
-    m_openCursors.add(cursor);
-}
-
-void IDBTransaction::unregisterOpenCursor(IDBCursor* cursor)
-{
-    m_openCursors.remove(cursor);
-}
-
-void IDBTransaction::closeOpenCursors()
-{
-    HashSet&lt;IDBCursor*&gt; cursors;
-    cursors.swap(m_openCursors);
-    for (auto&amp; cursor : cursors)
-        cursor-&gt;close();
-}
-
-void IDBTransaction::registerRequest(IDBRequest* request)
-{
-    ASSERT(request);
-    ASSERT(m_state == Active);
-    m_requestList.add(request);
-}
-
-void IDBTransaction::unregisterRequest(IDBRequest* request)
-{
-    ASSERT(request);
-    // If we aborted the request, it will already have been removed.
-    m_requestList.remove(request);
-}
-
-void IDBTransaction::onAbort(PassRefPtr&lt;IDBDatabaseError&gt; prpError)
-{
-    LOG(StorageAPI, &quot;IDBTransaction::onAbort&quot;);
-    RefPtr&lt;IDBDatabaseError&gt; error = prpError;
-    ASSERT(m_state != Finished);
-
-    if (m_state != Finishing) {
-        ASSERT(error.get());
-        setError(DOMError::create(error-&gt;name()), error-&gt;message());
-
-        // Abort was not triggered by front-end, so outstanding requests must
-        // be aborted now.
-        while (!m_requestList.isEmpty()) {
-            RefPtr&lt;IDBRequest&gt; request = *m_requestList.begin();
-            m_requestList.remove(request);
-            request-&gt;abort();
-        }
-        m_state = Finishing;
-    }
-
-    if (isVersionChange()) {
-        for (auto&amp; objectStore : m_objectStoreCleanupMap)
-            objectStore.key-&gt;setMetadata(objectStore.value);
-        m_database-&gt;setMetadata(m_previousMetadata);
-        m_database-&gt;close();
-    }
-    m_objectStoreCleanupMap.clear();
-    closeOpenCursors();
-
-    // Enqueue events before notifying database, as database may close which enqueues more events and order matters.
-    enqueueEvent(Event::create(eventNames().abortEvent, true, false));
-    m_database-&gt;transactionFinished(this);
-}
-
-void IDBTransaction::onComplete()
-{
-    LOG(StorageAPI, &quot;IDBTransaction::onComplete&quot;);
-    ASSERT(m_state != Finished);
-    m_state = Finishing;
-    m_objectStoreCleanupMap.clear();
-    closeOpenCursors();
-
-    // Enqueue events before notifying database, as database may close which enqueues more events and order matters.
-    enqueueEvent(Event::create(eventNames().completeEvent, false, false));
-    m_database-&gt;transactionFinished(this);
-}
-
-bool IDBTransaction::hasPendingActivity() const
-{
-    // FIXME: In an ideal world, we should return true as long as anyone has a or can
-    //        get a handle to us or any child request object and any of those have
-    //        event listeners. This is  in order to handle user generated events properly.
-    return m_hasPendingActivity &amp;&amp; !m_contextStopped;
-}
-
</del><span class="cx"> IndexedDB::TransactionMode IDBTransaction::stringToMode(const String&amp; modeString, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     if (modeString.isNull()
</span><span class="lines">@@ -360,74 +96,6 @@
</span><span class="cx">     return IDBTransaction::modeReadOnly();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool IDBTransaction::dispatchEvent(PassRefPtr&lt;Event&gt; event)
-{
-    LOG(StorageAPI, &quot;IDBTransaction::dispatchEvent&quot;);
-    ASSERT(m_state != Finished);
-    ASSERT(m_hasPendingActivity);
-    ASSERT(scriptExecutionContext());
-    ASSERT(event-&gt;target() == this);
-    m_state = Finished;
</del><ins>+} // namespace WebCore
</ins><span class="cx"> 
</span><del>-    // Break reference cycles.
-    for (auto&amp; objectStore : m_objectStoreMap)
-        objectStore.value-&gt;transactionFinished();
-    m_objectStoreMap.clear();
-    for (auto&amp; objectStore : m_deletedObjectStores)
-        objectStore-&gt;transactionFinished();
-    m_deletedObjectStores.clear();
-
-    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
-    targets.append(this);
-    targets.append(db());
-
-    // FIXME: When we allow custom event dispatching, this will probably need to change.
-    ASSERT(event-&gt;type() == eventNames().completeEvent || event-&gt;type() == eventNames().abortEvent);
-    bool returnValue = IDBEventDispatcher::dispatch(event.get(), targets);
-    // FIXME: Try to construct a test where |this| outlives openDBRequest and we
-    // get a crash.
-    if (m_openDBRequest) {
-        ASSERT(isVersionChange());
-        m_openDBRequest-&gt;transactionDidFinishAndDispatch();
-    }
-    m_hasPendingActivity = false;
-    return returnValue;
-}
-
-bool IDBTransaction::canSuspendForPageCache() const
-{
-    // FIXME: Technically we can suspend before the first request is schedule
-    //        and after the complete/abort event is enqueued.
-    return m_state == Finished;
-}
-
-void IDBTransaction::stop()
-{
-    m_contextStopped = true;
-
-    abort(IGNORE_EXCEPTION);
-}
-
-const char* IDBTransaction::activeDOMObjectName() const
-{
-    return &quot;IDBTransaction&quot;;
-}
-
-void IDBTransaction::enqueueEvent(PassRefPtr&lt;Event&gt; event)
-{
-    ASSERT_WITH_MESSAGE(m_state != Finished, &quot;A finished transaction tried to enqueue an event of type %s.&quot;, event-&gt;type().string().utf8().data());
-    if (m_contextStopped || !scriptExecutionContext())
-        return;
-
-    event-&gt;setTarget(this);
-    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event);
-}
-
-IDBDatabaseBackend* IDBTransaction::backendDB() const
-{
-    return db()-&gt;backend();
-}
-
-}
-
</del><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 (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBTransaction_h
</span><span class="lines">@@ -29,11 +29,7 @@
</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;Event.h&quot;
-#include &quot;EventListener.h&quot;
</del><span class="cx"> #include &quot;EventTarget.h&quot;
</span><del>-#include &quot;IDBDatabaseMetadata.h&quot;
</del><span class="cx"> #include &quot;IndexedDB.h&quot;
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -41,6 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class DOMError;
</ins><span class="cx"> class IDBCursor;
</span><span class="cx"> class IDBDatabase;
</span><span class="cx"> class IDBDatabaseBackend;
</span><span class="lines">@@ -49,11 +46,9 @@
</span><span class="cx"> class IDBOpenDBRequest;
</span><span class="cx"> struct IDBObjectStoreMetadata;
</span><span class="cx"> 
</span><del>-class IDBTransaction final : public ScriptWrappable, public RefCounted&lt;IDBTransaction&gt;, public EventTargetWithInlineData, public ActiveDOMObject {
</del><ins>+class IDBTransaction : public ScriptWrappable, public RefCounted&lt;IDBTransaction&gt;, public EventTargetWithInlineData, public ActiveDOMObject {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBTransaction&gt; create(ScriptExecutionContext*, int64_t, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode, IDBDatabase*);
-    static Ref&lt;IDBTransaction&gt; create(ScriptExecutionContext*, int64_t, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&amp; previousMetadata);
-    virtual ~IDBTransaction();
</del><ins>+    virtual ~IDBTransaction() { }
</ins><span class="cx"> 
</span><span class="cx">     static const AtomicString&amp; modeReadOnly();
</span><span class="cx">     static const AtomicString&amp; modeReadWrite();
</span><span class="lines">@@ -64,103 +59,18 @@
</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>-    IDBDatabaseBackend* backendDB() const;
-
-    int64_t id() const { return m_id; }
-    bool isActive() const { return m_state == Active; }
-    bool isFinished() const { return m_state == Finished; }
-    bool isReadOnly() const { return m_mode == IndexedDB::TransactionMode::ReadOnly; }
-    bool isVersionChange() const { return m_mode == IndexedDB::TransactionMode::VersionChange; }
-
</del><span class="cx">     // Implement the IDBTransaction IDL
</span><del>-    const String&amp; mode() const;
-    IDBDatabase* db() const { return m_database.get(); }
-    PassRefPtr&lt;DOMError&gt; error() const { return m_error; }
-    PassRefPtr&lt;IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCode&amp;);
-    void abort(ExceptionCode&amp;);
</del><ins>+    virtual const String&amp; mode() const = 0;
+    virtual IDBDatabase* db() const = 0;
+    virtual PassRefPtr&lt;DOMError&gt; error() const = 0;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCode&amp;) = 0;
+    virtual void abort(ExceptionCode&amp;) = 0;
</ins><span class="cx"> 
</span><del>-    class OpenCursorNotifier {
-    public:
-        OpenCursorNotifier(PassRefPtr&lt;IDBTransaction&gt;, IDBCursor*);
-        ~OpenCursorNotifier();
-        void cursorFinished();
-    private:
-        RefPtr&lt;IDBTransaction&gt; m_transaction;
-        IDBCursor* m_cursor;
-    };
-
-    void registerRequest(IDBRequest*);
-    void unregisterRequest(IDBRequest*);
-    void objectStoreCreated(const String&amp;, PassRefPtr&lt;IDBObjectStore&gt;);
-    void objectStoreDeleted(const String&amp;);
-    void setActive(bool);
-    void setError(PassRefPtr&lt;DOMError&gt;, const String&amp; errorMessage);
-
-    void onAbort(PassRefPtr&lt;IDBDatabaseError&gt;);
-    void onComplete();
-
-    // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override { return IDBTransactionEventTargetInterfaceType; }
-    virtual ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
-
-    using EventTarget::dispatchEvent;
-    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
-
-    // ActiveDOMObject
-    bool hasPendingActivity() const override;
-
</del><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>-private:
-    IDBTransaction(ScriptExecutionContext*, int64_t, const Vector&lt;String&gt;&amp;, IndexedDB::TransactionMode, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&amp;);
-
-    void enqueueEvent(PassRefPtr&lt;Event&gt;);
-    void closeOpenCursors();
-
-    void registerOpenCursor(IDBCursor*);
-    void unregisterOpenCursor(IDBCursor*);
-
-    // ActiveDOMObject API.
-    bool canSuspendForPageCache() const override;
-    void stop() override;
-    const char* activeDOMObjectName() const override;
-
-    // EventTarget API.
-    virtual void refEventTarget() override { ref(); }
-    virtual void derefEventTarget() override { deref(); }
-
-    enum State {
-        Inactive, // Created or started, but not in an event callback
-        Active, // Created or started, in creation scope or an event callback
-        Finishing, // In the process of aborting or completing.
-        Finished, // No more events will fire and no new requests may be filed.
-    };
-
-    int64_t m_id;
-    RefPtr&lt;IDBDatabase&gt; m_database;
-    const Vector&lt;String&gt; m_objectStoreNames;
-    IDBOpenDBRequest* m_openDBRequest;
-    const IndexedDB::TransactionMode m_mode;
-    State m_state;
-    bool m_hasPendingActivity;
-    bool m_contextStopped;
-    RefPtr&lt;DOMError&gt; m_error;
-    String m_errorMessage;
-
-    ListHashSet&lt;RefPtr&lt;IDBRequest&gt;&gt; m_requestList;
-
-    typedef HashMap&lt;String, RefPtr&lt;IDBObjectStore&gt;&gt; IDBObjectStoreMap;
-    IDBObjectStoreMap m_objectStoreMap;
-
-    typedef HashSet&lt;RefPtr&lt;IDBObjectStore&gt;&gt; IDBObjectStoreSet;
-    IDBObjectStoreSet m_deletedObjectStores;
-
-    typedef HashMap&lt;RefPtr&lt;IDBObjectStore&gt;, IDBObjectStoreMetadata&gt; IDBObjectStoreMetadataMap;
-    IDBObjectStoreMetadataMap m_objectStoreCleanupMap;
-    IDBDatabaseMetadata m_previousMetadata;
-
-    HashSet&lt;IDBCursor*&gt; m_openCursors;
</del><ins>+protected:
+    IDBTransaction(ScriptExecutionContext*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">     JSGenerateToJSObject,
</span><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><ins>+    SkipVTableValidation,
</ins><span class="cx"> ] interface IDBTransaction : EventTarget {
</span><span class="cx">     readonly attribute DOMString mode;
</span><span class="cx">     readonly attribute IDBDatabase db;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,377 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBTransactionBackend.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBDatabaseException.h&quot;
-#include &quot;IDBFactoryBackendInterface.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBServerConnection.h&quot;
-#include &quot;IDBTransactionBackendOperations.h&quot;
-#include &quot;IDBTransactionCoordinator.h&quot;
-#include &quot;Logging.h&quot;
-
-namespace WebCore {
-
-Ref&lt;IDBTransactionBackend&gt; IDBTransactionBackend::create(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode mode)
-{
-    HashSet&lt;int64_t&gt; objectStoreHashSet;
-    for (auto&amp; id : objectStoreIds)
-        objectStoreHashSet.add(id);
-
-    return adoptRef(*new IDBTransactionBackend(databaseBackend, id, callbacks, objectStoreHashSet, mode));
-}
-
-IDBTransactionBackend::IDBTransactionBackend(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const HashSet&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode mode)
-    : m_objectStoreIds(objectStoreIds)
-    , m_mode(mode)
-    , m_state(Unopened)
-    , m_commitPending(false)
-    , m_callbacks(callbacks)
-    , m_database(databaseBackend)
-    , m_taskTimer(*this, &amp;IDBTransactionBackend::taskTimerFired)
-    , m_pendingPreemptiveEvents(0)
-    , m_id(id)
-{
-    // We pass a reference of this object before it can be adopted.
-    relaxAdoptionRequirement();
-
-    m_database-&gt;transactionCoordinator()-&gt;didCreateTransaction(this);
-
-    RefPtr&lt;IDBTransactionBackend&gt; backend(this);
-    m_database-&gt;serverConnection().openTransaction(id, objectStoreIds, mode, [backend](bool success) {
-        if (!success) {
-            callOnMainThread([backend]() {
-                backend-&gt;abort();
-            });
-            return;
-        }
-
-        // Handle the case where the transaction was aborted before the server connection finished opening the transaction.
-        if (backend-&gt;m_state == Finished)
-            return;
-
-        backend-&gt;m_state = Unused;
-        if (backend-&gt;hasPendingTasks())
-            backend-&gt;start();
-    });
-}
-
-IDBTransactionBackend::~IDBTransactionBackend()
-{
-    // It shouldn't be possible for this object to get deleted unless it's unused, complete, or aborted.
-    ASSERT(m_state == Finished || m_state == Unused);
-}
-
-void IDBTransactionBackend::scheduleTask(IDBDatabaseBackend::TaskType type, PassRefPtr&lt;IDBOperation&gt; task, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask)
-{
-    if (m_state == Finished)
-        return;
-
-    if (type == IDBDatabaseBackend::NormalTask)
-        m_taskQueue.append(task);
-    else
-        m_preemptiveTaskQueue.append(task);
-
-    if (abortTask)
-        m_abortTaskQueue.prepend(abortTask);
-
-    if (m_state == Unopened)
-        return;
-
-    if (m_state == Unused)
-        start();
-    else if (m_state == Running &amp;&amp; !m_taskTimer.isActive())
-        m_taskTimer.startOneShot(0);
-}
-
-void IDBTransactionBackend::abort()
-{
-    abort(IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error (unknown cause)&quot;));
-}
-
-void IDBTransactionBackend::abort(PassRefPtr&lt;IDBDatabaseError&gt; error)
-{
-#ifndef NDEBUG
-    if (error)
-        LOG(StorageAPI, &quot;IDBTransactionBackend::abort - (%s) %s&quot;, error-&gt;name().utf8().data(), error-&gt;message().utf8().data());
-    else
-        LOG(StorageAPI, &quot;IDBTransactionBackend::abort (no error)&quot;);
-#endif
-
-    if (m_state == Finished)
-        return;
-
-    bool wasRunning = m_state == Running;
-
-    // The last reference to this object may be released while performing the
-    // abort steps below. We therefore take a self reference to keep ourselves
-    // alive while executing this method.
-    Ref&lt;IDBTransactionBackend&gt; protect(*this);
-
-    m_state = Finished;
-    m_taskTimer.stop();
-
-    if (wasRunning)
-        m_database-&gt;serverConnection().rollbackTransactionSync(m_id);
-
-    // Run the abort tasks, if any.
-    while (!m_abortTaskQueue.isEmpty()) {
-        RefPtr&lt;IDBSynchronousOperation&gt; task(m_abortTaskQueue.takeFirst());
-        task-&gt;perform();
-    }
-
-    // Backing store resources (held via cursors) must be released before script callbacks
-    // are fired, as the script callbacks may release references and allow the backing store
-    // itself to be released, and order is critical.
-    closeOpenCursors();
-
-    m_database-&gt;serverConnection().resetTransactionSync(m_id);
-
-    // Transactions must also be marked as completed before the front-end is notified, as
-    // the transaction completion unblocks operations like closing connections.
-    m_database-&gt;transactionCoordinator()-&gt;didFinishTransaction(this);
-    ASSERT(!m_database-&gt;transactionCoordinator()-&gt;isActive(this));
-    m_database-&gt;transactionFinished(this);
-
-    RefPtr&lt;IDBDatabaseBackend&gt; database = m_database.release();
-
-    if (m_callbacks)
-        m_callbacks-&gt;onAbort(id(), error);
-
-    database-&gt;transactionFinishedAndAbortFired(this);
-}
-
-bool IDBTransactionBackend::isTaskQueueEmpty() const
-{
-    return m_preemptiveTaskQueue.isEmpty() &amp;&amp; m_taskQueue.isEmpty();
-}
-
-bool IDBTransactionBackend::hasPendingTasks() const
-{
-    return m_pendingPreemptiveEvents || !isTaskQueueEmpty();
-}
-
-void IDBTransactionBackend::registerOpenCursor(IDBCursorBackend* cursor)
-{
-    m_openCursors.add(cursor);
-}
-
-void IDBTransactionBackend::unregisterOpenCursor(IDBCursorBackend* cursor)
-{
-    m_openCursors.remove(cursor);
-}
-
-void IDBTransactionBackend::run()
-{
-    // TransactionCoordinator has started this transaction. Schedule a timer
-    // to process the first task.
-    ASSERT(m_state == StartPending || m_state == Running);
-    ASSERT(!m_taskTimer.isActive());
-
-    m_taskTimer.startOneShot(0);
-}
-
-void IDBTransactionBackend::start()
-{
-    ASSERT(m_state == Unused);
-
-    m_state = StartPending;
-    m_database-&gt;transactionCoordinator()-&gt;didStartTransaction(this);
-    m_database-&gt;transactionStarted(this);
-}
-
-void IDBTransactionBackend::commit()
-{
-    LOG(StorageAPI, &quot;IDBTransactionBackend::commit transaction %lli in state %u&quot;, static_cast&lt;long long&gt;(m_id), m_state);
-
-    // In multiprocess ports, front-end may have requested a commit but an abort has already
-    // been initiated asynchronously by the back-end.
-    if (m_state == Finished)
-        return;
-
-    ASSERT(m_state == Unopened || m_state == Unused || m_state == Running);
-    m_commitPending = true;
-
-    // Front-end has requested a commit, but there may be tasks like createIndex which
-    // are considered synchronous by the front-end but are processed asynchronously.
-    if (hasPendingTasks()) {
-        LOG(StorageAPI, &quot;IDBTransactionBackend::commit - Not committing now, transaction still has pending tasks (Transaction %lli)&quot;, static_cast&lt;long long&gt;(m_id));
-        return;
-    }
-
-    // The last reference to this object may be released while performing the
-    // commit steps below. We therefore take a self reference to keep ourselves
-    // alive while executing this method.
-    RefPtr&lt;IDBTransactionBackend&gt; backend(this);
-
-    bool unused = m_state == Unused || m_state == Unopened;
-    m_state = Finished;
-
-    bool committed = unused;
-
-    m_database-&gt;serverConnection().commitTransaction(m_id, [backend, this, committed, unused](bool success) mutable {
-        // This might be commitTransaction request aborting during or after synchronous IDBTransactionBackend::abort() call.
-        // This can easily happen if the page is navigated before all transactions finish.
-        // In this case we have no further cleanup and don't need to make any callbacks.
-        if (!m_database) {
-            ASSERT(!success);
-            return;
-        }
-
-        committed |= success;
-
-        // Backing store resources (held via cursors) must be released before script callbacks
-        // are fired, as the script callbacks may release references and allow the backing store
-        // itself to be released, and order is critical.
-        closeOpenCursors();
-
-        m_database-&gt;serverConnection().resetTransaction(m_id, []() { });
-
-        // Transactions must also be marked as completed before the front-end is notified, as
-        // the transaction completion unblocks operations like closing connections.
-        if (!unused)
-            m_database-&gt;transactionCoordinator()-&gt;didFinishTransaction(this);
-        m_database-&gt;transactionFinished(this);
-
-        if (committed) {
-            m_callbacks-&gt;onComplete(id());
-            m_database-&gt;transactionFinishedAndCompleteFired(this);
-        } else {
-            m_callbacks-&gt;onAbort(id(), IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error committing transaction.&quot;));
-            m_database-&gt;transactionFinishedAndAbortFired(this);
-        }
-
-        m_database = nullptr;
-    });
-}
-
-void IDBTransactionBackend::taskTimerFired()
-{
-    LOG(StorageAPI, &quot;IDBTransactionBackend::taskTimerFired&quot;);
-
-    if (m_state == StartPending) {
-        m_database-&gt;serverConnection().beginTransaction(m_id, []() { });
-        m_state = Running;
-    }
-
-    // The last reference to this object may be released while performing a task.
-    // Take a self reference to keep this object alive so that tasks can
-    // successfully make their completion callbacks.
-    RefPtr&lt;IDBTransactionBackend&gt; self(this);
-
-    TaskQueue* taskQueue = m_pendingPreemptiveEvents ? &amp;m_preemptiveTaskQueue : &amp;m_taskQueue;
-    if (!taskQueue-&gt;isEmpty() &amp;&amp; m_state != Finished) {
-        ASSERT(m_state == Running);
-        RefPtr&lt;IDBOperation&gt; task(taskQueue-&gt;takeFirst());
-        task-&gt;perform([self, this, task]() {
-            m_taskTimer.startOneShot(0);
-        });
-
-        return;
-    }
-
-    // If there are no pending tasks, we haven't already committed/aborted,
-    // and the front-end requested a commit, it is now safe to do so.
-    if (!hasPendingTasks() &amp;&amp; m_state != Finished &amp;&amp; m_commitPending)
-        commit();
-}
-
-void IDBTransactionBackend::closeOpenCursors()
-{
-    for (auto&amp; cursor : m_openCursors)
-        cursor-&gt;close();
-    m_openCursors.clear();
-}
-
-void IDBTransactionBackend::scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-{
-    scheduleTask(CreateObjectStoreOperation::create(this, objectStoreMetadata), CreateObjectStoreAbortOperation::create(this, objectStoreMetadata.id));
-}
-
-void IDBTransactionBackend::scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-{
-    scheduleTask(DeleteObjectStoreOperation::create(this, objectStoreMetadata), DeleteObjectStoreAbortOperation::create(this, objectStoreMetadata));
-}
-
-void IDBTransactionBackend::scheduleVersionChangeOperation(int64_t requestedVersion, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks, const IDBDatabaseMetadata&amp; metadata)
-{
-    scheduleTask(IDBDatabaseBackend::VersionChangeOperation::create(this, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackend::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
-}
-
-void IDBTransactionBackend::scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-{
-    scheduleTask(CreateIndexOperation::create(this, objectStoreId, indexMetadata), CreateIndexAbortOperation::create(this, objectStoreId, indexMetadata.id));
-}
-
-void IDBTransactionBackend::scheduleDeleteIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-{
-    scheduleTask(DeleteIndexOperation::create(this, objectStoreId, indexMetadata), DeleteIndexAbortOperation::create(this, objectStoreId, indexMetadata));
-}
-
-void IDBTransactionBackend::scheduleGetOperation(const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    scheduleTask(GetOperation::create(this, metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
-}
-
-void IDBTransactionBackend::schedulePutOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
-{
-    scheduleTask(PutOperation::create(this, objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys));
-}
-
-void IDBTransactionBackend::scheduleSetIndexesReadyOperation(size_t indexCount)
-{
-    scheduleTask(IDBDatabaseBackend::PreemptiveTask, SetIndexesReadyOperation::create(this, indexCount));
-}
-
-void IDBTransactionBackend::scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    scheduleTask(OpenCursorOperation::create(this, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
-}
-
-void IDBTransactionBackend::scheduleCountOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    scheduleTask(CountOperation::create(this, objectStoreId, indexId, keyRange, callbacks));
-}
-
-void IDBTransactionBackend::scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    scheduleTask(DeleteRangeOperation::create(this, objectStoreId, keyRange, callbacks));
-}
-
-void IDBTransactionBackend::scheduleClearObjectStoreOperation(int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-{
-    scheduleTask(ClearObjectStoreOperation::create(this, objectStoreId, callbacks));
-}
-
-};
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,128 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBTransactionBackend_h
-#define IDBTransactionBackend_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBDatabaseError.h&quot;
-#include &quot;IDBOperation.h&quot;
-#include &quot;Timer.h&quot;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WebCore {
-
-class IDBCursorBackend;
-class IDBDatabaseCallbacks;
-
-class IDBTransactionBackend : public RefCounted&lt;IDBTransactionBackend&gt; {
-public:
-    static Ref&lt;IDBTransactionBackend&gt; create(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
-    ~IDBTransactionBackend();
-
-    void commit();
-    void abort();
-    void abort(PassRefPtr&lt;IDBDatabaseError&gt;);
-
-    void run();
-    IndexedDB::TransactionMode mode() const  { return m_mode; }
-    const HashSet&lt;int64_t&gt;&amp; scope() const  { return m_objectStoreIds; }
-
-    void scheduleTask(PassRefPtr&lt;IDBOperation&gt; task, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask = nullptr) { scheduleTask(IDBDatabaseBackend::NormalTask, task, abortTask); }
-    void scheduleTask(IDBDatabaseBackend::TaskType, PassRefPtr&lt;IDBOperation&gt;, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask = nullptr);
-
-    void registerOpenCursor(IDBCursorBackend*);
-    void unregisterOpenCursor(IDBCursorBackend*);
-
-    void addPreemptiveEvent()  { m_pendingPreemptiveEvents++; }
-    void didCompletePreemptiveEvent()  { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents &gt;= 0); }
-
-    IDBDatabaseBackend&amp; database() const  { return *m_database; }
-
-    void scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&amp;);
-    void scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&amp;);
-    void scheduleVersionChangeOperation(int64_t requestedVersion, PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const IDBDatabaseMetadata&amp;);
-    void scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp;);
-    void scheduleDeleteIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp;);
-    void scheduleGetOperation(const IDBDatabaseMetadata&amp;, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorType, PassRefPtr&lt;IDBCallbacks&gt;);
-    void schedulePutOperation(const IDBObjectStoreMetadata&amp;, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt;, IDBDatabaseBackend::PutMode, PassRefPtr&lt;IDBCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp;);
-    void scheduleSetIndexesReadyOperation(size_t indexCount);
-    void scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorDirection, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, PassRefPtr&lt;IDBCallbacks&gt;);
-    void scheduleCountOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
-    void scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
-    void scheduleClearObjectStoreOperation(int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt;);
-
-    int64_t id() const { return m_id; }
-
-private:
-    IDBTransactionBackend(IDBDatabaseBackend*, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const HashSet&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
-
-    enum State {
-        Unopened, // Backing store transaction not yet created.
-        Unused, // Backing store transaction created, but no tasks yet.
-        StartPending, // Enqueued tasks, but backing store transaction not yet started.
-        Running, // Backing store transaction started but not yet finished.
-        Finished, // Either aborted or committed.
-    };
-
-    void start();
-
-    bool isTaskQueueEmpty() const;
-    bool hasPendingTasks() const;
-
-    void taskTimerFired();
-    void closeOpenCursors();
-
-    const HashSet&lt;int64_t&gt; m_objectStoreIds;
-    const IndexedDB::TransactionMode m_mode;
-
-    State m_state;
-    bool m_commitPending;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; m_callbacks;
-    RefPtr&lt;IDBDatabaseBackend&gt; m_database;
-
-    typedef Deque&lt;RefPtr&lt;IDBOperation&gt;&gt; TaskQueue;
-    TaskQueue m_taskQueue;
-    TaskQueue m_preemptiveTaskQueue;
-    Deque&lt;RefPtr&lt;IDBSynchronousOperation&gt;&gt; m_abortTaskQueue;
-
-    // FIXME: delete the timer once we have threads instead.
-    Timer m_taskTimer;
-    int m_pendingPreemptiveEvents;
-
-    HashSet&lt;IDBCursorBackend*&gt; m_openCursors;
-
-    int64_t m_id;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
-#endif // IDBTransactionBackend_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,284 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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;IDBTransactionBackendOperations.h&quot;
-
-#include &quot;IDBCursorBackend.h&quot;
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBKeyRange.h&quot;
-#include &quot;IDBRecordIdentifier.h&quot;
-#include &quot;IDBServerConnection.h&quot;
-#include &quot;Logging.h&quot;
-#include &lt;wtf/text/CString.h&gt;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#define STANDARD_DATABASE_ERROR_CALLBACK std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; operationCallback = \
-    [operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; error) { \
-        if (error) \
-            operation-&gt;m_transaction-&gt;abort(error); \
-        completionCallback(); \
-    };
-
-namespace WebCore {
-
-void CreateObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;CreateObjectStoreOperation&quot;);
-
-    RefPtr&lt;CreateObjectStoreOperation&gt; operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction-&gt;database().serverConnection().createObjectStore(*m_transaction, *this, operationCallback);
-}
-
-void CreateIndexOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;CreateIndexOperation&quot;);
-
-    RefPtr&lt;CreateIndexOperation&gt; operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction-&gt;database().serverConnection().createIndex(*m_transaction, *this, operationCallback);
-}
-
-void CreateIndexAbortOperation::perform()
-{
-    LOG(StorageAPI, &quot;CreateIndexAbortOperation&quot;);
-    m_transaction-&gt;database().removeIndex(m_objectStoreID, m_indexID);
-}
-
-void DeleteIndexOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;DeleteIndexOperation&quot;);
-
-    RefPtr&lt;DeleteIndexOperation&gt; operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction-&gt;database().serverConnection().deleteIndex(*m_transaction, *this, operationCallback);
-}
-
-void DeleteIndexAbortOperation::perform()
-{
-    LOG(StorageAPI, &quot;DeleteIndexAbortOperation&quot;);
-    m_transaction-&gt;database().addIndex(m_objectStoreID, m_indexMetadata, IDBIndexMetadata::InvalidId);
-}
-
-void GetOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;GetOperation&quot;);
-
-    RefPtr&lt;GetOperation&gt; operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction-&gt;database().serverConnection().get(*m_transaction, *this, [this, operation, operationCallback](const IDBGetResult&amp; result, PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
-        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
-
-        if (error)
-            m_callbacks-&gt;onError(error);
-        else {
-            if (!result.valueBuffer) {
-                if (result.keyData.isNull)
-                    m_callbacks-&gt;onSuccess();
-                else
-                    m_callbacks-&gt;onSuccess(result.keyData.maybeCreateIDBKey());
-            } else {
-                if (!result.keyData.isNull)
-                    m_callbacks-&gt;onSuccess(result.valueBuffer, result.keyData.maybeCreateIDBKey(), result.keyPath);
-                else
-                    m_callbacks-&gt;onSuccess(result.valueBuffer.get());
-            }
-        }
-
-        operationCallback(error.release());
-    });
-}
-
-void PutOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;PutOperation&quot;);
-    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
-    ASSERT(m_indexIDs.size() == m_indexKeys.size());
-
-    m_transaction-&gt;database().serverConnection().put(*m_transaction, *this, [this, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
-        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
-        if (key) {
-            ASSERT(!error);
-            m_callbacks-&gt;onSuccess(key);
-        } else {
-            ASSERT(error);
-            m_callbacks-&gt;onError(error);
-        }
-        completionCallback();
-    });
-}
-
-void SetIndexesReadyOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;SetIndexesReadyOperation&quot;);
-
-    for (size_t i = 0; i &lt; m_indexCount; ++i)
-        m_transaction-&gt;didCompletePreemptiveEvent();
-
-    callOnMainThread(completionCallback);
-}
-
-void OpenCursorOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;OpenCursorOperation&quot;);
-
-    RefPtr&lt;OpenCursorOperation&gt; operation(this);
-    auto callback = [this, operation, completionCallback](int64_t cursorID, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
-        if (error) {
-            m_callbacks-&gt;onError(error);
-        } else if (!key) {
-            // If there's no error but also no key, then the cursor had no records.
-            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
-        } else {
-            RefPtr&lt;IDBCursorBackend&gt; cursor = IDBCursorBackend::create(cursorID, m_cursorType, m_taskType, *m_transaction, m_objectStoreID);
-            cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
-            m_callbacks-&gt;onSuccess(cursor.release());
-        }
-
-        completionCallback();
-    };
-
-    m_transaction-&gt;database().serverConnection().openCursor(*m_transaction, *this, callback);
-}
-
-void CountOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;CountOperation&quot;);
-
-    RefPtr&lt;CountOperation&gt; operation(this);
-    auto callback = [this, operation, completionCallback](int64_t count, PassRefPtr&lt;IDBDatabaseError&gt;) {
-        // FIXME: The LevelDB port never had an error condition for the count operation.
-        // We probably need to support an error for the count operation, breaking the LevelDB port.
-        m_callbacks-&gt;onSuccess(count);
-
-        completionCallback();
-    };
-
-    m_transaction-&gt;database().serverConnection().count(*m_transaction, *this, callback);
-}
-
-void DeleteRangeOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;DeleteRangeOperation&quot;);
-
-    RefPtr&lt;DeleteRangeOperation&gt; operation(this);
-    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; error) {
-        if (error)
-            m_callbacks-&gt;onError(error);
-        else
-            m_callbacks-&gt;onSuccess();
-
-        completionCallback();
-    };
-
-    m_transaction-&gt;database().serverConnection().deleteRange(*m_transaction, *this, callback);
-}
-
-void ClearObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;ClearObjectStoreOperation&quot;);
-
-    RefPtr&lt;ClearObjectStoreOperation&gt; operation(this);
-
-    auto clearCallback = [this, operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
-        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
-
-        if (error) {
-            m_callbacks-&gt;onError(error);
-            m_transaction-&gt;abort(error.release());
-        } else
-            m_callbacks-&gt;onSuccess();
-
-        completionCallback();
-    };
-
-    m_transaction-&gt;database().serverConnection().clearObjectStore(*m_transaction, *this, clearCallback);
-}
-
-void DeleteObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;DeleteObjectStoreOperation&quot;);
-
-    RefPtr&lt;DeleteObjectStoreOperation&gt; operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction-&gt;database().serverConnection().deleteObjectStore(*m_transaction, *this, operationCallback);
-}
-
-void IDBDatabaseBackend::VersionChangeOperation::perform(std::function&lt;void()&gt; completionCallback)
-{
-    LOG(StorageAPI, &quot;VersionChangeOperation&quot;);
-
-    uint64_t oldVersion = m_transaction-&gt;database().metadata().version;
-    if (oldVersion == IDBDatabaseMetadata::NoIntVersion)
-        oldVersion = 0;
-
-    RefPtr&lt;IDBDatabaseBackend::VersionChangeOperation&gt; operation(this);
-    ASSERT(static_cast&lt;uint64_t&gt;(m_version) &gt; oldVersion);
-
-    std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; operationCallback = [oldVersion, operation, this, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
-        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
-        if (error) {
-            m_callbacks-&gt;onError(error);
-            m_transaction-&gt;abort(error);
-        } else {
-            ASSERT(!m_transaction-&gt;database().hasPendingSecondHalfOpen());
-            m_transaction-&gt;database().setCurrentVersion(m_version);
-            m_transaction-&gt;database().setPendingSecondHalfOpen(std::make_unique&lt;IDBPendingOpenCall&gt;(*m_callbacks, *m_databaseCallbacks, m_transaction-&gt;id(), m_version));
-            m_callbacks-&gt;onUpgradeNeeded(oldVersion, &amp;m_transaction-&gt;database(), m_transaction-&gt;database().metadata());
-        }
-        completionCallback();
-    };
-
-    m_transaction-&gt;database().serverConnection().changeDatabaseVersion(*m_transaction, *this, operationCallback);
-}
-
-void CreateObjectStoreAbortOperation::perform()
-{
-    LOG(StorageAPI, &quot;CreateObjectStoreAbortOperation&quot;);
-    m_transaction-&gt;database().removeObjectStore(m_objectStoreID);
-}
-
-void DeleteObjectStoreAbortOperation::perform()
-{
-    LOG(StorageAPI, &quot;DeleteObjectStoreAbortOperation&quot;);
-    m_transaction-&gt;database().addObjectStore(m_objectStoreMetadata, IDBObjectStoreMetadata::InvalidId);
-}
-
-void IDBDatabaseBackend::VersionChangeAbortOperation::perform()
-{
-    LOG(StorageAPI, &quot;VersionChangeAbortOperation&quot;);
-    m_transaction-&gt;database().setCurrentVersion(m_previousIntVersion);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,471 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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 IDBTransactionBackendOperations_h
-#define IDBTransactionBackendOperations_h
-
-#include &quot;IDBDatabaseBackend.h&quot;
-#include &quot;IDBOperation.h&quot;
-#include &quot;IDBTransactionBackend.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBServerConnection;
-
-class CreateObjectStoreOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-    {
-        return adoptRef(*new CreateObjectStoreOperation(transaction, objectStoreMetadata));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    const IDBObjectStoreMetadata&amp; objectStoreMetadata() const { return m_objectStoreMetadata; }
-
-private:
-    CreateObjectStoreOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreMetadata(objectStoreMetadata)
-    {
-    }
-    
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const IDBObjectStoreMetadata m_objectStoreMetadata;
-};
-
-class DeleteObjectStoreOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-    {
-        return adoptRef(*new DeleteObjectStoreOperation(transaction, objectStoreMetadata));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
-    const IDBObjectStoreMetadata&amp; objectStoreMetadata() const { return m_objectStoreMetadata; }
-
-private:
-    DeleteObjectStoreOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreMetadata(objectStoreMetadata)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const IDBObjectStoreMetadata m_objectStoreMetadata;
-};
-
-class IDBDatabaseBackend::VersionChangeOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t version, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks)
-    {
-        return adoptRef(*new VersionChangeOperation(transaction, version, callbacks, databaseCallbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
-    int64_t version() const { return m_version; }
-    IDBDatabaseCallbacks* databaseCallbacks() const { return m_databaseCallbacks.get(); }
-
-private:
-    VersionChangeOperation(IDBTransactionBackend* transaction, int64_t version, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks)
-        : m_transaction(transaction)
-        , m_version(version)
-        , m_callbacks(callbacks)
-        , m_databaseCallbacks(databaseCallbacks)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    int64_t m_version;
-    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
-};
-
-class CreateObjectStoreAbortOperation : public IDBSynchronousOperation {
-public:
-    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId)
-    {
-        return adoptRef(*new CreateObjectStoreAbortOperation(transaction, objectStoreId));
-    }
-    virtual void perform() override final;
-private:
-    CreateObjectStoreAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-};
-
-class DeleteObjectStoreAbortOperation : public IDBSynchronousOperation {
-public:
-    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore)
-    {
-        return adoptRef(*new DeleteObjectStoreAbortOperation(transaction, objectStore));
-    }
-    virtual void perform() override final;
-private:
-    DeleteObjectStoreAbortOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreMetadata(objectStoreMetadata)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    IDBObjectStoreMetadata m_objectStoreMetadata;
-};
-
-class IDBDatabaseBackend::VersionChangeAbortOperation : public IDBSynchronousOperation {
-public:
-    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, const String&amp; previousVersion, int64_t previousIntVersion)
-    {
-        return adoptRef(*new VersionChangeAbortOperation(transaction, previousVersion, previousIntVersion));
-    }
-    virtual void perform() override final;
-private:
-    VersionChangeAbortOperation(IDBTransactionBackend* transaction, const String&amp; previousVersion, int64_t previousIntVersion)
-        : m_transaction(transaction)
-        , m_previousVersion(previousVersion)
-        , m_previousIntVersion(previousIntVersion)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    String m_previousVersion;
-    int64_t m_previousIntVersion;
-};
-
-class CreateIndexOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-    {
-        return adoptRef(*new CreateIndexOperation(transaction, objectStoreId, indexMetadata));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    const IDBIndexMetadata&amp; idbIndexMetadata() const { return m_indexMetadata; }
-
-private:
-    CreateIndexOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexMetadata(indexMetadata)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const IDBIndexMetadata m_indexMetadata;
-};
-
-class CreateIndexAbortOperation : public IDBSynchronousOperation {
-public:
-    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId)
-    {
-        return adoptRef(*new CreateIndexAbortOperation(transaction, objectStoreId, indexId));
-    }
-    virtual void perform() override final;
-private:
-    CreateIndexAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexID(indexId)
-    {
-    }
-
-    const RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const int64_t m_indexID;
-};
-
-class DeleteIndexOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-    {
-        return adoptRef(*new DeleteIndexOperation(transaction, objectStoreId, indexMetadata));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    const IDBIndexMetadata&amp; idbIndexMetadata() const { return m_indexMetadata; }
-
-private:
-    DeleteIndexOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexMetadata(indexMetadata)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const IDBIndexMetadata m_indexMetadata;
-};
-
-class DeleteIndexAbortOperation : public IDBSynchronousOperation {
-public:
-    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-    {
-        return adoptRef(*new DeleteIndexAbortOperation(transaction, objectStoreId, indexMetadata));
-    }
-    virtual void perform() override final;
-private:
-    DeleteIndexAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexMetadata(indexMetadata)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const IDBIndexMetadata m_indexMetadata;
-};
-
-class GetOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new GetOperation(transaction, metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    int64_t indexID() const { return m_indexID; }
-    IndexedDB::CursorType cursorType() const { return m_cursorType; }
-    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
-    bool autoIncrement() const { return m_autoIncrement; }
-    IDBKeyPath keyPath() const { return m_keyPath; }
-
-private:
-    GetOperation(IDBTransactionBackend* transaction, const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexID(indexId)
-        , m_keyPath(metadata.objectStores.get(objectStoreId).keyPath)
-        , m_autoIncrement(metadata.objectStores.get(objectStoreId).autoIncrement)
-        , m_keyRange(keyRange)
-        , m_cursorType(cursorType)
-        , m_callbacks(callbacks)
-    {
-        ASSERT(metadata.objectStores.contains(objectStoreId));
-        ASSERT(metadata.objectStores.get(objectStoreId).id == objectStoreId);
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const int64_t m_indexID;
-    const IDBKeyPath m_keyPath;
-    const bool m_autoIncrement;
-    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
-    const IndexedDB::CursorType m_cursorType;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-class PutOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
-    {
-        return adoptRef(*new PutOperation(transaction, objectStore, value, key, putMode, callbacks, indexIds, indexKeys));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    IDBDatabaseBackend::PutMode putMode() const { return m_putMode; }
-    const IDBObjectStoreMetadata&amp; objectStore() const { return m_objectStore; }
-    IDBKey* key() const { return m_key.get(); }
-    const Vector&lt;int64_t&gt;&amp; indexIDs() const { return m_indexIDs; }
-    const Vector&lt;IndexKeys&gt;&amp; indexKeys() const { return m_indexKeys; }
-    SharedBuffer* value() const { return m_value.get(); }
-
-private:
-    PutOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore, PassRefPtr&lt;SharedBuffer&gt;&amp; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
-        : m_transaction(transaction)
-        , m_objectStore(objectStore)
-        , m_value(value)
-        , m_key(key)
-        , m_putMode(putMode)
-        , m_callbacks(callbacks)
-        , m_indexIDs(indexIds)
-        , m_indexKeys(indexKeys)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const IDBObjectStoreMetadata m_objectStore;
-    const RefPtr&lt;SharedBuffer&gt; m_value;
-    const RefPtr&lt;IDBKey&gt; m_key;
-    const IDBDatabaseBackend::PutMode m_putMode;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-    const Vector&lt;int64_t&gt; m_indexIDs;
-    const Vector&lt;IndexKeys&gt; m_indexKeys;
-};
-
-class SetIndexesReadyOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, size_t indexCount)
-    {
-        return adoptRef(*new SetIndexesReadyOperation(transaction, indexCount));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-private:
-    SetIndexesReadyOperation(IDBTransactionBackend* transaction, size_t indexCount)
-        : m_transaction(transaction)
-        , m_indexCount(indexCount)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const size_t m_indexCount;
-};
-
-class OpenCursorOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new OpenCursorOperation(transaction, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t transactionID() const { return m_transaction-&gt;id(); }
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    int64_t indexID() const { return m_indexID; }
-    IndexedDB::CursorDirection direction() const { return m_direction; }
-    IndexedDB::CursorType cursorType() const { return m_cursorType; }
-    IDBDatabaseBackend::TaskType taskType() const { return m_taskType; }
-    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
-    IndexedDB::CursorDirection cursorDirection() const { return m_direction; }
-
-private:
-    OpenCursorOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexID(indexId)
-        , m_keyRange(keyRange)
-        , m_direction(direction)
-        , m_cursorType(cursorType)
-        , m_taskType(taskType)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const int64_t m_indexID;
-    const PassRefPtr&lt;IDBKeyRange&gt; m_keyRange;
-    const IndexedDB::CursorDirection m_direction;
-    const IndexedDB::CursorType m_cursorType;
-    const IDBDatabaseBackend::TaskType m_taskType;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-class CountOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new CountOperation(transaction, objectStoreId, indexId, keyRange, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    int64_t indexID() const { return m_indexID; }
-    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
-
-private:
-    CountOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_indexID(indexId)
-        , m_keyRange(keyRange)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const int64_t m_indexID;
-    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-class DeleteRangeOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new DeleteRangeOperation(transaction, objectStoreId, keyRange, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    int64_t objectStoreID() const { return m_objectStoreID; }
-    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
-
-private:
-    DeleteRangeOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_keyRange(keyRange)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-class ClearObjectStoreOperation : public IDBOperation {
-public:
-    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-    {
-        return adoptRef(*new ClearObjectStoreOperation(transaction, objectStoreId, callbacks));
-    }
-    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
-
-    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
-    int64_t objectStoreID() const { return m_objectStoreID; }
-
-private:
-    ClearObjectStoreOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
-        : m_transaction(transaction)
-        , m_objectStoreID(objectStoreId)
-        , m_callbacks(callbacks)
-    {
-    }
-
-    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
-    const int64_t m_objectStoreID;
-    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBTransactionBackendOperations_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,118 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBTransactionCoordinator.h&quot;
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &quot;IDBDatabaseCallbacks.h&quot;
-#include &quot;IDBTransactionBackend.h&quot;
-
-namespace WebCore {
-
-IDBTransactionCoordinator::IDBTransactionCoordinator()
-{
-}
-
-IDBTransactionCoordinator::~IDBTransactionCoordinator()
-{
-}
-
-void IDBTransactionCoordinator::didCreateTransaction(IDBTransactionBackend* transaction)
-{
-    ASSERT(!m_transactions.contains(transaction));
-    m_transactions.add(transaction, transaction);
-}
-
-void IDBTransactionCoordinator::didStartTransaction(IDBTransactionBackend* transaction)
-{
-    ASSERT(m_transactions.contains(transaction));
-
-    m_queuedTransactions.add(transaction);
-    processStartedTransactions();
-}
-
-void IDBTransactionCoordinator::didFinishTransaction(IDBTransactionBackend* transaction)
-{
-    ASSERT(m_transactions.contains(transaction));
-
-    if (m_queuedTransactions.contains(transaction)) {
-        ASSERT(!m_startedTransactions.contains(transaction));
-        m_queuedTransactions.remove(transaction);
-    } else if (m_startedTransactions.contains(transaction))
-        m_startedTransactions.remove(transaction);
-
-    m_transactions.remove(transaction);
-
-    processStartedTransactions();
-}
-
-#ifndef NDEBUG
-// Verifies internal consistiency while returning whether anything is found.
-bool IDBTransactionCoordinator::isActive(IDBTransactionBackend* transaction)
-{
-    bool found = false;
-    if (m_queuedTransactions.contains(transaction))
-        found = true;
-    if (m_startedTransactions.contains(transaction)) {
-        ASSERT(!found);
-        found = true;
-    }
-    ASSERT(found == m_transactions.contains(transaction));
-    return found;
-}
-#endif
-
-void IDBTransactionCoordinator::processStartedTransactions()
-{
-    if (m_queuedTransactions.isEmpty())
-        return;
-
-    ASSERT(m_startedTransactions.isEmpty() || (*m_startedTransactions.begin())-&gt;mode() != IndexedDB::TransactionMode::VersionChange);
-
-    ListHashSet&lt;IDBTransactionBackend*&gt;::const_iterator it = m_queuedTransactions.begin();
-    while (it != m_queuedTransactions.end()) {
-        IDBTransactionBackend* transaction = *it;
-        ++it;
-        if (canRunTransaction(transaction)) {
-            m_queuedTransactions.remove(transaction);
-            m_startedTransactions.add(transaction);
-            transaction-&gt;run();
-        }
-    }
-}
-
-bool IDBTransactionCoordinator::canRunTransaction(IDBTransactionBackend* transaction)
-{
-    ASSERT(m_queuedTransactions.contains(transaction));
-
-    UNUSED_PARAM(transaction);
-    return !m_startedTransactions.size();
-}
-
-};
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBTransactionCoordinator_h
-#define IDBTransactionCoordinator_h
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include &lt;memory&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/ListHashSet.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WebCore {
-
-class IDBTransactionBackend;
-
-// Transactions are executed in the order the were created.
-class IDBTransactionCoordinator {
-public:
-    IDBTransactionCoordinator();
-    virtual ~IDBTransactionCoordinator();
-
-    // Called by transactions as they start and finish.
-    void didCreateTransaction(IDBTransactionBackend*);
-    void didOpenBackingStoreTransaction(IDBTransactionBackend*);
-    void didStartTransaction(IDBTransactionBackend*);
-    void didFinishTransaction(IDBTransactionBackend*);
-
-#ifndef NDEBUG
-    bool isActive(IDBTransactionBackend*);
-#endif
-
-private:
-    void processStartedTransactions();
-    bool canRunTransaction(IDBTransactionBackend*);
-
-    // This is just an efficient way to keep references to all transactions.
-    HashMap&lt;IDBTransactionBackend*, RefPtr&lt;IDBTransactionBackend&gt; &gt; m_transactions;
-    // Transactions in different states are grouped below.
-    ListHashSet&lt;IDBTransactionBackend*&gt; m_queuedTransactions;
-    HashSet&lt;IDBTransactionBackend*&gt; m_startedTransactions;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
-#endif // IDBTransactionCoordinator_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="lines">@@ -30,22 +30,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-IDBVersionChangeEvent::IDBVersionChangeEvent(unsigned long long oldVersion, unsigned long long newVersion, const AtomicString&amp; eventType)
-    : Event(eventType, false /*canBubble*/, false /*cancelable*/)
-    , m_oldVersion(oldVersion)
-    , m_newVersion(newVersion)
</del><ins>+IDBVersionChangeEvent::IDBVersionChangeEvent(const AtomicString&amp; name)
+    : Event(name, false /*canBubble*/, false /*cancelable*/)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBVersionChangeEvent::~IDBVersionChangeEvent()
-{
-}
-
-EventInterface IDBVersionChangeEvent::eventInterface() const
-{
-    return IDBVersionChangeEventInterfaceType;
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif
</del><ins>+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="cx">  * are met:
</span><ins>+ * 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.
</ins><span class="cx">  *
</span><del>- * 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
</del><ins>+ * 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.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #ifndef IDBVersionChangeEvent_h
</span><span class="lines">@@ -29,7 +29,6 @@
</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;IndexedDB.h&quot;
</del><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -38,23 +37,13 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBVersionChangeEvent : public Event {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;IDBVersionChangeEvent&gt; create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, const AtomicString&amp; eventType = AtomicString())
-    {
-        return adoptRef(*new IDBVersionChangeEvent(oldVersion, newVersion, eventType));
-    }
</del><ins>+    virtual ~IDBVersionChangeEvent() { }
</ins><span class="cx"> 
</span><del>-    virtual ~IDBVersionChangeEvent();
</del><ins>+    virtual uint64_t oldVersion() const = 0;
+    virtual uint64_t newVersion() const = 0;
</ins><span class="cx"> 
</span><del>-    virtual unsigned long long oldVersion() { return m_oldVersion; }
-    virtual unsigned long long newVersion() { return m_newVersion; }
-
-    virtual EventInterface eventInterface() const;
-
-private:
-    IDBVersionChangeEvent(unsigned long long oldVersion, unsigned long long newVersion, const AtomicString&amp; eventType);
-
-    unsigned long long m_oldVersion;
-    unsigned long long m_newVersion;
</del><ins>+protected:
+    IDBVersionChangeEvent(const AtomicString&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBCallbackshfromrev189745trunkSourceWebCoreModulesindexeddbIDBCallbacksh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCallbacks.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCallbacks.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCallbacks.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCallbacks.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCallbacks_h
+#define IDBCallbacks_h
+
+#include &quot;IDBDatabaseError.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+class DOMStringList;
+class IDBCursorBackend;
+class IDBDatabaseBackend;
+class SharedBuffer;
+
+struct IDBDatabaseMetadata;
+
+class IDBCallbacks : public RefCounted&lt;IDBCallbacks&gt; {
+public:
+    virtual ~IDBCallbacks() { }
+
+    virtual void onError(PassRefPtr&lt;IDBDatabaseError&gt;) = 0;
+    // From IDBFactory.webkitGetDatabaseNames()
+    virtual void onSuccess(PassRefPtr&lt;DOMStringList&gt;) = 0;
+    // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor()
+    virtual void onSuccess(PassRefPtr&lt;IDBCursorBackend&gt;) = 0;
+    // From IDBObjectStore.add()/put(), IDBIndex.getKey()
+    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;) = 0;
+    // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yield null/undefined.
+    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;) = 0;
+    // From IDBObjectStore/IDBIndex.get() (with key injection)
+    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, const IDBKeyPath&amp;) = 0;
+    // From IDBObjectStore/IDBIndex.count()
+    virtual void onSuccess(int64_t value) = 0;
+
+    // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObjectStore.delete(), IDBObjectStore.clear()
+    virtual void onSuccess() = 0;
+
+    // From IDBCursor.advance()/continue()
+    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;) = 0;
+
+    // From IDBFactory.open()/deleteDatabase()
+    virtual void onBlocked(uint64_t /* existingVersion */) { ASSERT_NOT_REACHED(); }
+    // From IDBFactory.open()
+    virtual void onUpgradeNeeded(uint64_t /* oldVersion */, PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) { ASSERT_NOT_REACHED(); }
+    virtual void onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) { ASSERT_NOT_REACHED(); }
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBCallbacks_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorBackendcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBCursorBackend.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCallbacks.h&quot;
+#include &quot;IDBCursorBackendOperations.h&quot;
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseError.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBOperation.h&quot;
+#include &quot;IDBServerConnection.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;SharedBuffer.h&quot;
+
+namespace WebCore {
+
+IDBCursorBackend::IDBCursorBackend(int64_t cursorID, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
+    : m_taskType(taskType)
+    , m_cursorType(cursorType)
+    , m_transaction(&amp;transaction)
+    , m_objectStoreID(objectStoreID)
+    , m_cursorID(cursorID)
+    , m_savedCursorID(0)
+    , m_closed(false)
+{
+    m_transaction-&gt;registerOpenCursor(this);
+}
+
+IDBCursorBackend::~IDBCursorBackend()
+{
+    m_transaction-&gt;unregisterOpenCursor(this);
+}
+
+void IDBCursorBackend::continueFunction(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
+{
+    LOG(StorageAPI, &quot;IDBCursorBackend::continue&quot;);
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    m_transaction-&gt;scheduleTask(m_taskType, CursorIterationOperation::create(this, key, callbacks));
+}
+
+void IDBCursorBackend::advance(unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
+{
+    LOG(StorageAPI, &quot;IDBCursorBackend::advance&quot;);
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    m_transaction-&gt;scheduleTask(CursorAdvanceOperation::create(this, count, callbacks));
+}
+
+void IDBCursorBackend::deleteFunction(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, ExceptionCode&amp;)
+{
+    LOG(StorageAPI, &quot;IDBCursorBackend::delete&quot;);
+    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::create(primaryKey());
+    m_transaction-&gt;database().deleteRange(m_transaction-&gt;id(), m_objectStoreID, keyRange.release(), prpCallbacks);
+}
+
+void IDBCursorBackend::close()
+{
+    LOG(StorageAPI, &quot;IDBCursorBackend::close&quot;);
+    clear();
+    m_closed = true;
+    m_savedCursorID = 0;
+}
+
+void IDBCursorBackend::updateCursorData(IDBKey* key, IDBKey* primaryKey, SharedBuffer* valueBuffer)
+{
+    m_currentKey = key;
+    m_currentPrimaryKey = primaryKey;
+    m_currentValueBuffer = valueBuffer;
+}
+
+void IDBCursorBackend::clear()
+{
+    m_cursorID = 0;
+    m_currentKey = nullptr;
+    m_currentPrimaryKey = nullptr;
+    m_currentValueBuffer = nullptr;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendhfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackend.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCursorBackend_h
+#define IDBCursorBackend_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBTransactionBackend.h&quot;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class IDBKeyRange;
+class SharedBuffer;
+
+class IDBCursorBackend : public RefCounted&lt;IDBCursorBackend&gt; {
+public:
+    static Ref&lt;IDBCursorBackend&gt; create(int64_t cursorID, IndexedDB::CursorType cursorType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
+    {
+        return adoptRef(*new IDBCursorBackend(cursorID, cursorType, IDBDatabaseBackend::NormalTask, transaction, objectStoreID));
+    }
+    static Ref&lt;IDBCursorBackend&gt; create(int64_t cursorID, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend&amp; transaction, int64_t objectStoreID)
+    {
+        return adoptRef(*new IDBCursorBackend(cursorID, cursorType, taskType, transaction, objectStoreID));
+    }
+    ~IDBCursorBackend();
+
+    void advance(unsigned long, PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
+    void continueFunction(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
+    void deleteFunction(PassRefPtr&lt;IDBCallbacks&gt;, ExceptionCode&amp;);
+    void postSuccessHandlerCallback() { }
+
+    IDBKey* key() const { return m_currentKey.get(); }
+    IDBKey* primaryKey() const { return m_currentPrimaryKey.get(); }
+    SharedBuffer* valueBuffer() const { return (m_cursorType == IndexedDB::CursorType::KeyOnly) ? nullptr : m_currentValueBuffer.get(); }
+    void updateCursorData(IDBKey*, IDBKey* primaryKey, SharedBuffer* valueBuffer);
+
+    void close();
+
+    IndexedDB::CursorType cursorType() const { return m_cursorType; }
+
+    int64_t id() const { return m_cursorID; }
+
+    IDBTransactionBackend&amp; transaction() { return *m_transaction; }
+
+    void clear();
+    void setSavedCursorID(int64_t cursorID) { m_savedCursorID = cursorID; }
+
+private:
+    IDBCursorBackend(int64_t cursorID, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, IDBTransactionBackend&amp;, int64_t objectStoreID);
+
+    IDBDatabaseBackend::TaskType m_taskType;
+    IndexedDB::CursorType m_cursorType;
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+
+    int64_t m_cursorID;
+    int64_t m_savedCursorID;
+
+    RefPtr&lt;IDBKey&gt; m_currentKey;
+    RefPtr&lt;IDBKey&gt; m_currentPrimaryKey;
+    RefPtr&lt;SharedBuffer&gt; m_currentValueBuffer;
+
+    bool m_closed;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBCursorBackend_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendOperationscppfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBCursorBackendOperations.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBServerConnection.h&quot;
+#include &quot;Logging.h&quot;
+
+namespace WebCore {
+
+void CursorAdvanceOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;CursorAdvanceOperation&quot;);
+
+    RefPtr&lt;CursorAdvanceOperation&gt; operation(this);
+    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
+        if (error) {
+            m_cursor-&gt;clear();
+            m_callbacks-&gt;onError(error);
+        } else if (!key) {
+            // If there's no error but also no key, then the cursor reached the end.
+            m_cursor-&gt;clear();
+            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
+        } else {
+            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
+            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
+        }
+
+        // FIXME: Cursor operations should be able to pass along an error instead of success
+        completionCallback();
+    };
+
+    m_cursor-&gt;transaction().database().serverConnection().cursorAdvance(*m_cursor, *this, callback);
+}
+
+void CursorIterationOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;CursorIterationOperation&quot;);
+
+    RefPtr&lt;CursorIterationOperation&gt; operation(this);
+    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
+        if (error) {
+            m_cursor-&gt;clear();
+            m_callbacks-&gt;onError(error);
+        } else if (!key) {
+            // If there's no error but also no key, then the cursor reached the end.
+            m_cursor-&gt;clear();
+            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
+        } else {
+            m_cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
+            m_callbacks-&gt;onSuccess(key, primaryKey, valueBuffer);
+        }
+
+        // FIXME: Cursor operations should be able to pass along an error instead of success
+        completionCallback();
+    };
+
+    m_cursor-&gt;transaction().database().serverConnection().cursorIterate(*m_cursor, *this, callback);
+}
+
+} // namespace WebCore
+
+#endif // ENABLED(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBCursorBackendOperationshfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorBackendOperationsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBCursorBackendOperations.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBCursorBackendOperations_h
+#define IDBCursorBackendOperations_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBOperation.h&quot;
+
+namespace WebCore {
+
+class CursorIterationOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(PassRefPtr&lt;IDBCursorBackend&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new CursorIterationOperation(cursor, key, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; completionCallback) override final;
+
+    int64_t cursorID() const { return m_cursor-&gt;id(); }
+    IDBKey* key() const { return m_key.get(); }
+
+private:
+    CursorIterationOperation(PassRefPtr&lt;IDBCursorBackend&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_cursor(cursor)
+        , m_key(key)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBCursorBackend&gt; m_cursor;
+    RefPtr&lt;IDBKey&gt; m_key;
+    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+class CursorAdvanceOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(PassRefPtr&lt;IDBCursorBackend&gt; cursor, unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new CursorAdvanceOperation(cursor, count, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; completionCallback) override final;
+
+    int64_t cursorID() const { return m_cursor-&gt;id(); }
+    unsigned long count() const { return m_count; }
+
+private:
+    CursorAdvanceOperation(PassRefPtr&lt;IDBCursorBackend&gt; cursor, unsigned long count, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_cursor(cursor)
+        , m_count(count)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBCursorBackend&gt; m_cursor;
+    unsigned long m_count;
+    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBCursorBackendOperations_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseBackendcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,622 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBDatabaseBackend.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBFactoryBackendInterface.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBRecordIdentifier.h&quot;
+#include &quot;IDBServerConnection.h&quot;
+#include &quot;IDBTransactionBackend.h&quot;
+#include &quot;IDBTransactionCoordinator.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;SharedBuffer.h&quot;
+#include &lt;wtf/TemporaryChange.h&gt;
+
+namespace WebCore {
+
+Ref&lt;IDBDatabaseBackend&gt; IDBDatabaseBackend::create(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface* factory, IDBServerConnection&amp; serverConnection)
+{
+    Ref&lt;IDBDatabaseBackend&gt; backend = adoptRef(*new IDBDatabaseBackend(name, uniqueIdentifier, factory, serverConnection));
+    backend-&gt;openInternalAsync();
+    
+    return backend;
+}
+
+IDBDatabaseBackend::IDBDatabaseBackend(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface* factory, IDBServerConnection&amp; serverConnection)
+    : m_metadata(name, InvalidId, 0, InvalidId)
+    , m_identifier(uniqueIdentifier)
+    , m_factory(factory)
+    , m_serverConnection(serverConnection)
+    , m_transactionCoordinator(std::make_unique&lt;IDBTransactionCoordinator&gt;())
+    , m_closingConnection(false)
+    , m_didOpenInternal(false)
+{
+    ASSERT(!m_metadata.name.isNull());
+}
+
+void IDBDatabaseBackend::addObjectStore(const IDBObjectStoreMetadata&amp; objectStore, int64_t newMaxObjectStoreId)
+{
+    ASSERT(!m_metadata.objectStores.contains(objectStore.id));
+    if (newMaxObjectStoreId != IDBObjectStoreMetadata::InvalidId) {
+        ASSERT(m_metadata.maxObjectStoreId &lt; newMaxObjectStoreId);
+        m_metadata.maxObjectStoreId = newMaxObjectStoreId;
+    }
+    m_metadata.objectStores.set(objectStore.id, objectStore);
+}
+
+void IDBDatabaseBackend::removeObjectStore(int64_t objectStoreId)
+{
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    m_metadata.objectStores.remove(objectStoreId);
+}
+
+void IDBDatabaseBackend::addIndex(int64_t objectStoreId, const IDBIndexMetadata&amp; index, int64_t newMaxIndexId)
+{
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
+
+    ASSERT(!objectStore.indexes.contains(index.id));
+    objectStore.indexes.set(index.id, index);
+    if (newMaxIndexId != IDBIndexMetadata::InvalidId) {
+        ASSERT(objectStore.maxIndexId &lt; newMaxIndexId);
+        objectStore.maxIndexId = newMaxIndexId;
+    }
+    m_metadata.objectStores.set(objectStoreId, objectStore);
+}
+
+void IDBDatabaseBackend::removeIndex(int64_t objectStoreId, int64_t indexId)
+{
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
+
+    ASSERT(objectStore.indexes.contains(indexId));
+    objectStore.indexes.remove(indexId);
+    m_metadata.objectStores.set(objectStoreId, objectStore);
+}
+
+void IDBDatabaseBackend::openInternalAsync()
+{
+    RefPtr&lt;IDBDatabaseBackend&gt; self = this;
+    m_serverConnection-&gt;getOrEstablishIDBDatabaseMetadata([self](const IDBDatabaseMetadata&amp; metadata, bool success) {
+        self-&gt;didOpenInternalAsync(metadata, success);
+    });
+}
+
+void IDBDatabaseBackend::didOpenInternalAsync(const IDBDatabaseMetadata&amp; metadata, bool success)
+{
+    m_didOpenInternal = true;
+
+    if (!success) {
+        processPendingOpenCalls(false);
+        return;
+    }
+
+    m_metadata = metadata;
+
+    processPendingCalls();
+}
+
+IDBDatabaseBackend::~IDBDatabaseBackend()
+{
+    m_factory-&gt;removeIDBDatabaseBackend(m_identifier);
+}
+
+void IDBDatabaseBackend::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::createObjectStore&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
+
+    ASSERT(!m_metadata.objectStores.contains(objectStoreId));
+    IDBObjectStoreMetadata objectStoreMetadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
+
+    transaction-&gt;scheduleCreateObjectStoreOperation(objectStoreMetadata);
+    addObjectStore(objectStoreMetadata, objectStoreId);
+}
+
+void IDBDatabaseBackend::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteObjectStore&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
+
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    const IDBObjectStoreMetadata&amp; objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
+
+    transaction-&gt;scheduleDeleteObjectStoreOperation(objectStoreMetadata);
+    removeObjectStore(objectStoreId);
+}
+
+void IDBDatabaseBackend::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::createIndex&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
+
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
+
+    ASSERT(!objectStore.indexes.contains(indexId));
+    const IDBIndexMetadata indexMetadata(name, indexId, keyPath, unique, multiEntry);
+
+    transaction-&gt;scheduleCreateIndexOperation(objectStoreId, indexMetadata);
+
+    addIndex(objectStoreId, indexMetadata, indexId);
+}
+
+void IDBDatabaseBackend::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteIndex&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
+
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    const IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
+
+    ASSERT(objectStore.indexes.contains(indexId));
+    const IDBIndexMetadata&amp; indexMetadata = objectStore.indexes.get(indexId);
+
+    transaction-&gt;scheduleDeleteIndexOperation(objectStoreId, indexMetadata);
+
+    removeIndex(objectStoreId, indexId);
+}
+
+void IDBDatabaseBackend::commit(int64_t transactionId)
+{
+    // The frontend suggests that we commit, but we may have previously initiated an abort, and so have disposed of the transaction. onAbort has already been dispatched to the frontend, so it will find out about that asynchronously.
+    if (m_transactions.contains(transactionId))
+        m_transactions.get(transactionId)-&gt;commit();
+}
+
+void IDBDatabaseBackend::abort(int64_t transactionId)
+{
+    // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
+    if (m_transactions.contains(transactionId))
+        m_transactions.get(transactionId)-&gt;abort();
+}
+
+void IDBDatabaseBackend::abort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
+{
+    // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
+    if (m_transactions.contains(transactionId))
+        m_transactions.get(transactionId)-&gt;abort(error);
+}
+
+void IDBDatabaseBackend::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, bool keyOnly, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::get&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+
+    transaction-&gt;scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, callbacks);
+}
+
+void IDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::put&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
+
+    const IDBObjectStoreMetadata objectStoreMetadata = m_metadata.objectStores.get(objectStoreId);
+
+    ASSERT(objectStoreMetadata.autoIncrement || key.get());
+
+    transaction-&gt;schedulePutOperation(objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys);
+}
+
+void IDBDatabaseBackend::setIndexKeys(int64_t transactionID, int64_t objectStoreID, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const Vector&lt;int64_t, 1&gt;&amp; indexIDs, const Vector&lt;IndexKeys, 1&gt;&amp; indexKeys)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::setIndexKeys&quot;);
+    ASSERT(prpPrimaryKey);
+    ASSERT(m_metadata.objectStores.contains(objectStoreID));
+
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionID);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange);
+
+    RefPtr&lt;IDBKey&gt; primaryKey = prpPrimaryKey;
+    m_serverConnection-&gt;setIndexKeys(transactionID, m_metadata.id, objectStoreID, m_metadata.objectStores.get(objectStoreID), *primaryKey, indexIDs, indexKeys, [transaction](PassRefPtr&lt;IDBDatabaseError&gt; error) {
+        if (error)
+            transaction-&gt;abort(error);
+    });
+}
+
+void IDBDatabaseBackend::setIndexesReady(int64_t transactionId, int64_t, const Vector&lt;int64_t, 1&gt;&amp; indexIds)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::setIndexesReady&quot;);
+
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+
+    transaction-&gt;scheduleSetIndexesReadyOperation(indexIds.size());
+}
+
+void IDBDatabaseBackend::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::openCursor&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+
+    transaction-&gt;scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorType::KeyOnly : IndexedDB::CursorType::KeyAndValue, taskType, callbacks);
+}
+
+void IDBDatabaseBackend::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::count&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+
+    ASSERT(m_metadata.objectStores.contains(objectStoreId));
+    transaction-&gt;scheduleCountOperation(objectStoreId, indexId, keyRange, callbacks);
+}
+
+
+void IDBDatabaseBackend::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::deleteRange&quot;);
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
+
+    transaction-&gt;scheduleDeleteRangeOperation(objectStoreId, keyRange, callbacks);
+}
+
+void IDBDatabaseBackend::clearObjectStore(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    LOG(StorageAPI, &quot;IDBDatabaseBackend::clearObjectStore %lli in transaction %lli&quot;, static_cast&lt;long long&gt;(objectStoreId), static_cast&lt;long long&gt;(transactionId));
+    IDBTransactionBackend* transaction = m_transactions.get(transactionId);
+    if (!transaction)
+        return;
+    ASSERT(transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
+
+    transaction-&gt;scheduleClearObjectStoreOperation(objectStoreId, callbacks);
+}
+
+void IDBDatabaseBackend::transactionStarted(IDBTransactionBackend* transaction)
+{
+    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
+        ASSERT(!m_runningVersionChangeTransaction);
+        m_runningVersionChangeTransaction = transaction;
+    }
+}
+
+void IDBDatabaseBackend::transactionFinished(IDBTransactionBackend* rawTransaction)
+{
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
+    ASSERT(m_transactions.contains(transaction-&gt;id()));
+    ASSERT(m_transactions.get(transaction-&gt;id()) == transaction.get());
+    m_transactions.remove(transaction-&gt;id());
+    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
+        ASSERT(transaction.get() == m_runningVersionChangeTransaction.get());
+        m_runningVersionChangeTransaction = nullptr;
+    }
+}
+
+void IDBDatabaseBackend::transactionFinishedAndAbortFired(IDBTransactionBackend* rawTransaction)
+{
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
+    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange) {
+        // If this was an open-with-version call, there will be a &quot;second
+        // half&quot; open call waiting for us in processPendingCalls.
+        // FIXME: When we no longer support setVersion, assert such a thing.
+        if (m_pendingSecondHalfOpen) {
+            m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;Version change transaction was aborted in upgradeneeded event handler.&quot;));
+            m_pendingSecondHalfOpen = nullptr;
+        }
+        processPendingCalls();
+    }
+}
+
+void IDBDatabaseBackend::transactionFinishedAndCompleteFired(IDBTransactionBackend* rawTransaction)
+{
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = rawTransaction;
+    if (transaction-&gt;mode() == IndexedDB::TransactionMode::VersionChange)
+        processPendingCalls();
+}
+
+size_t IDBDatabaseBackend::connectionCount()
+{
+    // This does not include pending open calls, as those should not block version changes and deletes.
+    return m_databaseCallbacksSet.size();
+}
+
+void IDBDatabaseBackend::processPendingCalls()
+{
+    // processPendingCalls() will be called again after openInternalAsync() completes.
+    if (!m_didOpenInternal)
+        return;
+
+    if (m_pendingSecondHalfOpen) {
+        ASSERT(m_pendingSecondHalfOpen-&gt;version() == m_metadata.version);
+        ASSERT(m_metadata.id != InvalidId);
+        m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onSuccess(this, this-&gt;metadata());
+        m_pendingSecondHalfOpen = nullptr;
+        // Fall through when complete, as pending deletes may be (partially) unblocked.
+    }
+
+    // Note that this check is only an optimization to reduce queue-churn and
+    // not necessary for correctness; deleteDatabase and openConnection will
+    // requeue their calls if this condition is true.
+    if (m_runningVersionChangeTransaction)
+        return;
+
+    if (!m_pendingDeleteCalls.isEmpty() &amp;&amp; isDeleteDatabaseBlocked())
+        return;
+    while (!m_pendingDeleteCalls.isEmpty()) {
+        std::unique_ptr&lt;IDBPendingDeleteCall&gt; pendingDeleteCall = m_pendingDeleteCalls.takeFirst();
+        m_deleteCallbacksWaitingCompletion.add(pendingDeleteCall-&gt;callbacks());
+        deleteDatabaseAsync(pendingDeleteCall-&gt;callbacks());
+    }
+
+    // deleteDatabaseAsync should never re-queue calls.
+    ASSERT(m_pendingDeleteCalls.isEmpty());
+
+    // If there are any database deletions waiting for completion, we're done for now.
+    // Further callbacks will be handled in a future call to processPendingCalls().
+    if (!m_deleteCallbacksWaitingCompletion.isEmpty())
+        return;
+
+    if (m_runningVersionChangeTransaction)
+        return;
+
+    processPendingOpenCalls(true);
+}
+
+void IDBDatabaseBackend::processPendingOpenCalls(bool success)
+{
+    // Open calls can be requeued if an open call started a version change transaction or deletes the database.
+    Deque&lt;std::unique_ptr&lt;IDBPendingOpenCall&gt;&gt; pendingOpenCalls;
+    m_pendingOpenCalls.swap(pendingOpenCalls);
+
+    while (!pendingOpenCalls.isEmpty()) {
+        std::unique_ptr&lt;IDBPendingOpenCall&gt; pendingOpenCall = pendingOpenCalls.takeFirst();
+        if (success) {
+            if (m_metadata.id == InvalidId) {
+                // This database was deleted then quickly re-opened.
+                // openInternalAsync() will recreate it in the backing store and then resume processing pending callbacks.
+                pendingOpenCalls.prepend(WTF::move(pendingOpenCall));
+                pendingOpenCalls.swap(m_pendingOpenCalls);
+
+                openInternalAsync();
+                return;
+            }
+            openConnectionInternal(pendingOpenCall-&gt;callbacks(), pendingOpenCall-&gt;databaseCallbacks(), pendingOpenCall-&gt;transactionId(), pendingOpenCall-&gt;version());
+        } else {
+            String message;
+            if (pendingOpenCall-&gt;version() == IDBDatabaseMetadata::NoIntVersion)
+                message = &quot;Internal error opening database with no version specified.&quot;;
+            else
+                message = String::format(&quot;Internal error opening database with version %llu&quot;, static_cast&lt;unsigned long long&gt;(pendingOpenCall-&gt;version()));
+            pendingOpenCall-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, message));
+        }
+    }
+}
+
+void IDBDatabaseBackend::createTransaction(int64_t transactionID, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIDs, IndexedDB::TransactionMode mode)
+{
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = IDBTransactionBackend::create(this, transactionID, callbacks, objectStoreIDs, mode);
+
+    ASSERT(!m_transactions.contains(transactionID));
+    m_transactions.add(transactionID, transaction.get());
+}
+
+void IDBDatabaseBackend::openConnection(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
+{
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
+
+    m_pendingOpenCalls.append(std::make_unique&lt;IDBPendingOpenCall&gt;(*callbacks, *databaseCallbacks, transactionId, version));
+
+    processPendingCalls();
+}
+
+void IDBDatabaseBackend::openConnectionInternal(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
+{
+    ASSERT(m_pendingDeleteCalls.isEmpty());
+    ASSERT(!m_runningVersionChangeTransaction);
+
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
+
+    // We infer that the database didn't exist from its lack of version.
+    bool isNewDatabase = m_metadata.version == IDBDatabaseMetadata::NoIntVersion;
+
+    if (version == IDBDatabaseMetadata::DefaultIntVersion &amp;&amp; !isNewDatabase) {
+        m_databaseCallbacksSet.add(databaseCallbacks);
+        callbacks-&gt;onSuccess(this, this-&gt;metadata());
+        return;
+    }
+
+    if (isNewDatabase &amp;&amp; version == IDBDatabaseMetadata::DefaultIntVersion) {
+        // Spec says: If no version is specified and no database exists, set database version to 1.
+        version = 1;
+    }
+
+    if (version &gt; m_metadata.version || m_metadata.version == IDBDatabaseMetadata::NoIntVersion) {
+        runIntVersionChangeTransaction(callbacks, databaseCallbacks, transactionId, version);
+        return;
+    }
+
+    if (version &lt; m_metadata.version &amp;&amp; m_metadata.version != IDBDatabaseMetadata::NoIntVersion) {
+        callbacks-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::VersionError, String::format(&quot;The requested version (%llu) is less than the existing version (%llu).&quot;, static_cast&lt;unsigned long long&gt;(version), static_cast&lt;unsigned long long&gt;(m_metadata.version))));
+        return;
+    }
+
+    ASSERT(version == m_metadata.version);
+    m_databaseCallbacksSet.add(databaseCallbacks);
+    callbacks-&gt;onSuccess(this, this-&gt;metadata());
+}
+
+void IDBDatabaseBackend::runIntVersionChangeTransaction(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
+{
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
+    ASSERT(callbacks);
+    for (auto&amp; callback : m_databaseCallbacksSet) {
+        // Front end ensures the event is not fired at connections that have closePending set.
+        if (callback != databaseCallbacks)
+            callback-&gt;onVersionChange(m_metadata.version, requestedVersion);
+    }
+    // The spec dictates we wait until all the version change events are
+    // delivered and then check m_databaseCallbacks.empty() before proceeding
+    // or firing a blocked event, but instead we should be consistent with how
+    // the old setVersion (incorrectly) did it.
+    // FIXME: Remove the call to onBlocked and instead wait until the frontend
+    // tells us that all the blocked events have been delivered. See
+    // https://bugs.webkit.org/show_bug.cgi?id=71130
+    if (connectionCount())
+        callbacks-&gt;onBlocked(m_metadata.version);
+    // FIXME: Add test for m_runningVersionChangeTransaction.
+    if (m_runningVersionChangeTransaction || connectionCount()) {
+        m_pendingOpenCalls.append(std::make_unique&lt;IDBPendingOpenCall&gt;(*callbacks, *databaseCallbacks, transactionId, requestedVersion));
+        return;
+    }
+
+    Vector&lt;int64_t&gt; objectStoreIds;
+    createTransaction(transactionId, databaseCallbacks, objectStoreIds, IndexedDB::TransactionMode::VersionChange);
+    RefPtr&lt;IDBTransactionBackend&gt; transaction = m_transactions.get(transactionId);
+
+    transaction-&gt;scheduleVersionChangeOperation(requestedVersion, callbacks, databaseCallbacks, m_metadata);
+
+    ASSERT(!m_pendingSecondHalfOpen);
+    m_databaseCallbacksSet.add(databaseCallbacks);
+}
+
+void IDBDatabaseBackend::deleteDatabase(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks)
+{
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    if (isDeleteDatabaseBlocked()) {
+        for (auto&amp; callback : m_databaseCallbacksSet) {
+            // Front end ensures the event is not fired at connections that have closePending set.
+            callback-&gt;onVersionChange(m_metadata.version, 0);
+        }
+        // FIXME: Only fire onBlocked if there are open connections after the
+        // VersionChangeEvents are received, not just set up to fire.
+        // https://bugs.webkit.org/show_bug.cgi?id=71130
+        callbacks-&gt;onBlocked(m_metadata.version);
+        m_pendingDeleteCalls.append(std::make_unique&lt;IDBPendingDeleteCall&gt;(callbacks.release()));
+        return;
+    }
+    deleteDatabaseAsync(callbacks.release());
+}
+
+bool IDBDatabaseBackend::isDeleteDatabaseBlocked()
+{
+    return connectionCount();
+}
+
+void IDBDatabaseBackend::deleteDatabaseAsync(PassRefPtr&lt;IDBCallbacks&gt; prpCallbacks)
+{
+    ASSERT(!isDeleteDatabaseBlocked());
+
+    RefPtr&lt;IDBDatabaseBackend&gt; self(this);
+    RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
+    m_serverConnection-&gt;deleteDatabase(m_metadata.name, [self, callbacks](bool success) {
+        self-&gt;m_deleteCallbacksWaitingCompletion.remove(callbacks);
+
+        // If this IDBDatabaseBackend was closed while waiting for deleteDatabase to complete, no point in performing any callbacks.
+        if (!self-&gt;m_serverConnection-&gt;isClosed())
+            return;
+
+        if (success) {
+            self-&gt;m_metadata.id = InvalidId;
+            self-&gt;m_metadata.version = IDBDatabaseMetadata::NoIntVersion;
+            self-&gt;m_metadata.objectStores.clear();
+            callbacks-&gt;onSuccess();
+        } else
+            callbacks-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error deleting database.&quot;));
+
+        self-&gt;processPendingCalls();
+    });
+}
+
+void IDBDatabaseBackend::close(PassRefPtr&lt;IDBDatabaseCallbacks&gt; prpCallbacks)
+{
+    RefPtr&lt;IDBDatabaseCallbacks&gt; callbacks = prpCallbacks;
+    ASSERT(m_databaseCallbacksSet.contains(callbacks));
+
+    m_databaseCallbacksSet.remove(callbacks);
+    if (m_pendingSecondHalfOpen &amp;&amp; m_pendingSecondHalfOpen-&gt;databaseCallbacks() == callbacks) {
+        m_pendingSecondHalfOpen-&gt;callbacks()-&gt;onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;The connection was closed.&quot;));
+        m_pendingSecondHalfOpen = nullptr;
+    }
+
+    if (connectionCount() &gt; 1)
+        return;
+
+    // processPendingCalls allows the inspector to process a pending open call
+    // and call close, reentering IDBDatabaseBackend::close. Then the
+    // backend would be removed both by the inspector closing its connection, and
+    // by the connection that first called close.
+    // To avoid that situation, don't proceed in case of reentrancy.
+    if (m_closingConnection)
+        return;
+    TemporaryChange&lt;bool&gt; closingConnection(m_closingConnection, true);
+    processPendingCalls();
+
+    // FIXME: Add a test for the m_pendingOpenCalls cases below.
+    if (!connectionCount() &amp;&amp; !m_pendingOpenCalls.size() &amp;&amp; !m_pendingDeleteCalls.size()) {
+        TransactionMap transactions(m_transactions);
+        RefPtr&lt;IDBDatabaseError&gt; error = IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Connection is closing.&quot;);
+        for (auto&amp; transaction : transactions.values())
+            transaction-&gt;abort(error);
+
+        ASSERT(m_transactions.isEmpty());
+
+        m_serverConnection-&gt;close();
+
+        // This check should only be false in unit tests.
+        ASSERT(m_factory);
+        if (m_factory)
+            m_factory-&gt;removeIDBDatabaseBackend(m_identifier);
+    }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseBackendhfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,175 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseBackend_h
+#define IDBDatabaseBackend_h
+
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBPendingDeleteCall.h&quot;
+#include &quot;IDBPendingOpenCall.h&quot;
+
+#include &lt;stdint.h&gt;
+#include &lt;wtf/Deque.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/ListHashSet.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBDatabase;
+class IDBFactoryBackendInterface;
+class IDBKey;
+class IDBKeyPath;
+class IDBServerConnection;
+class IDBTransactionBackend;
+class IDBTransactionCoordinator;
+class SharedBuffer;
+
+struct IDBDatabaseMetadata;
+struct IDBIndexMetadata;
+struct IDBObjectStoreMetadata;
+
+typedef Vector&lt;RefPtr&lt;IDBKey&gt;&gt; IndexKeys;
+typedef int ExceptionCode;
+
+class IDBDatabaseBackend : public RefCounted&lt;IDBDatabaseBackend&gt; {
+public:
+    WEBCORE_EXPORT static Ref&lt;IDBDatabaseBackend&gt; create(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface*, IDBServerConnection&amp;);
+    WEBCORE_EXPORT ~IDBDatabaseBackend();
+
+    IDBServerConnection&amp; serverConnection() { return m_serverConnection.get(); }
+
+    static const int64_t InvalidId = 0;
+    int64_t id() const { return m_metadata.id; }
+    void addObjectStore(const IDBObjectStoreMetadata&amp;, int64_t newMaxObjectStoreId);
+    void removeObjectStore(int64_t objectStoreId);
+    void addIndex(int64_t objectStoreId, const IDBIndexMetadata&amp;, int64_t newMaxIndexId);
+    void removeIndex(int64_t objectStoreId, int64_t indexId);
+
+    WEBCORE_EXPORT void openConnection(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version);
+    WEBCORE_EXPORT void deleteDatabase(PassRefPtr&lt;IDBCallbacks&gt;);
+
+    // IDBDatabaseBackend
+    void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement);
+    void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
+    void createTransaction(int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
+    void close(PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
+
+    void commit(int64_t transactionId);
+    void abort(int64_t transactionId);
+    void abort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;);
+
+    void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry);
+    void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId);
+
+    IDBTransactionCoordinator* transactionCoordinator() const { return m_transactionCoordinator.get(); }
+    void transactionStarted(IDBTransactionBackend*);
+    void transactionFinished(IDBTransactionBackend*);
+    void transactionFinishedAndCompleteFired(IDBTransactionBackend*);
+    void transactionFinishedAndAbortFired(IDBTransactionBackend*);
+
+    enum TaskType {
+        NormalTask = 0,
+        PreemptiveTask
+    };
+
+    enum PutMode {
+        AddOrUpdate,
+        AddOnly,
+        CursorUpdate
+    };
+
+    static const int64_t MinimumIndexId = 30;
+
+    void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, bool keyOnly, PassRefPtr&lt;IDBCallbacks&gt;);
+    void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt;, PutMode, PassRefPtr&lt;IDBCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp;);
+    void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const Vector&lt;int64_t, 1&gt;&amp; indexIds, const Vector&lt;IndexKeys, 1&gt;&amp;);
+    void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector&lt;int64_t, 1&gt;&amp; indexIds);
+    void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr&lt;IDBCallbacks&gt;);
+    void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
+    void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
+    void clearObjectStore(int64_t transactionId, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt;);
+
+    const IDBDatabaseMetadata&amp; metadata() const { return m_metadata; }
+    void setCurrentVersion(uint64_t version) { m_metadata.version = version; }
+
+    bool hasPendingSecondHalfOpen() { return m_pendingSecondHalfOpen.get(); }
+    void setPendingSecondHalfOpen(std::unique_ptr&lt;IDBPendingOpenCall&gt; pendingOpenCall) { m_pendingSecondHalfOpen = WTF::move(pendingOpenCall); }
+
+    IDBFactoryBackendInterface&amp; factoryBackend() { return *m_factory; }
+
+    class VersionChangeOperation;
+    class VersionChangeAbortOperation;
+
+private:
+    IDBDatabaseBackend(const String&amp; name, const String&amp; uniqueIdentifier, IDBFactoryBackendInterface*, IDBServerConnection&amp;);
+
+    void openConnectionInternal(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version);
+
+    void openInternalAsync();
+    void didOpenInternalAsync(const IDBDatabaseMetadata&amp;, bool success);
+
+    void runIntVersionChangeTransaction(PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, int64_t requestedVersion);
+    size_t connectionCount();
+    void processPendingCalls();
+    void processPendingOpenCalls(bool success);
+
+    bool isDeleteDatabaseBlocked();
+    void deleteDatabaseAsync(PassRefPtr&lt;IDBCallbacks&gt;);
+
+    IDBDatabaseMetadata m_metadata;
+
+    String m_identifier;
+
+    RefPtr&lt;IDBFactoryBackendInterface&gt; m_factory;
+    Ref&lt;IDBServerConnection&gt; m_serverConnection;
+
+    std::unique_ptr&lt;IDBTransactionCoordinator&gt; m_transactionCoordinator;
+    RefPtr&lt;IDBTransactionBackend&gt; m_runningVersionChangeTransaction;
+
+    typedef HashMap&lt;int64_t, IDBTransactionBackend*&gt; TransactionMap;
+    TransactionMap m_transactions;
+
+    Deque&lt;std::unique_ptr&lt;IDBPendingOpenCall&gt;&gt; m_pendingOpenCalls;
+    std::unique_ptr&lt;IDBPendingOpenCall&gt; m_pendingSecondHalfOpen;
+
+    Deque&lt;std::unique_ptr&lt;IDBPendingDeleteCall&gt;&gt; m_pendingDeleteCalls;
+    HashSet&lt;RefPtr&lt;IDBCallbacks&gt;&gt; m_deleteCallbacksWaitingCompletion;
+
+    typedef ListHashSet&lt;RefPtr&lt;IDBDatabaseCallbacks&gt;&gt; DatabaseCallbacksSet;
+    DatabaseCallbacksSet m_databaseCallbacksSet;
+
+    bool m_closingConnection;
+    bool m_didOpenInternal;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBDatabaseBackend_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbackshfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacks.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacks.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacks.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseCallbacks_h
+#define IDBDatabaseCallbacks_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseError.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class LegacyDatabase;
+
+class IDBDatabaseCallbacks : public RefCounted&lt;IDBDatabaseCallbacks&gt; {
+public:
+    virtual ~IDBDatabaseCallbacks() { }
+
+    virtual void onForcedClose() = 0;
+    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion) = 0;
+
+    virtual void onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;) = 0;
+    virtual void onComplete(int64_t transactionId) = 0;
+
+    virtual void connect(LegacyDatabase*) = 0;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBDatabaseCallbacks_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbacksImplcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBDatabaseCallbacksImpl.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;LegacyDatabase.h&quot;
+
+namespace WebCore {
+
+Ref&lt;IDBDatabaseCallbacksImpl&gt; IDBDatabaseCallbacksImpl::create()
+{
+    return adoptRef(*new IDBDatabaseCallbacksImpl());
+}
+
+IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl()
+    : m_database(nullptr)
+{
+}
+
+IDBDatabaseCallbacksImpl::~IDBDatabaseCallbacksImpl()
+{
+}
+
+void IDBDatabaseCallbacksImpl::onForcedClose()
+{
+    if (m_database)
+        m_database-&gt;forceClose();
+}
+
+void IDBDatabaseCallbacksImpl::onVersionChange(uint64_t oldVersion, uint64_t newVersion)
+{
+    if (m_database)
+        m_database-&gt;onVersionChange(oldVersion, newVersion);
+}
+
+void IDBDatabaseCallbacksImpl::connect(LegacyDatabase* database)
+{
+    ASSERT(!m_database);
+    ASSERT(database);
+    m_database = database;
+}
+
+void IDBDatabaseCallbacksImpl::onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
+{
+    if (m_database)
+        m_database-&gt;onAbort(transactionId, error);
+}
+
+void IDBDatabaseCallbacksImpl::onComplete(int64_t transactionId)
+{
+    if (m_database)
+        m_database-&gt;onComplete(transactionId);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBDatabaseCallbacksImplhfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseCallbacksImplh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBDatabaseCallbacksImpl_h
+#define IDBDatabaseCallbacksImpl_h
+
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class LegacyDatabase;
+
+class IDBDatabaseCallbacksImpl final : public IDBDatabaseCallbacks {
+public:
+    static Ref&lt;IDBDatabaseCallbacksImpl&gt; create();
+    virtual ~IDBDatabaseCallbacksImpl() override;
+
+    // IDBDatabaseCallbacks
+    virtual void onForcedClose() override;
+    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion) override;
+
+    virtual void onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt;) override;
+    virtual void onComplete(int64_t transactionId) override;
+
+    virtual void connect(LegacyDatabase*) override;
+
+private:
+    IDBDatabaseCallbacksImpl();
+
+    // The initial IDBOpenDBRequest or final IDBDatabase maintains a RefPtr to this
+    LegacyDatabase* m_database;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBDatabaseCallbacksImpl_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBFactoryBackendInterfacehfromrev189745trunkSourceWebCoreModulesindexeddbIDBFactoryBackendInterfaceh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBFactoryBackendInterface.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBFactoryBackendInterface.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBFactoryBackendInterface.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBFactoryBackendInterface_h
+#define IDBFactoryBackendInterface_h
+
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IndexedDB.h&quot;
+
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBCallbacks;
+class IDBCursorBackend;
+class IDBDatabase;
+class IDBDatabaseBackend;
+class IDBDatabaseCallbacks;
+class IDBTransactionBackend;
+class SecurityOrigin;
+class ScriptExecutionContext;
+
+typedef int ExceptionCode;
+
+// This class is shared by IDBFactory (async) and IDBFactorySync (sync).
+// This is implemented by IDBFactoryBackendImpl and optionally others (in order to proxy
+// calls across process barriers). All calls to these classes should be non-blocking and
+// trigger work on a background thread if necessary.
+class IDBFactoryBackendInterface : public RefCounted&lt;IDBFactoryBackendInterface&gt; {
+public:
+    virtual ~IDBFactoryBackendInterface() { }
+
+    virtual void getDatabaseNames(PassRefPtr&lt;IDBCallbacks&gt;, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin, ScriptExecutionContext*) = 0;
+    virtual void open(const String&amp; name, uint64_t version, int64_t transactionId, PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin) = 0;
+    virtual void deleteDatabase(const String&amp; name, const SecurityOrigin&amp; openingOrigin, const SecurityOrigin&amp; mainFrameOrigin, PassRefPtr&lt;IDBCallbacks&gt;, ScriptExecutionContext*) = 0;
+
+    virtual void removeIDBDatabaseBackend(const String&amp; uniqueIdentifier) = 0;
+
+};
+
+} // namespace WebCore
+
+#endif // IDBFactoryBackendInterface_h
+
+#endif // IDBFactoryBackendInterface_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBPendingDeleteCallhfromrev189745trunkSourceWebCoreModulesindexeddbIDBPendingDeleteCallh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingDeleteCall.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingDeleteCall.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingDeleteCall.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2013 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 IDBPendingDeleteCall_h
+#define IDBPendingDeleteCall_h
+
+#include &quot;IDBCallbacks.h&quot;
+#include &lt;wtf/RefPtr.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBPendingDeleteCall {
+public:
+    explicit IDBPendingDeleteCall(PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_callbacks(callbacks)
+    {
+    }
+
+    IDBCallbacks* callbacks() { return m_callbacks.get(); }
+
+private:
+    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBPendingDeleteCall_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBPendingOpenCallhfromrev189745trunkSourceWebCoreModulesindexeddbIDBPendingOpenCallh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingOpenCall.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingOpenCall.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingOpenCall.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2013 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 IDBPendingOpenCall_h
+#define IDBPendingOpenCall_h
+
+#include &lt;wtf/RefPtr.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBCallbacks;
+class IDBDatabaseCallbacks;
+
+class IDBPendingOpenCall {
+public:
+    IDBPendingOpenCall(IDBCallbacks&amp; callbacks, IDBDatabaseCallbacks&amp; databaseCallbacks, int64_t transactionId, uint64_t version)
+        : m_callbacks(&amp;callbacks)
+        , m_databaseCallbacks(&amp;databaseCallbacks)
+        , m_version(version)
+        , m_transactionId(transactionId)
+    {
+    }
+
+    IDBCallbacks* callbacks() { return m_callbacks.get(); }
+    IDBDatabaseCallbacks* databaseCallbacks() { return m_databaseCallbacks.get(); }
+    uint64_t version() { return m_version; }
+    int64_t transactionId() const { return m_transactionId; }
+
+private:
+    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
+    uint64_t m_version;
+    const int64_t m_transactionId;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBPendingOpenCall_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBPendingTransactionMonitorcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBPendingTransactionMonitor.h&quot;
+
+#include &quot;LegacyTransaction.h&quot;
+#include &lt;mutex&gt;
+#include &lt;wtf/ThreadSpecific.h&gt;
+
+using WTF::ThreadSpecific;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+typedef Vector&lt;RefPtr&lt;LegacyTransaction&gt;&gt; TransactionList;
+
+static ThreadSpecific&lt;TransactionList&gt;&amp; transactions()
+{
+    // FIXME: Move the Vector to ScriptExecutionContext to avoid dealing with
+    // thread-local storage.
+    static std::once_flag onceFlag;
+    static ThreadSpecific&lt;TransactionList&gt;* transactions;
+    std::call_once(onceFlag, [] {
+        transactions = new ThreadSpecific&lt;TransactionList&gt;;
+    });
+
+    return *transactions;
+}
+
+void IDBPendingTransactionMonitor::addNewTransaction(PassRefPtr&lt;LegacyTransaction&gt; transaction)
+{
+    transactions()-&gt;append(transaction);
+}
+
+void IDBPendingTransactionMonitor::deactivateNewTransactions()
+{
+    ThreadSpecific&lt;TransactionList&gt;&amp; list = transactions();
+    for (auto&amp; transaction : *list)
+        transaction-&gt;setActive(false);
+    // FIXME: Exercise this call to clear() in a layout test.
+    list-&gt;clear();
+}
+
+};
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBPendingTransactionMonitorhfromrev189745trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBPendingTransactionMonitor_h
+#define IDBPendingTransactionMonitor_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+
+class LegacyTransaction;
+
+// This class keeps track of the transactions created during the current
+// Javascript execution context. Transactions have an internal |active| flag
+// which is set to true on creation, but must be set to false when control
+// returns to the event loop.
+
+class IDBPendingTransactionMonitor {
+    WTF_MAKE_NONCOPYABLE(IDBPendingTransactionMonitor);
+public:
+    static void addNewTransaction(PassRefPtr&lt;LegacyTransaction&gt;);
+    static void deactivateNewTransactions();
+
+private:
+    IDBPendingTransactionMonitor();
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBPendingTransactionMonitor_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionBackendcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,377 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBTransactionBackend.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBFactoryBackendInterface.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBServerConnection.h&quot;
+#include &quot;IDBTransactionBackendOperations.h&quot;
+#include &quot;IDBTransactionCoordinator.h&quot;
+#include &quot;Logging.h&quot;
+
+namespace WebCore {
+
+Ref&lt;IDBTransactionBackend&gt; IDBTransactionBackend::create(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode mode)
+{
+    HashSet&lt;int64_t&gt; objectStoreHashSet;
+    for (auto&amp; id : objectStoreIds)
+        objectStoreHashSet.add(id);
+
+    return adoptRef(*new IDBTransactionBackend(databaseBackend, id, callbacks, objectStoreHashSet, mode));
+}
+
+IDBTransactionBackend::IDBTransactionBackend(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const HashSet&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode mode)
+    : m_objectStoreIds(objectStoreIds)
+    , m_mode(mode)
+    , m_state(Unopened)
+    , m_commitPending(false)
+    , m_callbacks(callbacks)
+    , m_database(databaseBackend)
+    , m_taskTimer(*this, &amp;IDBTransactionBackend::taskTimerFired)
+    , m_pendingPreemptiveEvents(0)
+    , m_id(id)
+{
+    // We pass a reference of this object before it can be adopted.
+    relaxAdoptionRequirement();
+
+    m_database-&gt;transactionCoordinator()-&gt;didCreateTransaction(this);
+
+    RefPtr&lt;IDBTransactionBackend&gt; backend(this);
+    m_database-&gt;serverConnection().openTransaction(id, objectStoreIds, mode, [backend](bool success) {
+        if (!success) {
+            callOnMainThread([backend]() {
+                backend-&gt;abort();
+            });
+            return;
+        }
+
+        // Handle the case where the transaction was aborted before the server connection finished opening the transaction.
+        if (backend-&gt;m_state == Finished)
+            return;
+
+        backend-&gt;m_state = Unused;
+        if (backend-&gt;hasPendingTasks())
+            backend-&gt;start();
+    });
+}
+
+IDBTransactionBackend::~IDBTransactionBackend()
+{
+    // It shouldn't be possible for this object to get deleted unless it's unused, complete, or aborted.
+    ASSERT(m_state == Finished || m_state == Unused);
+}
+
+void IDBTransactionBackend::scheduleTask(IDBDatabaseBackend::TaskType type, PassRefPtr&lt;IDBOperation&gt; task, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask)
+{
+    if (m_state == Finished)
+        return;
+
+    if (type == IDBDatabaseBackend::NormalTask)
+        m_taskQueue.append(task);
+    else
+        m_preemptiveTaskQueue.append(task);
+
+    if (abortTask)
+        m_abortTaskQueue.prepend(abortTask);
+
+    if (m_state == Unopened)
+        return;
+
+    if (m_state == Unused)
+        start();
+    else if (m_state == Running &amp;&amp; !m_taskTimer.isActive())
+        m_taskTimer.startOneShot(0);
+}
+
+void IDBTransactionBackend::abort()
+{
+    abort(IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error (unknown cause)&quot;));
+}
+
+void IDBTransactionBackend::abort(PassRefPtr&lt;IDBDatabaseError&gt; error)
+{
+#ifndef NDEBUG
+    if (error)
+        LOG(StorageAPI, &quot;IDBTransactionBackend::abort - (%s) %s&quot;, error-&gt;name().utf8().data(), error-&gt;message().utf8().data());
+    else
+        LOG(StorageAPI, &quot;IDBTransactionBackend::abort (no error)&quot;);
+#endif
+
+    if (m_state == Finished)
+        return;
+
+    bool wasRunning = m_state == Running;
+
+    // The last reference to this object may be released while performing the
+    // abort steps below. We therefore take a self reference to keep ourselves
+    // alive while executing this method.
+    Ref&lt;IDBTransactionBackend&gt; protect(*this);
+
+    m_state = Finished;
+    m_taskTimer.stop();
+
+    if (wasRunning)
+        m_database-&gt;serverConnection().rollbackTransactionSync(m_id);
+
+    // Run the abort tasks, if any.
+    while (!m_abortTaskQueue.isEmpty()) {
+        RefPtr&lt;IDBSynchronousOperation&gt; task(m_abortTaskQueue.takeFirst());
+        task-&gt;perform();
+    }
+
+    // Backing store resources (held via cursors) must be released before script callbacks
+    // are fired, as the script callbacks may release references and allow the backing store
+    // itself to be released, and order is critical.
+    closeOpenCursors();
+
+    m_database-&gt;serverConnection().resetTransactionSync(m_id);
+
+    // Transactions must also be marked as completed before the front-end is notified, as
+    // the transaction completion unblocks operations like closing connections.
+    m_database-&gt;transactionCoordinator()-&gt;didFinishTransaction(this);
+    ASSERT(!m_database-&gt;transactionCoordinator()-&gt;isActive(this));
+    m_database-&gt;transactionFinished(this);
+
+    RefPtr&lt;IDBDatabaseBackend&gt; database = m_database.release();
+
+    if (m_callbacks)
+        m_callbacks-&gt;onAbort(id(), error);
+
+    database-&gt;transactionFinishedAndAbortFired(this);
+}
+
+bool IDBTransactionBackend::isTaskQueueEmpty() const
+{
+    return m_preemptiveTaskQueue.isEmpty() &amp;&amp; m_taskQueue.isEmpty();
+}
+
+bool IDBTransactionBackend::hasPendingTasks() const
+{
+    return m_pendingPreemptiveEvents || !isTaskQueueEmpty();
+}
+
+void IDBTransactionBackend::registerOpenCursor(IDBCursorBackend* cursor)
+{
+    m_openCursors.add(cursor);
+}
+
+void IDBTransactionBackend::unregisterOpenCursor(IDBCursorBackend* cursor)
+{
+    m_openCursors.remove(cursor);
+}
+
+void IDBTransactionBackend::run()
+{
+    // TransactionCoordinator has started this transaction. Schedule a timer
+    // to process the first task.
+    ASSERT(m_state == StartPending || m_state == Running);
+    ASSERT(!m_taskTimer.isActive());
+
+    m_taskTimer.startOneShot(0);
+}
+
+void IDBTransactionBackend::start()
+{
+    ASSERT(m_state == Unused);
+
+    m_state = StartPending;
+    m_database-&gt;transactionCoordinator()-&gt;didStartTransaction(this);
+    m_database-&gt;transactionStarted(this);
+}
+
+void IDBTransactionBackend::commit()
+{
+    LOG(StorageAPI, &quot;IDBTransactionBackend::commit transaction %lli in state %u&quot;, static_cast&lt;long long&gt;(m_id), m_state);
+
+    // In multiprocess ports, front-end may have requested a commit but an abort has already
+    // been initiated asynchronously by the back-end.
+    if (m_state == Finished)
+        return;
+
+    ASSERT(m_state == Unopened || m_state == Unused || m_state == Running);
+    m_commitPending = true;
+
+    // Front-end has requested a commit, but there may be tasks like createIndex which
+    // are considered synchronous by the front-end but are processed asynchronously.
+    if (hasPendingTasks()) {
+        LOG(StorageAPI, &quot;IDBTransactionBackend::commit - Not committing now, transaction still has pending tasks (Transaction %lli)&quot;, static_cast&lt;long long&gt;(m_id));
+        return;
+    }
+
+    // The last reference to this object may be released while performing the
+    // commit steps below. We therefore take a self reference to keep ourselves
+    // alive while executing this method.
+    RefPtr&lt;IDBTransactionBackend&gt; backend(this);
+
+    bool unused = m_state == Unused || m_state == Unopened;
+    m_state = Finished;
+
+    bool committed = unused;
+
+    m_database-&gt;serverConnection().commitTransaction(m_id, [backend, this, committed, unused](bool success) mutable {
+        // This might be commitTransaction request aborting during or after synchronous IDBTransactionBackend::abort() call.
+        // This can easily happen if the page is navigated before all transactions finish.
+        // In this case we have no further cleanup and don't need to make any callbacks.
+        if (!m_database) {
+            ASSERT(!success);
+            return;
+        }
+
+        committed |= success;
+
+        // Backing store resources (held via cursors) must be released before script callbacks
+        // are fired, as the script callbacks may release references and allow the backing store
+        // itself to be released, and order is critical.
+        closeOpenCursors();
+
+        m_database-&gt;serverConnection().resetTransaction(m_id, []() { });
+
+        // Transactions must also be marked as completed before the front-end is notified, as
+        // the transaction completion unblocks operations like closing connections.
+        if (!unused)
+            m_database-&gt;transactionCoordinator()-&gt;didFinishTransaction(this);
+        m_database-&gt;transactionFinished(this);
+
+        if (committed) {
+            m_callbacks-&gt;onComplete(id());
+            m_database-&gt;transactionFinishedAndCompleteFired(this);
+        } else {
+            m_callbacks-&gt;onAbort(id(), IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Internal error committing transaction.&quot;));
+            m_database-&gt;transactionFinishedAndAbortFired(this);
+        }
+
+        m_database = nullptr;
+    });
+}
+
+void IDBTransactionBackend::taskTimerFired()
+{
+    LOG(StorageAPI, &quot;IDBTransactionBackend::taskTimerFired&quot;);
+
+    if (m_state == StartPending) {
+        m_database-&gt;serverConnection().beginTransaction(m_id, []() { });
+        m_state = Running;
+    }
+
+    // The last reference to this object may be released while performing a task.
+    // Take a self reference to keep this object alive so that tasks can
+    // successfully make their completion callbacks.
+    RefPtr&lt;IDBTransactionBackend&gt; self(this);
+
+    TaskQueue* taskQueue = m_pendingPreemptiveEvents ? &amp;m_preemptiveTaskQueue : &amp;m_taskQueue;
+    if (!taskQueue-&gt;isEmpty() &amp;&amp; m_state != Finished) {
+        ASSERT(m_state == Running);
+        RefPtr&lt;IDBOperation&gt; task(taskQueue-&gt;takeFirst());
+        task-&gt;perform([self, this, task]() {
+            m_taskTimer.startOneShot(0);
+        });
+
+        return;
+    }
+
+    // If there are no pending tasks, we haven't already committed/aborted,
+    // and the front-end requested a commit, it is now safe to do so.
+    if (!hasPendingTasks() &amp;&amp; m_state != Finished &amp;&amp; m_commitPending)
+        commit();
+}
+
+void IDBTransactionBackend::closeOpenCursors()
+{
+    for (auto&amp; cursor : m_openCursors)
+        cursor-&gt;close();
+    m_openCursors.clear();
+}
+
+void IDBTransactionBackend::scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+{
+    scheduleTask(CreateObjectStoreOperation::create(this, objectStoreMetadata), CreateObjectStoreAbortOperation::create(this, objectStoreMetadata.id));
+}
+
+void IDBTransactionBackend::scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+{
+    scheduleTask(DeleteObjectStoreOperation::create(this, objectStoreMetadata), DeleteObjectStoreAbortOperation::create(this, objectStoreMetadata));
+}
+
+void IDBTransactionBackend::scheduleVersionChangeOperation(int64_t requestedVersion, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks, const IDBDatabaseMetadata&amp; metadata)
+{
+    scheduleTask(IDBDatabaseBackend::VersionChangeOperation::create(this, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackend::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
+}
+
+void IDBTransactionBackend::scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+{
+    scheduleTask(CreateIndexOperation::create(this, objectStoreId, indexMetadata), CreateIndexAbortOperation::create(this, objectStoreId, indexMetadata.id));
+}
+
+void IDBTransactionBackend::scheduleDeleteIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+{
+    scheduleTask(DeleteIndexOperation::create(this, objectStoreId, indexMetadata), DeleteIndexAbortOperation::create(this, objectStoreId, indexMetadata));
+}
+
+void IDBTransactionBackend::scheduleGetOperation(const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    scheduleTask(GetOperation::create(this, metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
+}
+
+void IDBTransactionBackend::schedulePutOperation(const IDBObjectStoreMetadata&amp; objectStoreMetadata, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
+{
+    scheduleTask(PutOperation::create(this, objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys));
+}
+
+void IDBTransactionBackend::scheduleSetIndexesReadyOperation(size_t indexCount)
+{
+    scheduleTask(IDBDatabaseBackend::PreemptiveTask, SetIndexesReadyOperation::create(this, indexCount));
+}
+
+void IDBTransactionBackend::scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    scheduleTask(OpenCursorOperation::create(this, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
+}
+
+void IDBTransactionBackend::scheduleCountOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    scheduleTask(CountOperation::create(this, objectStoreId, indexId, keyRange, callbacks));
+}
+
+void IDBTransactionBackend::scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    scheduleTask(DeleteRangeOperation::create(this, objectStoreId, keyRange, callbacks));
+}
+
+void IDBTransactionBackend::scheduleClearObjectStoreOperation(int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+{
+    scheduleTask(ClearObjectStoreOperation::create(this, objectStoreId, callbacks));
+}
+
+};
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendhfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackend.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,128 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBTransactionBackend_h
+#define IDBTransactionBackend_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseError.h&quot;
+#include &quot;IDBOperation.h&quot;
+#include &quot;Timer.h&quot;
+#include &lt;wtf/Deque.h&gt;
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class IDBCursorBackend;
+class IDBDatabaseCallbacks;
+
+class IDBTransactionBackend : public RefCounted&lt;IDBTransactionBackend&gt; {
+public:
+    static Ref&lt;IDBTransactionBackend&gt; create(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
+    ~IDBTransactionBackend();
+
+    void commit();
+    void abort();
+    void abort(PassRefPtr&lt;IDBDatabaseError&gt;);
+
+    void run();
+    IndexedDB::TransactionMode mode() const  { return m_mode; }
+    const HashSet&lt;int64_t&gt;&amp; scope() const  { return m_objectStoreIds; }
+
+    void scheduleTask(PassRefPtr&lt;IDBOperation&gt; task, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask = nullptr) { scheduleTask(IDBDatabaseBackend::NormalTask, task, abortTask); }
+    void scheduleTask(IDBDatabaseBackend::TaskType, PassRefPtr&lt;IDBOperation&gt;, PassRefPtr&lt;IDBSynchronousOperation&gt; abortTask = nullptr);
+
+    void registerOpenCursor(IDBCursorBackend*);
+    void unregisterOpenCursor(IDBCursorBackend*);
+
+    void addPreemptiveEvent()  { m_pendingPreemptiveEvents++; }
+    void didCompletePreemptiveEvent()  { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents &gt;= 0); }
+
+    IDBDatabaseBackend&amp; database() const  { return *m_database; }
+
+    void scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&amp;);
+    void scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&amp;);
+    void scheduleVersionChangeOperation(int64_t requestedVersion, PassRefPtr&lt;IDBCallbacks&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const IDBDatabaseMetadata&amp;);
+    void scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp;);
+    void scheduleDeleteIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&amp;);
+    void scheduleGetOperation(const IDBDatabaseMetadata&amp;, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorType, PassRefPtr&lt;IDBCallbacks&gt;);
+    void schedulePutOperation(const IDBObjectStoreMetadata&amp;, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt;, IDBDatabaseBackend::PutMode, PassRefPtr&lt;IDBCallbacks&gt;, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp;);
+    void scheduleSetIndexesReadyOperation(size_t indexCount);
+    void scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, IndexedDB::CursorDirection, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, PassRefPtr&lt;IDBCallbacks&gt;);
+    void scheduleCountOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
+    void scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt;, PassRefPtr&lt;IDBCallbacks&gt;);
+    void scheduleClearObjectStoreOperation(int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt;);
+
+    int64_t id() const { return m_id; }
+
+private:
+    IDBTransactionBackend(IDBDatabaseBackend*, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, const HashSet&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode);
+
+    enum State {
+        Unopened, // Backing store transaction not yet created.
+        Unused, // Backing store transaction created, but no tasks yet.
+        StartPending, // Enqueued tasks, but backing store transaction not yet started.
+        Running, // Backing store transaction started but not yet finished.
+        Finished, // Either aborted or committed.
+    };
+
+    void start();
+
+    bool isTaskQueueEmpty() const;
+    bool hasPendingTasks() const;
+
+    void taskTimerFired();
+    void closeOpenCursors();
+
+    const HashSet&lt;int64_t&gt; m_objectStoreIds;
+    const IndexedDB::TransactionMode m_mode;
+
+    State m_state;
+    bool m_commitPending;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; m_callbacks;
+    RefPtr&lt;IDBDatabaseBackend&gt; m_database;
+
+    typedef Deque&lt;RefPtr&lt;IDBOperation&gt;&gt; TaskQueue;
+    TaskQueue m_taskQueue;
+    TaskQueue m_preemptiveTaskQueue;
+    Deque&lt;RefPtr&lt;IDBSynchronousOperation&gt;&gt; m_abortTaskQueue;
+
+    // FIXME: delete the timer once we have threads instead.
+    Timer m_taskTimer;
+    int m_pendingPreemptiveEvents;
+
+    HashSet&lt;IDBCursorBackend*&gt; m_openCursors;
+
+    int64_t m_id;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBTransactionBackend_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationscppfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,284 @@
</span><ins>+/*
+ * Copyright (C) 2013 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;IDBTransactionBackendOperations.h&quot;
+
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBRecordIdentifier.h&quot;
+#include &quot;IDBServerConnection.h&quot;
+#include &quot;Logging.h&quot;
+#include &lt;wtf/text/CString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#define STANDARD_DATABASE_ERROR_CALLBACK std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; operationCallback = \
+    [operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; error) { \
+        if (error) \
+            operation-&gt;m_transaction-&gt;abort(error); \
+        completionCallback(); \
+    };
+
+namespace WebCore {
+
+void CreateObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;CreateObjectStoreOperation&quot;);
+
+    RefPtr&lt;CreateObjectStoreOperation&gt; operation(this);
+    STANDARD_DATABASE_ERROR_CALLBACK;
+
+    m_transaction-&gt;database().serverConnection().createObjectStore(*m_transaction, *this, operationCallback);
+}
+
+void CreateIndexOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;CreateIndexOperation&quot;);
+
+    RefPtr&lt;CreateIndexOperation&gt; operation(this);
+    STANDARD_DATABASE_ERROR_CALLBACK;
+
+    m_transaction-&gt;database().serverConnection().createIndex(*m_transaction, *this, operationCallback);
+}
+
+void CreateIndexAbortOperation::perform()
+{
+    LOG(StorageAPI, &quot;CreateIndexAbortOperation&quot;);
+    m_transaction-&gt;database().removeIndex(m_objectStoreID, m_indexID);
+}
+
+void DeleteIndexOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;DeleteIndexOperation&quot;);
+
+    RefPtr&lt;DeleteIndexOperation&gt; operation(this);
+    STANDARD_DATABASE_ERROR_CALLBACK;
+
+    m_transaction-&gt;database().serverConnection().deleteIndex(*m_transaction, *this, operationCallback);
+}
+
+void DeleteIndexAbortOperation::perform()
+{
+    LOG(StorageAPI, &quot;DeleteIndexAbortOperation&quot;);
+    m_transaction-&gt;database().addIndex(m_objectStoreID, m_indexMetadata, IDBIndexMetadata::InvalidId);
+}
+
+void GetOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;GetOperation&quot;);
+
+    RefPtr&lt;GetOperation&gt; operation(this);
+    STANDARD_DATABASE_ERROR_CALLBACK;
+
+    m_transaction-&gt;database().serverConnection().get(*m_transaction, *this, [this, operation, operationCallback](const IDBGetResult&amp; result, PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
+        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
+
+        if (error)
+            m_callbacks-&gt;onError(error);
+        else {
+            if (!result.valueBuffer) {
+                if (result.keyData.isNull)
+                    m_callbacks-&gt;onSuccess();
+                else
+                    m_callbacks-&gt;onSuccess(result.keyData.maybeCreateIDBKey());
+            } else {
+                if (!result.keyData.isNull)
+                    m_callbacks-&gt;onSuccess(result.valueBuffer, result.keyData.maybeCreateIDBKey(), result.keyPath);
+                else
+                    m_callbacks-&gt;onSuccess(result.valueBuffer.get());
+            }
+        }
+
+        operationCallback(error.release());
+    });
+}
+
+void PutOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;PutOperation&quot;);
+    ASSERT(m_transaction-&gt;mode() != IndexedDB::TransactionMode::ReadOnly);
+    ASSERT(m_indexIDs.size() == m_indexKeys.size());
+
+    m_transaction-&gt;database().serverConnection().put(*m_transaction, *this, [this, completionCallback](PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
+        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
+        if (key) {
+            ASSERT(!error);
+            m_callbacks-&gt;onSuccess(key);
+        } else {
+            ASSERT(error);
+            m_callbacks-&gt;onError(error);
+        }
+        completionCallback();
+    });
+}
+
+void SetIndexesReadyOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;SetIndexesReadyOperation&quot;);
+
+    for (size_t i = 0; i &lt; m_indexCount; ++i)
+        m_transaction-&gt;didCompletePreemptiveEvent();
+
+    callOnMainThread(completionCallback);
+}
+
+void OpenCursorOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;OpenCursorOperation&quot;);
+
+    RefPtr&lt;OpenCursorOperation&gt; operation(this);
+    auto callback = [this, operation, completionCallback](int64_t cursorID, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBDatabaseError&gt; error) {
+        if (error) {
+            m_callbacks-&gt;onError(error);
+        } else if (!key) {
+            // If there's no error but also no key, then the cursor had no records.
+            m_callbacks-&gt;onSuccess(static_cast&lt;SharedBuffer*&gt;(nullptr));
+        } else {
+            RefPtr&lt;IDBCursorBackend&gt; cursor = IDBCursorBackend::create(cursorID, m_cursorType, m_taskType, *m_transaction, m_objectStoreID);
+            cursor-&gt;updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
+            m_callbacks-&gt;onSuccess(cursor.release());
+        }
+
+        completionCallback();
+    };
+
+    m_transaction-&gt;database().serverConnection().openCursor(*m_transaction, *this, callback);
+}
+
+void CountOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;CountOperation&quot;);
+
+    RefPtr&lt;CountOperation&gt; operation(this);
+    auto callback = [this, operation, completionCallback](int64_t count, PassRefPtr&lt;IDBDatabaseError&gt;) {
+        // FIXME: The LevelDB port never had an error condition for the count operation.
+        // We probably need to support an error for the count operation, breaking the LevelDB port.
+        m_callbacks-&gt;onSuccess(count);
+
+        completionCallback();
+    };
+
+    m_transaction-&gt;database().serverConnection().count(*m_transaction, *this, callback);
+}
+
+void DeleteRangeOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;DeleteRangeOperation&quot;);
+
+    RefPtr&lt;DeleteRangeOperation&gt; operation(this);
+    auto callback = [this, operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; error) {
+        if (error)
+            m_callbacks-&gt;onError(error);
+        else
+            m_callbacks-&gt;onSuccess();
+
+        completionCallback();
+    };
+
+    m_transaction-&gt;database().serverConnection().deleteRange(*m_transaction, *this, callback);
+}
+
+void ClearObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;ClearObjectStoreOperation&quot;);
+
+    RefPtr&lt;ClearObjectStoreOperation&gt; operation(this);
+
+    auto clearCallback = [this, operation, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
+        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
+
+        if (error) {
+            m_callbacks-&gt;onError(error);
+            m_transaction-&gt;abort(error.release());
+        } else
+            m_callbacks-&gt;onSuccess();
+
+        completionCallback();
+    };
+
+    m_transaction-&gt;database().serverConnection().clearObjectStore(*m_transaction, *this, clearCallback);
+}
+
+void DeleteObjectStoreOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;DeleteObjectStoreOperation&quot;);
+
+    RefPtr&lt;DeleteObjectStoreOperation&gt; operation(this);
+    STANDARD_DATABASE_ERROR_CALLBACK;
+
+    m_transaction-&gt;database().serverConnection().deleteObjectStore(*m_transaction, *this, operationCallback);
+}
+
+void IDBDatabaseBackend::VersionChangeOperation::perform(std::function&lt;void()&gt; completionCallback)
+{
+    LOG(StorageAPI, &quot;VersionChangeOperation&quot;);
+
+    uint64_t oldVersion = m_transaction-&gt;database().metadata().version;
+    if (oldVersion == IDBDatabaseMetadata::NoIntVersion)
+        oldVersion = 0;
+
+    RefPtr&lt;IDBDatabaseBackend::VersionChangeOperation&gt; operation(this);
+    ASSERT(static_cast&lt;uint64_t&gt;(m_version) &gt; oldVersion);
+
+    std::function&lt;void(PassRefPtr&lt;IDBDatabaseError&gt;)&gt; operationCallback = [oldVersion, operation, this, completionCallback](PassRefPtr&lt;IDBDatabaseError&gt; prpError) {
+        RefPtr&lt;IDBDatabaseError&gt; error = prpError;
+        if (error) {
+            m_callbacks-&gt;onError(error);
+            m_transaction-&gt;abort(error);
+        } else {
+            ASSERT(!m_transaction-&gt;database().hasPendingSecondHalfOpen());
+            m_transaction-&gt;database().setCurrentVersion(m_version);
+            m_transaction-&gt;database().setPendingSecondHalfOpen(std::make_unique&lt;IDBPendingOpenCall&gt;(*m_callbacks, *m_databaseCallbacks, m_transaction-&gt;id(), m_version));
+            m_callbacks-&gt;onUpgradeNeeded(oldVersion, &amp;m_transaction-&gt;database(), m_transaction-&gt;database().metadata());
+        }
+        completionCallback();
+    };
+
+    m_transaction-&gt;database().serverConnection().changeDatabaseVersion(*m_transaction, *this, operationCallback);
+}
+
+void CreateObjectStoreAbortOperation::perform()
+{
+    LOG(StorageAPI, &quot;CreateObjectStoreAbortOperation&quot;);
+    m_transaction-&gt;database().removeObjectStore(m_objectStoreID);
+}
+
+void DeleteObjectStoreAbortOperation::perform()
+{
+    LOG(StorageAPI, &quot;DeleteObjectStoreAbortOperation&quot;);
+    m_transaction-&gt;database().addObjectStore(m_objectStoreMetadata, IDBObjectStoreMetadata::InvalidId);
+}
+
+void IDBDatabaseBackend::VersionChangeAbortOperation::perform()
+{
+    LOG(StorageAPI, &quot;VersionChangeAbortOperation&quot;);
+    m_transaction-&gt;database().setCurrentVersion(m_previousIntVersion);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationshfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionBackendOperationsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,471 @@
</span><ins>+/*
+ * Copyright (C) 2013 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 IDBTransactionBackendOperations_h
+#define IDBTransactionBackendOperations_h
+
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBOperation.h&quot;
+#include &quot;IDBTransactionBackend.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBServerConnection;
+
+class CreateObjectStoreOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+    {
+        return adoptRef(*new CreateObjectStoreOperation(transaction, objectStoreMetadata));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    const IDBObjectStoreMetadata&amp; objectStoreMetadata() const { return m_objectStoreMetadata; }
+
+private:
+    CreateObjectStoreOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreMetadata(objectStoreMetadata)
+    {
+    }
+    
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const IDBObjectStoreMetadata m_objectStoreMetadata;
+};
+
+class DeleteObjectStoreOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+    {
+        return adoptRef(*new DeleteObjectStoreOperation(transaction, objectStoreMetadata));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
+    const IDBObjectStoreMetadata&amp; objectStoreMetadata() const { return m_objectStoreMetadata; }
+
+private:
+    DeleteObjectStoreOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreMetadata(objectStoreMetadata)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const IDBObjectStoreMetadata m_objectStoreMetadata;
+};
+
+class IDBDatabaseBackend::VersionChangeOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t version, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks)
+    {
+        return adoptRef(*new VersionChangeOperation(transaction, version, callbacks, databaseCallbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
+    int64_t version() const { return m_version; }
+    IDBDatabaseCallbacks* databaseCallbacks() const { return m_databaseCallbacks.get(); }
+
+private:
+    VersionChangeOperation(IDBTransactionBackend* transaction, int64_t version, PassRefPtr&lt;IDBCallbacks&gt; callbacks, PassRefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks)
+        : m_transaction(transaction)
+        , m_version(version)
+        , m_callbacks(callbacks)
+        , m_databaseCallbacks(databaseCallbacks)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    int64_t m_version;
+    RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
+};
+
+class CreateObjectStoreAbortOperation : public IDBSynchronousOperation {
+public:
+    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId)
+    {
+        return adoptRef(*new CreateObjectStoreAbortOperation(transaction, objectStoreId));
+    }
+    virtual void perform() override final;
+private:
+    CreateObjectStoreAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+};
+
+class DeleteObjectStoreAbortOperation : public IDBSynchronousOperation {
+public:
+    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore)
+    {
+        return adoptRef(*new DeleteObjectStoreAbortOperation(transaction, objectStore));
+    }
+    virtual void perform() override final;
+private:
+    DeleteObjectStoreAbortOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStoreMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreMetadata(objectStoreMetadata)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    IDBObjectStoreMetadata m_objectStoreMetadata;
+};
+
+class IDBDatabaseBackend::VersionChangeAbortOperation : public IDBSynchronousOperation {
+public:
+    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, const String&amp; previousVersion, int64_t previousIntVersion)
+    {
+        return adoptRef(*new VersionChangeAbortOperation(transaction, previousVersion, previousIntVersion));
+    }
+    virtual void perform() override final;
+private:
+    VersionChangeAbortOperation(IDBTransactionBackend* transaction, const String&amp; previousVersion, int64_t previousIntVersion)
+        : m_transaction(transaction)
+        , m_previousVersion(previousVersion)
+        , m_previousIntVersion(previousIntVersion)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    String m_previousVersion;
+    int64_t m_previousIntVersion;
+};
+
+class CreateIndexOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+    {
+        return adoptRef(*new CreateIndexOperation(transaction, objectStoreId, indexMetadata));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    const IDBIndexMetadata&amp; idbIndexMetadata() const { return m_indexMetadata; }
+
+private:
+    CreateIndexOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexMetadata(indexMetadata)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const IDBIndexMetadata m_indexMetadata;
+};
+
+class CreateIndexAbortOperation : public IDBSynchronousOperation {
+public:
+    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId)
+    {
+        return adoptRef(*new CreateIndexAbortOperation(transaction, objectStoreId, indexId));
+    }
+    virtual void perform() override final;
+private:
+    CreateIndexAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexID(indexId)
+    {
+    }
+
+    const RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const int64_t m_indexID;
+};
+
+class DeleteIndexOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+    {
+        return adoptRef(*new DeleteIndexOperation(transaction, objectStoreId, indexMetadata));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    const IDBIndexMetadata&amp; idbIndexMetadata() const { return m_indexMetadata; }
+
+private:
+    DeleteIndexOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexMetadata(indexMetadata)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const IDBIndexMetadata m_indexMetadata;
+};
+
+class DeleteIndexAbortOperation : public IDBSynchronousOperation {
+public:
+    static Ref&lt;IDBSynchronousOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+    {
+        return adoptRef(*new DeleteIndexAbortOperation(transaction, objectStoreId, indexMetadata));
+    }
+    virtual void perform() override final;
+private:
+    DeleteIndexAbortOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexMetadata(indexMetadata)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const IDBIndexMetadata m_indexMetadata;
+};
+
+class GetOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new GetOperation(transaction, metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    int64_t indexID() const { return m_indexID; }
+    IndexedDB::CursorType cursorType() const { return m_cursorType; }
+    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
+    bool autoIncrement() const { return m_autoIncrement; }
+    IDBKeyPath keyPath() const { return m_keyPath; }
+
+private:
+    GetOperation(IDBTransactionBackend* transaction, const IDBDatabaseMetadata&amp; metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorType cursorType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexID(indexId)
+        , m_keyPath(metadata.objectStores.get(objectStoreId).keyPath)
+        , m_autoIncrement(metadata.objectStores.get(objectStoreId).autoIncrement)
+        , m_keyRange(keyRange)
+        , m_cursorType(cursorType)
+        , m_callbacks(callbacks)
+    {
+        ASSERT(metadata.objectStores.contains(objectStoreId));
+        ASSERT(metadata.objectStores.get(objectStoreId).id == objectStoreId);
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const int64_t m_indexID;
+    const IDBKeyPath m_keyPath;
+    const bool m_autoIncrement;
+    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
+    const IndexedDB::CursorType m_cursorType;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+class PutOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore, PassRefPtr&lt;SharedBuffer&gt; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
+    {
+        return adoptRef(*new PutOperation(transaction, objectStore, value, key, putMode, callbacks, indexIds, indexKeys));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    IDBDatabaseBackend::PutMode putMode() const { return m_putMode; }
+    const IDBObjectStoreMetadata&amp; objectStore() const { return m_objectStore; }
+    IDBKey* key() const { return m_key.get(); }
+    const Vector&lt;int64_t&gt;&amp; indexIDs() const { return m_indexIDs; }
+    const Vector&lt;IndexKeys&gt;&amp; indexKeys() const { return m_indexKeys; }
+    SharedBuffer* value() const { return m_value.get(); }
+
+private:
+    PutOperation(IDBTransactionBackend* transaction, const IDBObjectStoreMetadata&amp; objectStore, PassRefPtr&lt;SharedBuffer&gt;&amp; value, PassRefPtr&lt;IDBKey&gt; key, IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;IDBCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; indexIds, const Vector&lt;IndexKeys&gt;&amp; indexKeys)
+        : m_transaction(transaction)
+        , m_objectStore(objectStore)
+        , m_value(value)
+        , m_key(key)
+        , m_putMode(putMode)
+        , m_callbacks(callbacks)
+        , m_indexIDs(indexIds)
+        , m_indexKeys(indexKeys)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const IDBObjectStoreMetadata m_objectStore;
+    const RefPtr&lt;SharedBuffer&gt; m_value;
+    const RefPtr&lt;IDBKey&gt; m_key;
+    const IDBDatabaseBackend::PutMode m_putMode;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+    const Vector&lt;int64_t&gt; m_indexIDs;
+    const Vector&lt;IndexKeys&gt; m_indexKeys;
+};
+
+class SetIndexesReadyOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, size_t indexCount)
+    {
+        return adoptRef(*new SetIndexesReadyOperation(transaction, indexCount));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+private:
+    SetIndexesReadyOperation(IDBTransactionBackend* transaction, size_t indexCount)
+        : m_transaction(transaction)
+        , m_indexCount(indexCount)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const size_t m_indexCount;
+};
+
+class OpenCursorOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new OpenCursorOperation(transaction, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t transactionID() const { return m_transaction-&gt;id(); }
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    int64_t indexID() const { return m_indexID; }
+    IndexedDB::CursorDirection direction() const { return m_direction; }
+    IndexedDB::CursorType cursorType() const { return m_cursorType; }
+    IDBDatabaseBackend::TaskType taskType() const { return m_taskType; }
+    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
+    IndexedDB::CursorDirection cursorDirection() const { return m_direction; }
+
+private:
+    OpenCursorOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexID(indexId)
+        , m_keyRange(keyRange)
+        , m_direction(direction)
+        , m_cursorType(cursorType)
+        , m_taskType(taskType)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const int64_t m_indexID;
+    const PassRefPtr&lt;IDBKeyRange&gt; m_keyRange;
+    const IndexedDB::CursorDirection m_direction;
+    const IndexedDB::CursorType m_cursorType;
+    const IDBDatabaseBackend::TaskType m_taskType;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+class CountOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new CountOperation(transaction, objectStoreId, indexId, keyRange, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    int64_t indexID() const { return m_indexID; }
+    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
+
+private:
+    CountOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, int64_t indexId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_indexID(indexId)
+        , m_keyRange(keyRange)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const int64_t m_indexID;
+    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+class DeleteRangeOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new DeleteRangeOperation(transaction, objectStoreId, keyRange, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    int64_t objectStoreID() const { return m_objectStoreID; }
+    IDBKeyRange* keyRange() const { return m_keyRange.get(); }
+
+private:
+    DeleteRangeOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBKeyRange&gt; keyRange, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_keyRange(keyRange)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const RefPtr&lt;IDBKeyRange&gt; m_keyRange;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+class ClearObjectStoreOperation : public IDBOperation {
+public:
+    static Ref&lt;IDBOperation&gt; create(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+    {
+        return adoptRef(*new ClearObjectStoreOperation(transaction, objectStoreId, callbacks));
+    }
+    virtual void perform(std::function&lt;void()&gt; successCallback) override final;
+
+    IDBTransactionBackend* transaction() const { return m_transaction.get(); }
+    int64_t objectStoreID() const { return m_objectStoreID; }
+
+private:
+    ClearObjectStoreOperation(IDBTransactionBackend* transaction, int64_t objectStoreId, PassRefPtr&lt;IDBCallbacks&gt; callbacks)
+        : m_transaction(transaction)
+        , m_objectStoreID(objectStoreId)
+        , m_callbacks(callbacks)
+    {
+    }
+
+    RefPtr&lt;IDBTransactionBackend&gt; m_transaction;
+    const int64_t m_objectStoreID;
+    const RefPtr&lt;IDBCallbacks&gt; m_callbacks;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBTransactionBackendOperations_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionCoordinatorcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;IDBTransactionCoordinator.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBTransactionBackend.h&quot;
+
+namespace WebCore {
+
+IDBTransactionCoordinator::IDBTransactionCoordinator()
+{
+}
+
+IDBTransactionCoordinator::~IDBTransactionCoordinator()
+{
+}
+
+void IDBTransactionCoordinator::didCreateTransaction(IDBTransactionBackend* transaction)
+{
+    ASSERT(!m_transactions.contains(transaction));
+    m_transactions.add(transaction, transaction);
+}
+
+void IDBTransactionCoordinator::didStartTransaction(IDBTransactionBackend* transaction)
+{
+    ASSERT(m_transactions.contains(transaction));
+
+    m_queuedTransactions.add(transaction);
+    processStartedTransactions();
+}
+
+void IDBTransactionCoordinator::didFinishTransaction(IDBTransactionBackend* transaction)
+{
+    ASSERT(m_transactions.contains(transaction));
+
+    if (m_queuedTransactions.contains(transaction)) {
+        ASSERT(!m_startedTransactions.contains(transaction));
+        m_queuedTransactions.remove(transaction);
+    } else if (m_startedTransactions.contains(transaction))
+        m_startedTransactions.remove(transaction);
+
+    m_transactions.remove(transaction);
+
+    processStartedTransactions();
+}
+
+#ifndef NDEBUG
+// Verifies internal consistiency while returning whether anything is found.
+bool IDBTransactionCoordinator::isActive(IDBTransactionBackend* transaction)
+{
+    bool found = false;
+    if (m_queuedTransactions.contains(transaction))
+        found = true;
+    if (m_startedTransactions.contains(transaction)) {
+        ASSERT(!found);
+        found = true;
+    }
+    ASSERT(found == m_transactions.contains(transaction));
+    return found;
+}
+#endif
+
+void IDBTransactionCoordinator::processStartedTransactions()
+{
+    if (m_queuedTransactions.isEmpty())
+        return;
+
+    ASSERT(m_startedTransactions.isEmpty() || (*m_startedTransactions.begin())-&gt;mode() != IndexedDB::TransactionMode::VersionChange);
+
+    ListHashSet&lt;IDBTransactionBackend*&gt;::const_iterator it = m_queuedTransactions.begin();
+    while (it != m_queuedTransactions.end()) {
+        IDBTransactionBackend* transaction = *it;
+        ++it;
+        if (canRunTransaction(transaction)) {
+            m_queuedTransactions.remove(transaction);
+            m_startedTransactions.add(transaction);
+            transaction-&gt;run();
+        }
+    }
+}
+
+bool IDBTransactionCoordinator::canRunTransaction(IDBTransactionBackend* transaction)
+{
+    ASSERT(m_queuedTransactions.contains(transaction));
+
+    UNUSED_PARAM(transaction);
+    return !m_startedTransactions.size();
+}
+
+};
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionCoordinatorhfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionCoordinatorh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionCoordinator.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 IDBTransactionCoordinator_h
+#define IDBTransactionCoordinator_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &lt;memory&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/ListHashSet.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class IDBTransactionBackend;
+
+// Transactions are executed in the order the were created.
+class IDBTransactionCoordinator {
+public:
+    IDBTransactionCoordinator();
+    virtual ~IDBTransactionCoordinator();
+
+    // Called by transactions as they start and finish.
+    void didCreateTransaction(IDBTransactionBackend*);
+    void didOpenBackingStoreTransaction(IDBTransactionBackend*);
+    void didStartTransaction(IDBTransactionBackend*);
+    void didFinishTransaction(IDBTransactionBackend*);
+
+#ifndef NDEBUG
+    bool isActive(IDBTransactionBackend*);
+#endif
+
+private:
+    void processStartedTransactions();
+    bool canRunTransaction(IDBTransactionBackend*);
+
+    // This is just an efficient way to keep references to all transactions.
+    HashMap&lt;IDBTransactionBackend*, RefPtr&lt;IDBTransactionBackend&gt; &gt; m_transactions;
+    // Transactions in different states are grouped below.
+    ListHashSet&lt;IDBTransactionBackend*&gt; m_queuedTransactions;
+    HashSet&lt;IDBTransactionBackend*&gt; m_startedTransactions;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // IDBTransactionCoordinator_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyAnycppfromrev189745trunkSourceWebCoreModulesindexeddbIDBAnycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,261 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyAny.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;DOMStringList.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &quot;LegacyCursorWithValue.h&quot;
+#include &quot;LegacyDatabase.h&quot;
+#include &quot;LegacyFactory.h&quot;
+#include &quot;LegacyIndex.h&quot;
+#include &quot;LegacyObjectStore.h&quot;
+
+namespace WebCore {
+
+PassRefPtr&lt;LegacyAny&gt; LegacyAny::createInvalid()
+{
+    return adoptRef(new LegacyAny(UndefinedType));
+}
+
+PassRefPtr&lt;LegacyAny&gt; LegacyAny::createNull()
+{
+    return adoptRef(new LegacyAny(NullType));
+}
+
+PassRefPtr&lt;LegacyAny&gt; LegacyAny::createString(const String&amp; value)
+{
+    return adoptRef(new LegacyAny(value));
+}
+
+LegacyAny::LegacyAny(Type type)
+    : m_type(type)
+    , m_integer(0)
+{
+    ASSERT(type == UndefinedType || type == NullType);
+}
+
+LegacyAny::~LegacyAny()
+{
+}
+
+PassRefPtr&lt;DOMStringList&gt; LegacyAny::domStringList()
+{
+    ASSERT(m_type == DOMStringListType);
+    return m_domStringList;
+}
+
+PassRefPtr&lt;IDBCursor&gt; LegacyAny::idbCursor()
+{
+    ASSERT(m_type == IDBCursorType);
+    return m_idbCursor;
+}
+
+PassRefPtr&lt;IDBCursorWithValue&gt; LegacyAny::idbCursorWithValue()
+{
+    ASSERT(m_type == IDBCursorWithValueType);
+    return m_idbCursorWithValue;
+}
+
+PassRefPtr&lt;IDBDatabase&gt; LegacyAny::idbDatabase()
+{
+    ASSERT(m_type == IDBDatabaseType);
+    return m_idbDatabase;
+}
+
+PassRefPtr&lt;IDBFactory&gt; LegacyAny::idbFactory()
+{
+    ASSERT(m_type == IDBFactoryType);
+    return m_idbFactory;
+}
+
+PassRefPtr&lt;IDBIndex&gt; LegacyAny::idbIndex()
+{
+    ASSERT(m_type == IDBIndexType);
+    return m_idbIndex;
+}
+
+PassRefPtr&lt;IDBObjectStore&gt; LegacyAny::idbObjectStore()
+{
+    ASSERT(m_type == IDBObjectStoreType);
+    return m_idbObjectStore;
+}
+
+PassRefPtr&lt;IDBTransaction&gt; LegacyAny::idbTransaction()
+{
+    ASSERT(m_type == IDBTransactionType);
+    return m_idbTransaction;
+}
+
+const Deprecated::ScriptValue&amp; LegacyAny::scriptValue()
+{
+    ASSERT(m_type == ScriptValueType);
+    return m_scriptValue;
+}
+
+const String&amp; LegacyAny::string()
+{
+    ASSERT(m_type == StringType);
+    return m_string;
+}
+
+int64_t LegacyAny::integer()
+{
+    ASSERT(m_type == IntegerType);
+    return m_integer;
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;DOMStringList&gt; value)
+    : m_type(DOMStringListType)
+    , m_domStringList(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyCursorWithValue&gt; value)
+    : m_type(IDBCursorWithValueType)
+    , m_idbCursorWithValue(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyCursor&gt; value)
+    : m_type(IDBCursorType)
+    , m_idbCursor(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyDatabase&gt; value)
+    : m_type(IDBDatabaseType)
+    , m_idbDatabase(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyFactory&gt; value)
+    : m_type(IDBFactoryType)
+    , m_idbFactory(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyIndex&gt; value)
+    : m_type(IDBIndexType)
+    , m_idbIndex(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyTransaction&gt; value)
+    : m_type(IDBTransactionType)
+    , m_idbTransaction(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(PassRefPtr&lt;LegacyObjectStore&gt; value)
+    : m_type(IDBObjectStoreType)
+    , m_idbObjectStore(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(const Deprecated::ScriptValue&amp; value)
+    : m_type(ScriptValueType)
+    , m_scriptValue(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(const IDBKeyPath&amp; value)
+    : m_type(KeyPathType)
+    , m_idbKeyPath(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(const String&amp; value)
+    : m_type(StringType)
+    , m_string(value)
+    , m_integer(0)
+{
+}
+
+LegacyAny::LegacyAny(int64_t value)
+    : m_type(IntegerType)
+    , m_integer(value)
+{
+}
+
+LegacyCursor* LegacyAny::legacyCursor()
+{
+    ASSERT(m_type == IDBCursorType);
+    return m_idbCursor.get();
+}
+
+LegacyCursorWithValue* LegacyAny::legacyCursorWithValue()
+{
+    ASSERT(m_type == IDBCursorWithValueType);
+    return m_idbCursorWithValue.get();
+}
+
+LegacyDatabase* LegacyAny::legacyDatabase()
+{
+    ASSERT(m_type == IDBDatabaseType);
+    return m_idbDatabase.get();
+}
+
+LegacyFactory* LegacyAny::legacyFactory()
+{
+    ASSERT(m_type == IDBFactoryType);
+    return m_idbFactory.get();
+}
+
+LegacyIndex* LegacyAny::legacyIndex()
+{
+    ASSERT(m_type == IDBIndexType);
+    return m_idbIndex.get();
+}
+
+LegacyObjectStore* LegacyAny::legacyObjectStore()
+{
+    ASSERT(m_type == IDBObjectStoreType);
+    return m_idbObjectStore.get();
+}
+
+LegacyTransaction* LegacyAny::legacyTransaction()
+{
+    ASSERT(m_type == IDBTransactionType);
+    return m_idbTransaction.get();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyAnyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyAny_h
+#define LegacyAny_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;bindings/ScriptValue.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class DOMStringList;
+class IDBCursor;
+class IDBCursorWithValue;
+class IDBDatabase;
+class IDBFactory;
+class IDBIndex;
+class IDBKeyPath;
+class IDBObjectStore;
+class IDBTransaction;
+
+class LegacyCursor;
+class LegacyCursorWithValue;
+class LegacyDatabase;
+class LegacyFactory;
+class LegacyIndex;
+class LegacyObjectStore;
+class LegacyTransaction;
+
+class LegacyAny : public IDBAny {
+public:
+    static PassRefPtr&lt;LegacyAny&gt; createInvalid();
+    static PassRefPtr&lt;LegacyAny&gt; createNull();
+    static PassRefPtr&lt;LegacyAny&gt; createString(const String&amp;);
+    template&lt;typename T&gt;
+    static PassRefPtr&lt;LegacyAny&gt; create(T* idbObject)
+    {
+        return adoptRef(new LegacyAny(idbObject));
+    }
+    template&lt;typename T&gt;
+    static PassRefPtr&lt;LegacyAny&gt; create(const T&amp; idbObject)
+    {
+        return adoptRef(new LegacyAny(idbObject));
+    }
+    template&lt;typename T&gt;
+    static PassRefPtr&lt;LegacyAny&gt; create(PassRefPtr&lt;T&gt; idbObject)
+    {
+        return adoptRef(new LegacyAny(idbObject));
+    }
+    static PassRefPtr&lt;LegacyAny&gt; create(int64_t value)
+    {
+        return adoptRef(new LegacyAny(value));
+    }
+    ~LegacyAny();
+
+    virtual Type type() const override final { return m_type; }
+    // Use type() to figure out which one of these you're allowed to call.
+    virtual PassRefPtr&lt;DOMStringList&gt; domStringList() override final;
+    virtual PassRefPtr&lt;IDBCursor&gt; idbCursor() override final;
+    virtual PassRefPtr&lt;IDBCursorWithValue&gt; idbCursorWithValue() override final;
+    virtual PassRefPtr&lt;IDBDatabase&gt; idbDatabase() override final;
+    virtual PassRefPtr&lt;IDBFactory&gt; idbFactory() override final;
+    virtual PassRefPtr&lt;IDBIndex&gt; idbIndex() override final;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; idbObjectStore() override final;
+    virtual PassRefPtr&lt;IDBTransaction&gt; idbTransaction() override final;
+    virtual const Deprecated::ScriptValue&amp; scriptValue() override final;
+    virtual int64_t integer() override final;
+    virtual const String&amp; string() override final;
+    virtual const IDBKeyPath&amp; keyPath() override final { return m_idbKeyPath; };
+
+    LegacyCursor* legacyCursor();
+    LegacyCursorWithValue* legacyCursorWithValue();
+    LegacyDatabase* legacyDatabase();
+    LegacyFactory* legacyFactory();
+    LegacyIndex* legacyIndex();
+    LegacyObjectStore* legacyObjectStore();
+    LegacyTransaction* legacyTransaction();
+
+private:
+    explicit LegacyAny(Type);
+    explicit LegacyAny(PassRefPtr&lt;DOMStringList&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyCursor&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyCursorWithValue&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyDatabase&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyFactory&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyIndex&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyObjectStore&gt;);
+    explicit LegacyAny(PassRefPtr&lt;LegacyTransaction&gt;);
+    explicit LegacyAny(const IDBKeyPath&amp;);
+    explicit LegacyAny(const String&amp;);
+    explicit LegacyAny(const Deprecated::ScriptValue&amp;);
+    explicit LegacyAny(int64_t);
+
+    const Type m_type;
+
+    // Only one of the following should ever be in use at any given time.
+    const RefPtr&lt;DOMStringList&gt; m_domStringList;
+    const RefPtr&lt;LegacyCursor&gt; m_idbCursor;
+    const RefPtr&lt;LegacyCursorWithValue&gt; m_idbCursorWithValue;
+    const RefPtr&lt;LegacyDatabase&gt; m_idbDatabase;
+    const RefPtr&lt;LegacyFactory&gt; m_idbFactory;
+    const RefPtr&lt;LegacyIndex&gt; m_idbIndex;
+    const RefPtr&lt;LegacyObjectStore&gt; m_idbObjectStore;
+    const RefPtr&lt;LegacyTransaction&gt; m_idbTransaction;
+    const IDBKeyPath m_idbKeyPath;
+    const Deprecated::ScriptValue m_scriptValue;
+    const String m_string;
+    const int64_t m_integer;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // LegacyAny_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,277 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyCursor.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCallbacks.h&quot;
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;LegacyRequest.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &lt;inspector/ScriptCallStack.h&gt;
+#include &lt;limits&gt;
+
+namespace WebCore {
+
+Ref&lt;LegacyCursor&gt; LegacyCursor::create(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, LegacyRequest* request, LegacyAny* source, LegacyTransaction* transaction)
+{
+    return adoptRef(*new LegacyCursor(backend, direction, request, source, transaction));
+}
+
+LegacyCursor::LegacyCursor(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, LegacyRequest* request, LegacyAny* source, LegacyTransaction* transaction)
+    : m_backend(backend)
+    , m_request(request)
+    , m_direction(direction)
+    , m_source(source)
+    , m_transaction(transaction)
+    , m_transactionNotifier(transaction, this)
+    , m_gotValue(false)
+{
+    ASSERT(m_backend);
+    ASSERT(m_request);
+    ASSERT(m_source-&gt;type() == IDBAny::IDBObjectStoreType || m_source-&gt;type() == IDBAny::IDBIndexType);
+    ASSERT(m_transaction);
+}
+
+LegacyCursor::~LegacyCursor()
+{
+}
+
+const String&amp; LegacyCursor::direction() const
+{
+    LOG(StorageAPI, &quot;LegacyCursor::direction&quot;);
+    return directionToString(m_direction);
+}
+
+const Deprecated::ScriptValue&amp; LegacyCursor::key() const
+{
+    LOG(StorageAPI, &quot;LegacyCursor::key&quot;);
+    return m_currentKeyValue;
+}
+
+const Deprecated::ScriptValue&amp; LegacyCursor::primaryKey() const
+{
+    LOG(StorageAPI, &quot;LegacyCursor::primaryKey&quot;);
+    return m_currentPrimaryKeyValue;
+}
+
+const Deprecated::ScriptValue&amp; LegacyCursor::value() const
+{
+    LOG(StorageAPI, &quot;LegacyCursor::value&quot;);
+    return m_currentValue;
+}
+
+IDBAny* LegacyCursor::source() const
+{
+    return m_source.get();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyCursor::update(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyCursor::update&quot;);
+
+    if (!m_gotValue || isKeyCursor()) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (m_transaction-&gt;isReadOnly()) {
+        ec = IDBDatabaseException::ReadOnlyError;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyObjectStore&gt; objectStore = effectiveObjectStore();
+    const IDBKeyPath&amp; keyPath = objectStore-&gt;metadata().keyPath;
+    const bool usesInLineKeys = !keyPath.isNull();
+    if (usesInLineKeys) {
+        RefPtr&lt;IDBKey&gt; keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_request-&gt;requestState()-&gt;exec(), value, keyPath);
+        if (!keyPathKey || !keyPathKey-&gt;isEqual(m_currentPrimaryKey.get())) {
+            ec = IDBDatabaseException::DataError;
+            return 0;
+        }
+    }
+
+    return objectStore-&gt;put(IDBDatabaseBackend::CursorUpdate, LegacyAny::create(this), state, value, m_currentPrimaryKey, ec);
+}
+
+void LegacyCursor::advance(unsigned long count, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    LOG(StorageAPI, &quot;LegacyCursor::advance&quot;);
+    if (!m_gotValue) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+
+    if (!count) {
+        ec = TypeError;
+        return;
+    }
+
+    m_request-&gt;setPendingCursor(this);
+    m_gotValue = false;
+    m_backend-&gt;advance(count, m_request, ec);
+    ASSERT(!ec);
+}
+
+void LegacyCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
+{
+    DOMRequestState requestState(context);
+    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
+    continueFunction(key.release(), ec);
+}
+
+void LegacyCursor::continueFunction(PassRefPtr&lt;IDBKey&gt; key, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    LOG(StorageAPI, &quot;LegacyCursor::continue&quot;);
+    if (key &amp;&amp; !key-&gt;isValid()) {
+        ec = IDBDatabaseException::DataError;
+        return;
+    }
+
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+
+    if (!m_gotValue) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+
+    if (key) {
+        ASSERT(m_currentKey);
+        if (m_direction == IndexedDB::CursorDirection::Next || m_direction == IndexedDB::CursorDirection::NextNoDuplicate) {
+            if (!m_currentKey-&gt;isLessThan(key.get())) {
+                ec = IDBDatabaseException::DataError;
+                return;
+            }
+        } else {
+            if (!key-&gt;isLessThan(m_currentKey.get())) {
+                ec = IDBDatabaseException::DataError;
+                return;
+            }
+        }
+    }
+
+    // FIXME: We're not using the context from when continue was called, which means the callback
+    //        will be on the original context openCursor was called on. Is this right?
+    m_request-&gt;setPendingCursor(this);
+    m_gotValue = false;
+    m_backend-&gt;continueFunction(key, m_request, ec);
+    ASSERT(!ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    LOG(StorageAPI, &quot;LegacyCursor::delete&quot;);
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (m_transaction-&gt;isReadOnly()) {
+        ec = IDBDatabaseException::ReadOnlyError;
+        return 0;
+    }
+
+    if (!m_gotValue || isKeyCursor()) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    m_backend-&gt;deleteFunction(request, ec);
+    ASSERT(!ec);
+    return request.release();
+}
+
+void LegacyCursor::postSuccessHandlerCallback()
+{
+    m_backend-&gt;postSuccessHandlerCallback();
+}
+
+void LegacyCursor::close()
+{
+    m_transactionNotifier.cursorFinished();
+    if (m_request) {
+        m_request-&gt;finishCursor();
+        m_request = nullptr;
+    }
+}
+
+void LegacyCursor::setValueReady(DOMRequestState* state, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, Deprecated::ScriptValue&amp; value)
+{
+    m_currentKey = key;
+    m_currentKeyValue = idbKeyToScriptValue(state, m_currentKey);
+
+    m_currentPrimaryKey = primaryKey;
+    m_currentPrimaryKeyValue = idbKeyToScriptValue(state, m_currentPrimaryKey);
+
+    if (!isKeyCursor()) {
+        RefPtr&lt;LegacyObjectStore&gt; objectStore = effectiveObjectStore();
+        const IDBObjectStoreMetadata metadata = objectStore-&gt;metadata();
+        if (metadata.autoIncrement &amp;&amp; !metadata.keyPath.isNull()) {
+#ifndef NDEBUG
+            RefPtr&lt;IDBKey&gt; expectedKey = createIDBKeyFromScriptValueAndKeyPath(m_request-&gt;requestState()-&gt;exec(), value, metadata.keyPath);
+            ASSERT(!expectedKey || expectedKey-&gt;isEqual(m_currentPrimaryKey.get()));
+#endif
+            bool injected = injectIDBKeyIntoScriptValue(m_request-&gt;requestState(), m_currentPrimaryKey, value, metadata.keyPath);
+            // FIXME: There is no way to report errors here. Move this into onSuccessWithContinuation so that we can abort the transaction there. See: https://bugs.webkit.org/show_bug.cgi?id=92278
+            ASSERT_UNUSED(injected, injected);
+        }
+    }
+    m_currentValue = value;
+
+    m_gotValue = true;
+}
+
+PassRefPtr&lt;LegacyObjectStore&gt; LegacyCursor::effectiveObjectStore()
+{
+    if (m_source-&gt;type() == IDBAny::IDBObjectStoreType)
+        return m_source-&gt;legacyObjectStore();
+    RefPtr&lt;LegacyIndex&gt; index = m_source-&gt;legacyIndex();
+    return index-&gt;legacyObjectStore();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorhfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursor.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyCursor_h
+#define LegacyCursor_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &quot;LegacyObjectStore.h&quot;
+#include &quot;LegacyTransaction.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;bindings/ScriptValue.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class DOMRequestState;
+class IDBAny;
+class IDBCallbacks;
+class IDBCursorBackend;
+class LegacyRequest;
+class ScriptExecutionContext;
+
+typedef int ExceptionCode;
+
+class LegacyCursor : public IDBCursorWithValue {
+public:
+    static Ref&lt;LegacyCursor&gt; create(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, LegacyRequest*, LegacyAny* source, LegacyTransaction*);
+    virtual ~LegacyCursor();
+
+    // Implement the IDL
+    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() const;
+
+    PassRefPtr&lt;IDBRequest&gt; update(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
+    void advance(unsigned long, ExceptionCode&amp;);
+    // FIXME: Try to modify the code generator so this overload is unneeded.
+    void continueFunction(ScriptExecutionContext*, ExceptionCode&amp; ec) { continueFunction(static_cast&lt;IDBKey*&gt;(nullptr), ec); }
+    void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, ExceptionCode&amp;);
+
+    void continueFunction(PassRefPtr&lt;IDBKey&gt;, ExceptionCode&amp;);
+    void postSuccessHandlerCallback();
+    void close();
+    void setValueReady(DOMRequestState*, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, Deprecated::ScriptValue&amp;);
+    PassRefPtr&lt;IDBKey&gt; idbPrimaryKey() { return m_currentPrimaryKey; }
+
+protected:
+    LegacyCursor(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, LegacyRequest*, LegacyAny* source, LegacyTransaction*);
+    virtual bool isKeyCursor() const { return true; }
+
+private:
+    PassRefPtr&lt;LegacyObjectStore&gt; effectiveObjectStore();
+
+    RefPtr&lt;IDBCursorBackend&gt; m_backend;
+    RefPtr&lt;LegacyRequest&gt; m_request;
+    const IndexedDB::CursorDirection m_direction;
+    RefPtr&lt;LegacyAny&gt; m_source;
+    RefPtr&lt;LegacyTransaction&gt; m_transaction;
+    LegacyTransaction::OpenCursorNotifier m_transactionNotifier;
+    bool m_gotValue;
+    // These values are held because m_backend may advance while they
+    // are still valid for the current success handlers.
+    Deprecated::ScriptValue m_currentKeyValue;
+    Deprecated::ScriptValue m_currentPrimaryKeyValue;
+    RefPtr&lt;IDBKey&gt; m_currentKey;
+    RefPtr&lt;IDBKey&gt; m_currentPrimaryKey;
+    Deprecated::ScriptValue m_currentValue;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyCursor_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorWithValuecppfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorWithValuecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyCursorWithValue.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBKey.h&quot;
+
+namespace WebCore {
+
+PassRefPtr&lt;LegacyCursorWithValue&gt; LegacyCursorWithValue::create(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, LegacyRequest* request, LegacyAny* source, LegacyTransaction* transaction)
+{
+    return adoptRef(new LegacyCursorWithValue(backend, direction, request, source, transaction));
+}
+
+PassRefPtr&lt;LegacyCursorWithValue&gt; LegacyCursorWithValue::fromCursor(PassRefPtr&lt;LegacyCursor&gt; prpCursor)
+{
+    RefPtr&lt;LegacyCursorWithValue&gt; cursorWithValue(static_cast&lt;LegacyCursorWithValue*&gt;(prpCursor.get()));
+    return cursorWithValue.release();
+}
+
+LegacyCursorWithValue::LegacyCursorWithValue(PassRefPtr&lt;IDBCursorBackend&gt; backend, IndexedDB::CursorDirection direction, LegacyRequest* request, LegacyAny* source, LegacyTransaction* transaction)
+    : LegacyCursor(backend, direction, request, source, transaction)
+{
+}
+
+LegacyCursorWithValue::~LegacyCursorWithValue()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyCursorWithValuehfromrev189745trunkSourceWebCoreModulesindexeddbIDBCursorWithValueh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyCursorWithValue.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyCursorWithValue_h
+#define LegacyCursorWithValue_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;LegacyCursor.h&quot;
+
+namespace WebCore {
+
+class LegacyCursorWithValue : public LegacyCursor {
+public:
+    static PassRefPtr&lt;LegacyCursorWithValue&gt; create(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, LegacyRequest*, LegacyAny* source, LegacyTransaction*);
+    static PassRefPtr&lt;LegacyCursorWithValue&gt; fromCursor(PassRefPtr&lt;LegacyCursor&gt;);
+    virtual ~LegacyCursorWithValue();
+
+    // The value attribute defined in the IDL is simply implemented in LegacyCursor (but not exposed via
+    // its IDL). This is to make the implementation more simple while matching what the spec says.
+
+protected:
+    virtual bool isKeyCursor() const override { return false; }
+
+private:
+    LegacyCursorWithValue(PassRefPtr&lt;IDBCursorBackend&gt;, IndexedDB::CursorDirection, LegacyRequest*, LegacyAny* source, LegacyTransaction*);
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyCursorWithValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyDatabasecppfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,403 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyDatabase.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;DOMStringList.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseError.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBEventDispatcher.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IDBVersionChangeEvent.h&quot;
+#include &quot;LegacyObjectStore.h&quot;
+#include &quot;LegacyVersionChangeEvent.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &lt;atomic&gt;
+#include &lt;inspector/ScriptCallStack.h&gt;
+#include &lt;limits&gt;
+#include &lt;wtf/Atomics.h&gt;
+
+namespace WebCore {
+
+Ref&lt;LegacyDatabase&gt; LegacyDatabase::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseBackend&gt; database, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks)
+{
+    Ref&lt;LegacyDatabase&gt; legacyDatabase(adoptRef(*new LegacyDatabase(context, database, callbacks)));
+    legacyDatabase-&gt;suspendIfNeeded();
+    return legacyDatabase;
+}
+
+LegacyDatabase::LegacyDatabase(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseBackend&gt; backend, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks)
+    : IDBDatabase(context)
+    , m_backend(backend)
+    , m_closePending(false)
+    , m_isClosed(false)
+    , m_contextStopped(false)
+    , m_databaseCallbacks(callbacks)
+{
+    // We pass a reference of this object before it can be adopted.
+    relaxAdoptionRequirement();
+}
+
+LegacyDatabase::~LegacyDatabase()
+{
+    // This does what LegacyDatabase::close does, but without any ref/deref of the
+    // database since it is already in the process of being deleted. The logic here
+    // is also simpler since we know there are no transactions (since they ref the
+    // database when they are alive).
+
+    ASSERT(m_transactions.isEmpty());
+
+    if (!m_closePending) {
+        m_closePending = true;
+        m_backend-&gt;close(m_databaseCallbacks);
+    }
+
+    if (auto* context = scriptExecutionContext()) {
+        // Remove any pending versionchange events scheduled to fire on this
+        // connection. They would have been scheduled by the backend when another
+        // connection called setVersion, but the frontend connection is being
+        // closed before they could fire.
+        for (auto&amp; event : m_enqueuedEvents)
+            context-&gt;eventQueue().cancelEvent(*event);
+    }
+}
+
+int64_t LegacyDatabase::nextTransactionId()
+{
+    // Only keep a 32-bit counter to allow ports to use the other 32
+    // bits of the id.
+    static std::atomic&lt;uint32_t&gt; currentTransactionId;
+
+    return ++currentTransactionId;
+}
+
+void LegacyDatabase::transactionCreated(LegacyTransaction* transaction)
+{
+    ASSERT(transaction);
+    ASSERT(!m_transactions.contains(transaction-&gt;id()));
+    m_transactions.add(transaction-&gt;id(), transaction);
+
+    if (transaction-&gt;isVersionChange()) {
+        ASSERT(!m_versionChangeTransaction);
+        m_versionChangeTransaction = transaction;
+    }
+}
+
+void LegacyDatabase::transactionFinished(LegacyTransaction* transaction)
+{
+    ASSERT(transaction);
+    ASSERT(m_transactions.contains(transaction-&gt;id()));
+    ASSERT(m_transactions.get(transaction-&gt;id()) == transaction);
+    m_transactions.remove(transaction-&gt;id());
+
+    if (transaction-&gt;isVersionChange()) {
+        ASSERT(m_versionChangeTransaction == transaction);
+        m_versionChangeTransaction = nullptr;
+    }
+
+    if (m_closePending &amp;&amp; m_transactions.isEmpty())
+        closeConnection();
+}
+
+void LegacyDatabase::onAbort(int64_t transactionId, PassRefPtr&lt;IDBDatabaseError&gt; error)
+{
+    ASSERT(m_transactions.contains(transactionId));
+    m_transactions.get(transactionId)-&gt;onAbort(error);
+}
+
+void LegacyDatabase::onComplete(int64_t transactionId)
+{
+    ASSERT(m_transactions.contains(transactionId));
+    m_transactions.get(transactionId)-&gt;onComplete();
+}
+
+PassRefPtr&lt;DOMStringList&gt; LegacyDatabase::objectStoreNames() const
+{
+    RefPtr&lt;DOMStringList&gt; objectStoreNames = DOMStringList::create();
+    for (auto&amp; objectStore : m_metadata.objectStores.values())
+        objectStoreNames-&gt;append(objectStore.name);
+    objectStoreNames-&gt;sort();
+    return objectStoreNames.release();
+}
+
+uint64_t LegacyDatabase::version() const
+{
+    // NoIntVersion is a special value for internal use only and shouldn't be exposed to script.
+    // DefaultIntVersion should be exposed instead.
+    return m_metadata.version != IDBDatabaseMetadata::NoIntVersion ? m_metadata.version : static_cast&lt;uint64_t&gt;(IDBDatabaseMetadata::DefaultIntVersion);
+}
+
+PassRefPtr&lt;IDBObjectStore&gt; LegacyDatabase::createObjectStore(const String&amp; name, const Dictionary&amp; options, ExceptionCode&amp; ec)
+{
+    IDBKeyPath keyPath;
+    bool autoIncrement = false;
+    if (!options.isUndefinedOrNull()) {
+        String keyPathString;
+        Vector&lt;String&gt; keyPathArray;
+        if (options.get(&quot;keyPath&quot;, keyPathArray))
+            keyPath = IDBKeyPath(keyPathArray);
+        else if (options.getWithUndefinedOrNullCheck(&quot;keyPath&quot;, keyPathString))
+            keyPath = IDBKeyPath(keyPathString);
+
+        options.get(&quot;autoIncrement&quot;, autoIncrement);
+    }
+
+    return createObjectStore(name, keyPath, autoIncrement, ec);
+}
+
+PassRefPtr&lt;IDBObjectStore&gt; LegacyDatabase::createObjectStore(const String&amp; name, const IDBKeyPath&amp; keyPath, bool autoIncrement, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::createObjectStore&quot;);
+    if (!m_versionChangeTransaction) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_versionChangeTransaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+
+    if (containsObjectStore(name)) {
+        ec = IDBDatabaseException::ConstraintError;
+        return 0;
+    }
+
+    if (!keyPath.isNull() &amp;&amp; !keyPath.isValid()) {
+        ec = IDBDatabaseException::SyntaxError;
+        return 0;
+    }
+
+    if (autoIncrement &amp;&amp; ((keyPath.type() == IDBKeyPath::StringType &amp;&amp; keyPath.string().isEmpty()) || keyPath.type() == IDBKeyPath::ArrayType)) {
+        ec = IDBDatabaseException::InvalidAccessError;
+        return 0;
+    }
+
+    int64_t objectStoreId = m_metadata.maxObjectStoreId + 1;
+    m_backend-&gt;createObjectStore(m_versionChangeTransaction-&gt;id(), objectStoreId, name, keyPath, autoIncrement);
+
+    IDBObjectStoreMetadata metadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
+    RefPtr&lt;LegacyObjectStore&gt; objectStore = LegacyObjectStore::create(metadata, m_versionChangeTransaction.get());
+    m_metadata.objectStores.set(metadata.id, metadata);
+    ++m_metadata.maxObjectStoreId;
+
+    m_versionChangeTransaction-&gt;objectStoreCreated(name, objectStore);
+    return objectStore.release();
+}
+
+void LegacyDatabase::deleteObjectStore(const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::deleteObjectStore&quot;);
+    if (!m_versionChangeTransaction) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+    if (!m_versionChangeTransaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+
+    int64_t objectStoreId = findObjectStoreId(name);
+    if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
+        ec = IDBDatabaseException::NotFoundError;
+        return;
+    }
+
+    m_backend-&gt;deleteObjectStore(m_versionChangeTransaction-&gt;id(), objectStoreId);
+    m_versionChangeTransaction-&gt;objectStoreDeleted(name);
+    m_metadata.objectStores.remove(objectStoreId);
+}
+
+PassRefPtr&lt;IDBTransaction&gt; LegacyDatabase::transaction(ScriptExecutionContext* context, const Vector&lt;String&gt;&amp; scope, const String&amp; modeString, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::transaction&quot;);
+    if (!scope.size()) {
+        ec = IDBDatabaseException::InvalidAccessError;
+        return 0;
+    }
+
+    IndexedDB::TransactionMode mode = IDBTransaction::stringToMode(modeString, ec);
+    if (ec)
+        return 0;
+
+    if (m_versionChangeTransaction || m_closePending) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+
+    Vector&lt;int64_t&gt; objectStoreIds;
+    for (auto&amp; name : scope) {
+        int64_t objectStoreId = findObjectStoreId(name);
+        if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
+            ec = IDBDatabaseException::NotFoundError;
+            return 0;
+        }
+        objectStoreIds.append(objectStoreId);
+    }
+
+    int64_t transactionId = nextTransactionId();
+    m_backend-&gt;createTransaction(transactionId, m_databaseCallbacks, objectStoreIds, mode);
+
+    RefPtr&lt;LegacyTransaction&gt; transaction = LegacyTransaction::create(context, transactionId, scope, mode, this);
+    return transaction.release();
+}
+
+PassRefPtr&lt;IDBTransaction&gt; LegacyDatabase::transaction(ScriptExecutionContext* context, const String&amp; storeName, const String&amp; mode, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;DOMStringList&gt; storeNames = DOMStringList::create();
+    storeNames-&gt;append(storeName);
+    return transaction(context, storeNames, mode, ec);
+}
+
+void LegacyDatabase::forceClose()
+{
+    for (auto&amp; transaction : m_transactions.values())
+        transaction-&gt;abort(IGNORE_EXCEPTION);
+    this-&gt;close();
+}
+
+void LegacyDatabase::close()
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::close&quot;);
+    if (m_closePending)
+        return;
+
+    m_closePending = true;
+
+    if (m_transactions.isEmpty())
+        closeConnection();
+}
+
+void LegacyDatabase::closeConnection()
+{
+    ASSERT(m_closePending);
+    ASSERT(m_transactions.isEmpty());
+
+    // Closing may result in deallocating the last transaction, which could result in deleting
+    // this LegacyDatabase. We need the deallocation to happen after we are through.
+    Ref&lt;LegacyDatabase&gt; protect(*this);
+
+    m_backend-&gt;close(m_databaseCallbacks);
+
+    if (m_contextStopped || !scriptExecutionContext())
+        return;
+
+    EventQueue&amp; eventQueue = scriptExecutionContext()-&gt;eventQueue();
+    // Remove any pending versionchange events scheduled to fire on this
+    // connection. They would have been scheduled by the backend when another
+    // connection called setVersion, but the frontend connection is being
+    // closed before they could fire.
+    for (auto&amp; event : m_enqueuedEvents) {
+        bool removed = eventQueue.cancelEvent(*event);
+        ASSERT_UNUSED(removed, removed);
+    }
+
+    m_isClosed = true;
+}
+
+void LegacyDatabase::onVersionChange(uint64_t oldVersion, uint64_t newVersion)
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::onVersionChange&quot;);
+    if (m_contextStopped || !scriptExecutionContext())
+        return;
+
+    if (m_closePending)
+        return;
+
+    ASSERT(newVersion != IDBDatabaseMetadata::NoIntVersion);
+    enqueueEvent(LegacyVersionChangeEvent::create(oldVersion, newVersion, eventNames().versionchangeEvent));
+}
+
+void LegacyDatabase::enqueueEvent(PassRefPtr&lt;Event&gt; event)
+{
+    ASSERT(!m_contextStopped);
+    ASSERT(!m_isClosed);
+    ASSERT(scriptExecutionContext());
+    event-&gt;setTarget(this);
+    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event.get());
+    m_enqueuedEvents.append(event);
+}
+
+bool LegacyDatabase::dispatchEvent(PassRefPtr&lt;Event&gt; event)
+{
+    LOG(StorageAPI, &quot;LegacyDatabase::dispatchEvent&quot;);
+    ASSERT(event-&gt;type() == eventNames().versionchangeEvent);
+    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
+        if (m_enqueuedEvents[i].get() == event.get())
+            m_enqueuedEvents.remove(i);
+    }
+    return EventTarget::dispatchEvent(event.get());
+}
+
+int64_t LegacyDatabase::findObjectStoreId(const String&amp; name) const
+{
+    for (auto&amp; objectStore : m_metadata.objectStores) {
+        if (objectStore.value.name == name) {
+            ASSERT(objectStore.key != IDBObjectStoreMetadata::InvalidId);
+            return objectStore.key;
+        }
+    }
+    return IDBObjectStoreMetadata::InvalidId;
+}
+
+bool LegacyDatabase::hasPendingActivity() const
+{
+    // The script wrapper must not be collected before the object is closed or
+    // we can't fire a &quot;versionchange&quot; event to let script manually close the connection.
+    return !m_closePending &amp;&amp; hasEventListeners() &amp;&amp; !m_contextStopped;
+}
+
+void LegacyDatabase::stop()
+{
+    // Stop fires at a deterministic time, so we need to call close in it.
+    close();
+
+    m_contextStopped = true;
+}
+
+const char* LegacyDatabase::activeDOMObjectName() const
+{
+    return &quot;LegacyDatabase&quot;;
+}
+
+bool LegacyDatabase::canSuspendForPageCache() const
+{
+    return m_isClosed;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyDatabasehfromrev189745trunkSourceWebCoreModulesindexeddbIDBDatabaseh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyDatabase.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyDatabase_h
+#define LegacyDatabase_h
+
+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;DOMStringList.h&quot;
+#include &quot;Dictionary.h&quot;
+#include &quot;Event.h&quot;
+#include &quot;EventTarget.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &quot;LegacyTransaction.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class LegacyTransaction;
+class ScriptExecutionContext;
+
+typedef int ExceptionCode;
+
+class LegacyDatabase final : public IDBDatabase {
+public:
+    static Ref&lt;LegacyDatabase&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseBackend&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
+    ~LegacyDatabase();
+
+    void setMetadata(const IDBDatabaseMetadata&amp; metadata) { m_metadata = metadata; }
+    void transactionCreated(LegacyTransaction*);
+    void transactionFinished(LegacyTransaction*);
+
+    // Implement the IDL
+    virtual const String name() const override final { return m_metadata.name; }
+    virtual uint64_t version() const override final;
+    virtual PassRefPtr&lt;DOMStringList&gt; objectStoreNames() const override final;
+
+    virtual PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const Dictionary&amp;, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBObjectStore&gt; createObjectStore(const String&amp; name, const IDBKeyPath&amp;, bool autoIncrement, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const Vector&lt;String&gt;&amp;, const String&amp; mode, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext*, const String&amp;, const String&amp; mode, ExceptionCode&amp;) override final;
+    virtual void deleteObjectStore(const String&amp; name, ExceptionCode&amp;) override final;
+    virtual void close() override final;
+
+    // IDBDatabaseCallbacks
+    virtual void onVersionChange(uint64_t oldVersion, uint64_t newVersion);
+    virtual void onAbort(int64_t, PassRefPtr&lt;IDBDatabaseError&gt;);
+    virtual void onComplete(int64_t);
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override final { return IDBDatabaseEventTargetInterfaceType; }
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+
+    bool isClosePending() const { return m_closePending; }
+    void forceClose();
+    virtual const IDBDatabaseMetadata metadata() const override final { return m_metadata; }
+    void enqueueEvent(PassRefPtr&lt;Event&gt;);
+
+    using EventTarget::dispatchEvent;
+    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
+
+    int64_t findObjectStoreId(const String&amp; name) const;
+    bool containsObjectStore(const String&amp; name) const
+    {
+        return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId;
+    }
+
+    IDBDatabaseBackend* backend() const { return m_backend.get(); }
+
+    static int64_t nextTransactionId();
+
+    // ActiveDOMObject API.
+    bool hasPendingActivity() const override;
+
+private:
+    LegacyDatabase(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseBackend&gt;, PassRefPtr&lt;IDBDatabaseCallbacks&gt;);
+
+    PassRefPtr&lt;IDBTransaction&gt; transaction(ScriptExecutionContext* context, PassRefPtr&lt;DOMStringList&gt; scope, const String&amp; mode, ExceptionCode&amp; ec) { return transaction(context, *scope, mode, ec); }
+
+    // ActiveDOMObject API.
+    void stop() override;
+    const char* activeDOMObjectName() const override;
+    bool canSuspendForPageCache() const override;
+
+    // EventTarget
+    virtual void refEventTarget() override final { ref(); }
+    virtual void derefEventTarget() override final { deref(); }
+
+    void closeConnection();
+
+    IDBDatabaseMetadata m_metadata;
+    RefPtr&lt;IDBDatabaseBackend&gt; m_backend;
+    RefPtr&lt;LegacyTransaction&gt; m_versionChangeTransaction;
+    typedef HashMap&lt;int64_t, LegacyTransaction*&gt; TransactionMap;
+    TransactionMap m_transactions;
+
+    bool m_closePending;
+    bool m_isClosed;
+    bool m_contextStopped;
+
+    // Keep track of the versionchange events waiting to be fired on this
+    // database so that we can cancel them if the database closes.
+    Vector&lt;RefPtr&lt;Event&gt;&gt; m_enqueuedEvents;
+
+    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyDatabase_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyFactorycppfromrev189745trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,169 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyFactory.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;Document.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;Frame.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBDatabaseCallbacksImpl.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBFactoryBackendInterface.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;LegacyAny.h&quot;
+#include &quot;LegacyDatabase.h&quot;
+#include &quot;LegacyOpenDBRequest.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;Page.h&quot;
+#include &quot;PageGroup.h&quot;
+#include &quot;SchemeRegistry.h&quot;
+#include &quot;SecurityOrigin.h&quot;
+#include &quot;WorkerGlobalScope.h&quot;
+#include &quot;WorkerLoaderProxy.h&quot;
+#include &quot;WorkerThread.h&quot;
+
+namespace WebCore {
+
+LegacyFactory::LegacyFactory(IDBFactoryBackendInterface* factory)
+    : m_backend(factory)
+{
+    // We pass a reference to this object before it can be adopted.
+    relaxAdoptionRequirement();
+}
+
+LegacyFactory::~LegacyFactory()
+{
+}
+
+static bool isContextValid(ScriptExecutionContext* context)
+{
+    ASSERT(is&lt;Document&gt;(*context) || context-&gt;isWorkerGlobalScope());
+    if (is&lt;Document&gt;(*context)) {
+        Document&amp; document = downcast&lt;Document&gt;(*context);
+        return document.frame() &amp;&amp; document.page() &amp;&amp; (!document.page()-&gt;usesEphemeralSession() || SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document.securityOrigin()-&gt;protocol()));
+    }
+    return true;
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyFactory::getDatabaseNames(ScriptExecutionContext* context, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyFactory::getDatabaseNames&quot;);
+    if (!isContextValid(context))
+        return 0;
+    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
+        ec = SECURITY_ERR;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), 0);
+    m_backend-&gt;getDatabaseNames(request, *(context-&gt;securityOrigin()), *(context-&gt;topOrigin()), context);
+    return request;
+}
+
+PassRefPtr&lt;IDBOpenDBRequest&gt; LegacyFactory::open(ScriptExecutionContext* context, const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyFactory::open&quot;);
+    return openInternal(context, name, 0, IndexedDB::VersionNullness::Null, ec);
+}
+
+PassRefPtr&lt;IDBOpenDBRequest&gt; LegacyFactory::open(ScriptExecutionContext* context, const String&amp; name, unsigned long long version, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyFactory::open&quot;);
+    if (!version) {
+        ec = TypeError;
+        return 0;
+    }
+    return openInternal(context, name, version, IndexedDB::VersionNullness::NonNull, ec);
+}
+
+PassRefPtr&lt;IDBOpenDBRequest&gt; LegacyFactory::openInternal(ScriptExecutionContext* context, const String&amp; name, uint64_t version, IndexedDB::VersionNullness versionNullness, ExceptionCode&amp; ec)
+{
+    ASSERT(version &gt;= 1 || versionNullness == IndexedDB::VersionNullness::Null);
+    if (name.isNull()) {
+        ec = TypeError;
+        return 0;
+    }
+    if (!isContextValid(context))
+        return 0;
+    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
+        ec = SECURITY_ERR;
+        return 0;
+    }
+
+    RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = IDBDatabaseCallbacksImpl::create();
+    int64_t transactionId = LegacyDatabase::nextTransactionId();
+    RefPtr&lt;LegacyOpenDBRequest&gt; request = LegacyOpenDBRequest::create(context, databaseCallbacks, transactionId, version, versionNullness);
+    m_backend-&gt;open(name, version, transactionId, request, databaseCallbacks, *(context-&gt;securityOrigin()), *(context-&gt;topOrigin()));
+    return request;
+}
+
+PassRefPtr&lt;IDBOpenDBRequest&gt; LegacyFactory::deleteDatabase(ScriptExecutionContext* context, const String&amp; name, ExceptionCode&amp; ec)
+{
+    WTFLogAlways(&quot;yah dude&quot;);
+    LOG(StorageAPI, &quot;LegacyFactory::deleteDatabase&quot;);
+    if (name.isNull()) {
+        ec = TypeError;
+        return 0;
+    }
+    if (!isContextValid(context))
+        return 0;
+    if (!context-&gt;securityOrigin()-&gt;canAccessDatabase(context-&gt;topOrigin())) {
+        ec = SECURITY_ERR;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyOpenDBRequest&gt; request = LegacyOpenDBRequest::create(context, 0, 0, 0, IndexedDB::VersionNullness::Null);
+    m_backend-&gt;deleteDatabase(name, *context-&gt;securityOrigin(), *context-&gt;topOrigin(), request, context);
+    return request;
+}
+
+short LegacyFactory::cmp(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; firstValue, const Deprecated::ScriptValue&amp; secondValue, ExceptionCode&amp; ec)
+{
+    DOMRequestState requestState(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 = IDBDatabaseException::DataError;
+        return 0;
+    }
+
+    return static_cast&lt;short&gt;(first-&gt;compare(second.get()));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyFactoryhfromrev189745trunkSourceWebCoreModulesindexeddbIDBFactoryh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyFactory.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyFactory_h
+#define LegacyFactory_h
+
+#include &quot;IDBFactory.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBKey;
+class IDBKeyRange;
+class IDBFactoryBackendInterface;
+class ScriptExecutionContext;
+
+typedef int ExceptionCode;
+
+class LegacyFactory : public ScriptWrappable, public IDBFactory {
+public:
+    static PassRefPtr&lt;LegacyFactory&gt; create(IDBFactoryBackendInterface* factory)
+    {
+        // FIXME: While the feature is under development we'll handle a null factory backend here,
+        // returning null, so javascript can't try to use the feature.
+        // Once the feature is fully functional we should remove the null factory backend.
+        return factory ? adoptRef(new LegacyFactory(factory)) : nullptr;
+    }
+    ~LegacyFactory();
+
+    // FIXME: getDatabaseNames is no longer a web-facing API, and should be removed from LegacyFactory.
+    // The Web Inspector currently uses this to enumerate the list of databases, but is more complicated as a result.
+    // We should provide a simpler API to the Web Inspector then remove getDatabaseNames.
+    PassRefPtr&lt;IDBRequest&gt; getDatabaseNames(ScriptExecutionContext*, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext*, const String&amp; name, unsigned long long version, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext*, const String&amp; name, ExceptionCode&amp;);
+
+    short cmp(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; first, const Deprecated::ScriptValue&amp; second, ExceptionCode&amp;);
+
+private:
+    LegacyFactory(IDBFactoryBackendInterface*);
+
+    PassRefPtr&lt;IDBOpenDBRequest&gt; openInternal(ScriptExecutionContext*, const String&amp; name, uint64_t version, IndexedDB::VersionNullness, ExceptionCode&amp;);
+
+    RefPtr&lt;IDBFactoryBackendInterface&gt; m_backend;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyFactory_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyIndexcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,210 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyIndex.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyRange.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;
+
+namespace WebCore {
+
+LegacyIndex::LegacyIndex(const IDBIndexMetadata&amp; metadata, LegacyObjectStore* objectStore, LegacyTransaction* transaction)
+    : m_metadata(metadata)
+    , m_objectStore(objectStore)
+    , m_transaction(transaction)
+    , m_deleted(false)
+{
+    ASSERT(m_objectStore);
+    ASSERT(m_transaction);
+    ASSERT(m_metadata.id != IDBIndexMetadata::InvalidId);
+}
+
+LegacyIndex::~LegacyIndex()
+{
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, const String&amp; directionString, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::openCursor&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
+    if (ec)
+        return 0;
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
+    backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, direction, false, IDBDatabaseBackend::NormalTask, request);
+    return request;
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::openCursor&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return openCursor(context, keyRange.release(), direction, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::count(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::count&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;count(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, request);
+    return request;
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::count&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return count(context, keyRange.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::openKeyCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, const String&amp; directionString, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::openKeyCursor&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
+    if (ec)
+        return 0;
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyOnly, direction);
+    backendDB()-&gt;openCursor(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, direction, true, IDBDatabaseBackend::NormalTask, request);
+    return request;
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::openKeyCursor&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return openKeyCursor(context, keyRange.release(), direction, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::get(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::get&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return get(context, keyRange.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::get(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::get&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (!keyRange) {
+        ec = IDBDatabaseException::DataError;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;get(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, false, request);
+    return request;
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::getKey(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::getKey&quot;);
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+
+    return getKey(context, keyRange.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyIndex::getKey(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyIndex::getKey&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (!keyRange) {
+        ec = IDBDatabaseException::DataError;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;get(m_transaction-&gt;id(), m_objectStore-&gt;id(), m_metadata.id, keyRange, true, request);
+    return request;
+}
+
+IDBDatabaseBackend* LegacyIndex::backendDB() const
+{
+    return m_transaction-&gt;backendDB();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyIndexh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyIndex.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyIndex_h
+#define LegacyIndex_h
+
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;LegacyAny.h&quot;
+#include &quot;LegacyObjectStore.h&quot;
+#include &quot;LegacyRequest.h&quot;
+#include &quot;LegacyTransaction.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBObjectStore;
+
+class LegacyIndex : public ScriptWrappable, public IDBIndex {
+public:
+    static Ref&lt;LegacyIndex&gt; create(const IDBIndexMetadata&amp; metadata, LegacyObjectStore* objectStore, LegacyTransaction* transaction)
+    {
+        return adoptRef(*new LegacyIndex(metadata, objectStore, transaction));
+    }
+    ~LegacyIndex();
+
+    // Implement the IDL
+    virtual const String name() const override final { return m_metadata.name; }
+    virtual PassRefPtr&lt;IDBObjectStore&gt; objectStore() const override final { return m_objectStore; }
+    PassRefPtr&lt;LegacyObjectStore&gt; legacyObjectStore() const { return m_objectStore; }
+    virtual PassRefPtr&lt;IDBAny&gt; keyPathAny() const override final { return LegacyAny::create(m_metadata.keyPath); }
+    virtual const IDBKeyPath keyPath() const override final { return m_metadata.keyPath; }
+    virtual bool unique() const override final { return m_metadata.unique; }
+    virtual bool multiEntry() const override final { return m_metadata.multiEntry; }
+    virtual int64_t id() const override final { return m_metadata.id; }
+
+    // FIXME: Try to modify the code generator so this is unneeded.
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec) override final { return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec) override final { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec) override final { return openCursor(context, key, IDBCursor::directionNext(), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext* context, ExceptionCode&amp; ec) override final { return count(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) override final;
+
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec) override final { return openKeyCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec) override final { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec) override final { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;) override final;
+
+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;) override final;
+    virtual PassRefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;) override final;
+
+    void markDeleted() { m_deleted = true; }
+
+    IDBDatabaseBackend* backendDB() const;
+
+private:
+    LegacyIndex(const IDBIndexMetadata&amp;, LegacyObjectStore*, LegacyTransaction*);
+
+    IDBIndexMetadata m_metadata;
+    RefPtr&lt;LegacyObjectStore&gt; m_objectStore;
+    RefPtr&lt;LegacyTransaction&gt; m_transaction;
+    bool m_deleted;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyIndex_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStorecppfromrev189745trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,575 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyObjectStore.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;DOMStringList.h&quot;
+#include &quot;IDBAny.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyData.h&quot;
+#include &quot;IDBKeyPath.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;LegacyCursorWithValue.h&quot;
+#include &quot;LegacyIndex.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;SerializedScriptValue.h&quot;
+#include &quot;SharedBuffer.h&quot;
+
+namespace WebCore {
+
+LegacyObjectStore::LegacyObjectStore(const IDBObjectStoreMetadata&amp; metadata, LegacyTransaction* transaction)
+    : m_metadata(metadata)
+    , m_transaction(transaction)
+    , m_deleted(false)
+{
+    ASSERT(m_transaction);
+    // We pass a reference to this object before it can be adopted.
+    relaxAdoptionRequirement();
+}
+
+PassRefPtr&lt;DOMStringList&gt; LegacyObjectStore::indexNames() const
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::indexNames&quot;);
+    RefPtr&lt;DOMStringList&gt; indexNames = DOMStringList::create();
+    for (auto&amp; index : m_metadata.indexes.values())
+        indexNames-&gt;append(index.name);
+    indexNames-&gt;sort();
+    return indexNames.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::get(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::get&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!keyRange) {
+        ec = IDBDatabaseException::DataError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;get(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, keyRange, false, request);
+    return request.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::get(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return get(context, keyRange.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::add(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::add&quot;);
+    return put(IDBDatabaseBackend::AddOnly, LegacyAny::create(this), state, value, key, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::add(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::add&quot;);
+    return put(IDBDatabaseBackend::AddOnly, LegacyAny::create(this), state, value, static_cast&lt;IDBKey*&gt;(nullptr), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::put&quot;);
+    return put(IDBDatabaseBackend::AddOrUpdate, LegacyAny::create(this), state, value, key, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue&amp; value, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::put&quot;);
+    return put(IDBDatabaseBackend::AddOrUpdate, LegacyAny::create(this), state, value, static_cast&lt;IDBKey*&gt;(nullptr), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;LegacyAny&gt; source, JSC::ExecState* state, Deprecated::ScriptValue&amp; value, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
+{
+    ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
+    DOMRequestState requestState(context);
+    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
+    return put(putMode, source, state, value, key.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr&lt;LegacyAny&gt; source, JSC::ExecState* state, Deprecated::ScriptValue&amp; value, PassRefPtr&lt;IDBKey&gt; prpKey, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;IDBKey&gt; key = prpKey;
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return nullptr;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return nullptr;
+    }
+    if (m_transaction-&gt;isReadOnly()) {
+        ec = IDBDatabaseException::ReadOnlyError;
+        return nullptr;
+    }
+
+    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::create(state, value.jsValue(), nullptr, nullptr);
+    if (state-&gt;hadException())
+        return nullptr;
+
+    if (serializedValue-&gt;hasBlobURLs()) {
+        // FIXME: Add Blob/File/FileList support
+        ec = IDBDatabaseException::DataCloneError;
+        return nullptr;
+    }
+
+    const IDBKeyPath&amp; keyPath = m_metadata.keyPath;
+    const bool usesInLineKeys = !keyPath.isNull();
+    const bool hasKeyGenerator = autoIncrement();
+
+    ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
+    DOMRequestState requestState(context);
+
+    if (putMode != IDBDatabaseBackend::CursorUpdate &amp;&amp; usesInLineKeys &amp;&amp; key) {
+        ec = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+    if (!usesInLineKeys &amp;&amp; !hasKeyGenerator &amp;&amp; !key) {
+        ec = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+    if (usesInLineKeys) {
+        RefPtr&lt;IDBKey&gt; keyPathKey = createIDBKeyFromScriptValueAndKeyPath(requestState.exec(), value, keyPath);
+        if (keyPathKey &amp;&amp; !keyPathKey-&gt;isValid()) {
+            ec = IDBDatabaseException::DataError;
+            return nullptr;
+        }
+        if (!hasKeyGenerator &amp;&amp; !keyPathKey) {
+            ec = IDBDatabaseException::DataError;
+            return nullptr;
+        }
+        if (hasKeyGenerator &amp;&amp; !keyPathKey) {
+            if (!canInjectIDBKeyIntoScriptValue(&amp;requestState, value, keyPath)) {
+                ec = IDBDatabaseException::DataError;
+                return nullptr;
+            }
+        }
+        if (keyPathKey)
+            key = keyPathKey;
+    }
+    if (key &amp;&amp; !key-&gt;isValid()) {
+        ec = IDBDatabaseException::DataError;
+        return nullptr;
+    }
+
+    Vector&lt;int64_t&gt; indexIds;
+    Vector&lt;IndexKeys&gt; indexKeys;
+    for (auto&amp; index : m_metadata.indexes) {
+        Vector&lt;IDBKeyData&gt; keyDatas;
+        generateIndexKeysForValue(requestState.exec(), index.value, value, keyDatas);
+        indexIds.append(index.key);
+
+        // FIXME: Much of the Indexed DB code needs to use IDBKeyData directly to avoid wasteful conversions like this.
+        Vector&lt;RefPtr&lt;IDBKey&gt;&gt; keys;
+        for (auto&amp; keyData : keyDatas) {
+            RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
+            if (key)
+                keys.append(key.release());
+        }
+        indexKeys.append(keys);
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, source, m_transaction.get());
+    Vector&lt;uint8_t&gt; valueBytes = serializedValue-&gt;toWireBytes();
+    // This is a hack to account for disagreements about whether SerializedScriptValue should deal in Vector&lt;uint8_t&gt; or Vector&lt;char&gt;.
+    // See https://lists.webkit.org/pipermail/webkit-dev/2013-February/023682.html
+    Vector&lt;char&gt;* valueBytesSigned = reinterpret_cast&lt;Vector&lt;char&gt;*&gt;(&amp;valueBytes);
+    RefPtr&lt;SharedBuffer&gt; valueBuffer = SharedBuffer::adoptVector(*valueBytesSigned);
+    backendDB()-&gt;put(m_transaction-&gt;id(), id(), valueBuffer, key.release(), static_cast&lt;IDBDatabaseBackend::PutMode&gt;(putMode), request, indexIds, indexKeys);
+    return request.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::delete&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (m_transaction-&gt;isReadOnly()) {
+        ec = IDBDatabaseException::ReadOnlyError;
+        return 0;
+    }
+    if (!keyRange) {
+        ec = IDBDatabaseException::DataError;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;deleteRange(m_transaction-&gt;id(), id(), keyRange, request);
+    return request.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return deleteFunction(context, keyRange.release(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::clear(ScriptExecutionContext* context, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::clear&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (m_transaction-&gt;isReadOnly()) {
+        ec = IDBDatabaseException::ReadOnlyError;
+        return 0;
+    }
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;clearObjectStore(m_transaction-&gt;id(), id(), request);
+    return request.release();
+}
+
+namespace {
+// This class creates the index keys for a given index by extracting
+// them from the SerializedScriptValue, for all the existing values in
+// the objectStore. It only needs to be kept alive by virtue of being
+// a listener on an IDBRequest object, in the same way that JavaScript
+// cursor success handlers are kept alive.
+class IndexPopulator : public EventListener {
+public:
+    static Ref&lt;IndexPopulator&gt; create(PassRefPtr&lt;IDBDatabaseBackend&gt; backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+    {
+        return adoptRef(*new IndexPopulator(backend, transactionId, objectStoreId, indexMetadata));
+    }
+
+    virtual bool operator==(const EventListener&amp; other)
+    {
+        return this == &amp;other;
+    }
+
+private:
+    IndexPopulator(PassRefPtr&lt;IDBDatabaseBackend&gt; backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata&amp; indexMetadata)
+        : EventListener(CPPEventListenerType)
+        , m_databaseBackend(backend)
+        , m_transactionId(transactionId)
+        , m_objectStoreId(objectStoreId)
+        , m_indexMetadata(indexMetadata)
+    {
+    }
+
+    virtual void handleEvent(ScriptExecutionContext*, Event* event)
+    {
+        ASSERT(event-&gt;type() == eventNames().successEvent);
+        EventTarget* target = event-&gt;target();
+        LegacyRequest* request = static_cast&lt;LegacyRequest*&gt;(target);
+
+        RefPtr&lt;LegacyAny&gt; cursorAny = request-&gt;legacyResult(ASSERT_NO_EXCEPTION);
+        RefPtr&lt;LegacyCursorWithValue&gt; cursor;
+        if (cursorAny-&gt;type() == IDBAny::IDBCursorWithValueType)
+            cursor = cursorAny-&gt;legacyCursorWithValue();
+
+        Vector&lt;int64_t, 1&gt; indexIds;
+        indexIds.append(m_indexMetadata.id);
+        if (cursor) {
+            cursor-&gt;continueFunction(static_cast&lt;IDBKey*&gt;(nullptr), ASSERT_NO_EXCEPTION);
+
+            RefPtr&lt;IDBKey&gt; primaryKey = cursor-&gt;idbPrimaryKey();
+            Deprecated::ScriptValue value = cursor-&gt;value();
+
+            Vector&lt;IDBKeyData&gt; indexKeyDatas;
+            generateIndexKeysForValue(request-&gt;requestState()-&gt;exec(), m_indexMetadata, value, indexKeyDatas);
+
+            Vector&lt;RefPtr&lt;IDBKey&gt;&gt; indexKeys;
+            for (auto&amp; indexKeyData : indexKeyDatas) {
+                RefPtr&lt;IDBKey&gt; key = indexKeyData.maybeCreateIDBKey();
+                if (key)
+                    indexKeys.append(key.release());
+            }
+            Vector&lt;LegacyObjectStore::IndexKeys, 1&gt; indexKeysList;
+            indexKeysList.append(indexKeys);
+
+            m_databaseBackend-&gt;setIndexKeys(m_transactionId, m_objectStoreId, primaryKey, indexIds, indexKeysList);
+        } else {
+            // Now that we are done indexing, tell the backend to go
+            // back to processing tasks of type NormalTask.
+            m_databaseBackend-&gt;setIndexesReady(m_transactionId, m_objectStoreId, indexIds);
+            m_databaseBackend = nullptr;
+        }
+
+    }
+
+    RefPtr&lt;IDBDatabaseBackend&gt; m_databaseBackend;
+    const int64_t m_transactionId;
+    const int64_t m_objectStoreId;
+    const IDBIndexMetadata m_indexMetadata;
+};
+}
+
+PassRefPtr&lt;IDBIndex&gt; LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String&amp; name, const IDBKeyPath&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec)
+{
+    bool unique = false;
+    options.get(&quot;unique&quot;, unique);
+
+    bool multiEntry = false;
+    options.get(&quot;multiEntry&quot;, multiEntry);
+
+    return createIndex(context, name, keyPath, unique, multiEntry, ec);
+}
+
+PassRefPtr&lt;IDBIndex&gt; LegacyObjectStore::createIndex(ScriptExecutionContext* context, const String&amp; name, const IDBKeyPath&amp; keyPath, bool unique, bool multiEntry, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::createIndex&quot;);
+    if (!m_transaction-&gt;isVersionChange() || m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    if (!keyPath.isValid()) {
+        ec = IDBDatabaseException::SyntaxError;
+        return 0;
+    }
+    if (name.isNull()) {
+        ec = TypeError;
+        return 0;
+    }
+    if (containsIndex(name)) {
+        ec = IDBDatabaseException::ConstraintError;
+        return 0;
+    }
+
+    if (keyPath.type() == IDBKeyPath::ArrayType &amp;&amp; multiEntry) {
+        ec = IDBDatabaseException::InvalidAccessError;
+        return 0;
+    }
+
+    int64_t indexId = m_metadata.maxIndexId + 1;
+    backendDB()-&gt;createIndex(m_transaction-&gt;id(), id(), indexId, name, keyPath, unique, multiEntry);
+
+    ++m_metadata.maxIndexId;
+
+    IDBIndexMetadata metadata(name, indexId, keyPath, unique, multiEntry);
+    RefPtr&lt;LegacyIndex&gt; index = LegacyIndex::create(metadata, this, m_transaction.get());
+    m_indexMap.set(name, index);
+    m_metadata.indexes.set(indexId, metadata);
+
+    ASSERT(!ec);
+    if (ec)
+        return 0;
+
+    ASSERT_UNUSED(context, context);
+    return index.release();
+}
+
+PassRefPtr&lt;IDBIndex&gt; LegacyObjectStore::index(const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::index&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (m_transaction-&gt;isFinished()) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+
+    IDBIndexMap::iterator it = m_indexMap.find(name);
+    if (it != m_indexMap.end())
+        return it-&gt;value;
+
+    int64_t indexId = findIndexId(name);
+    if (indexId == IDBIndexMetadata::InvalidId) {
+        ec = IDBDatabaseException::NotFoundError;
+        return 0;
+    }
+
+    const IDBIndexMetadata* indexMetadata(nullptr);
+    for (auto&amp; index : m_metadata.indexes.values()) {
+        if (index.name == name) {
+            indexMetadata = &amp;index;
+            break;
+        }
+    }
+    ASSERT(indexMetadata);
+    ASSERT(indexMetadata-&gt;id != IDBIndexMetadata::InvalidId);
+
+    RefPtr&lt;LegacyIndex&gt; index = LegacyIndex::create(*indexMetadata, this, m_transaction.get());
+    m_indexMap.set(name, index);
+    return index.release();
+}
+
+void LegacyObjectStore::deleteIndex(const String&amp; name, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::deleteIndex&quot;);
+    if (!m_transaction-&gt;isVersionChange() || m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return;
+    }
+    int64_t indexId = findIndexId(name);
+    if (indexId == IDBIndexMetadata::InvalidId) {
+        ec = IDBDatabaseException::NotFoundError;
+        return;
+    }
+
+    backendDB()-&gt;deleteIndex(m_transaction-&gt;id(), id(), indexId);
+
+    m_metadata.indexes.remove(indexId);
+    IDBIndexMap::iterator it = m_indexMap.find(name);
+    if (it != m_indexMap.end()) {
+        it-&gt;value-&gt;markDeleted();
+        m_indexMap.remove(name);
+    }
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode&amp; ec)
+{
+    return openCursor(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; keyRange, ExceptionCode&amp; ec)
+{
+    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    return openCursor(context, key, IDBCursor::directionNext(), ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, const String&amp; direction, ExceptionCode&amp; ec)
+{
+    return openCursor(context, range, direction, IDBDatabaseBackend::NormalTask, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, const String&amp; directionString, IDBDatabaseBackend::TaskType taskType, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::openCursor&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    IndexedDB::CursorDirection direction = IDBCursor::stringToDirection(directionString, ec);
+    if (ec)
+        return 0;
+
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    request-&gt;setCursorDetails(IndexedDB::CursorType::KeyAndValue, direction);
+
+    backendDB()-&gt;openCursor(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast&lt;IDBDatabaseBackend::TaskType&gt;(taskType), request);
+    return request.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return openCursor(context, keyRange.release(), direction, ec);
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::count(ScriptExecutionContext* context, PassRefPtr&lt;IDBKeyRange&gt; range, ExceptionCode&amp; ec)
+{
+    LOG(StorageAPI, &quot;LegacyObjectStore::count&quot;);
+    if (m_deleted) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    if (!m_transaction-&gt;isActive()) {
+        ec = IDBDatabaseException::TransactionInactiveError;
+        return 0;
+    }
+    RefPtr&lt;LegacyRequest&gt; request = LegacyRequest::create(context, LegacyAny::create(this), m_transaction.get());
+    backendDB()-&gt;count(m_transaction-&gt;id(), id(), IDBIndexMetadata::InvalidId, range, request);
+    return request.release();
+}
+
+PassRefPtr&lt;IDBRequest&gt; LegacyObjectStore::count(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp; ec)
+{
+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec);
+    if (ec)
+        return 0;
+    return count(context, keyRange.release(), ec);
+}
+
+void LegacyObjectStore::transactionFinished()
+{
+    ASSERT(m_transaction-&gt;isFinished());
+
+    // Break reference cycles.
+    m_indexMap.clear();
+}
+
+int64_t LegacyObjectStore::findIndexId(const String&amp; name) const
+{
+    for (auto&amp; index : m_metadata.indexes) {
+        if (index.value.name == name) {
+            ASSERT(index.key != IDBIndexMetadata::InvalidId);
+            return index.key;
+        }
+    }
+    return IDBIndexMetadata::InvalidId;
+}
+
+IDBDatabaseBackend* LegacyObjectStore::backendDB() const
+{
+    return m_transaction-&gt;backendDB();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyObjectStorehfromrev189745trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyObjectStore.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyObjectStore_h
+#define LegacyObjectStore_h
+
+#include &quot;Dictionary.h&quot;
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBKey.h&quot;
+#include &quot;IDBKeyRange.h&quot;
+#include &quot;IDBRequest.h&quot;
+#include &quot;LegacyIndex.h&quot;
+#include &quot;LegacyTransaction.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &quot;SerializedScriptValue.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class DOMStringList;
+class IDBAny;
+class LegacyIndex;
+
+class LegacyObjectStore : public ScriptWrappable, public IDBObjectStore {
+public:
+    static Ref&lt;LegacyObjectStore&gt; create(const IDBObjectStoreMetadata&amp; metadata, LegacyTransaction* transaction)
+    {
+        return adoptRef(*new LegacyObjectStore(metadata, transaction));
+    }
+    ~LegacyObjectStore() { }
+
+    // Implement the IDBObjectStore IDL
+    int64_t id() const { return m_metadata.id; }
+    const String name() const { return m_metadata.name; }
+    PassRefPtr&lt;IDBAny&gt; keyPathAny() const { return LegacyAny::create(m_metadata.keyPath); }
+    const IDBKeyPath keyPath() const { return m_metadata.keyPath; }
+    PassRefPtr&lt;DOMStringList&gt; indexNames() const;
+    PassRefPtr&lt;IDBTransaction&gt; transaction() const { return m_transaction; }
+    bool autoIncrement() const { return m_metadata.autoIncrement; }
+
+    PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, const String&amp; direction, IDBDatabaseBackend::TaskType, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, const String&amp; direction, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; add(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; put(JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; put(IDBDatabaseBackend::PutMode, PassRefPtr&lt;LegacyAny&gt;, JSC::ExecState*, Deprecated::ScriptValue&amp;, PassRefPtr&lt;IDBKey&gt;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; put(IDBDatabaseBackend::PutMode, PassRefPtr&lt;LegacyAny&gt; source, JSC::ExecState*, Deprecated::ScriptValue&amp;, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext*, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext* context, const String&amp; name, const String&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
+    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext* context, const String&amp; name, const Vector&lt;String&gt;&amp; keyPath, const Dictionary&amp; options, ExceptionCode&amp; ec) { return createIndex(context, name, IDBKeyPath(keyPath), options, ec); }
+    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext*, const String&amp; name, const IDBKeyPath&amp;, const Dictionary&amp;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext*, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCode&amp;);
+    void deleteIndex(const String&amp; name, ExceptionCode&amp;);
+
+    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext* context, ExceptionCode&amp; ec) { return count(context, static_cast&lt;IDBKeyRange*&gt;(nullptr), ec); }
+    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, PassRefPtr&lt;IDBKeyRange&gt;, ExceptionCode&amp;);
+    PassRefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
+
+    void markDeleted() { m_deleted = true; }
+    void transactionFinished();
+
+    IDBObjectStoreMetadata metadata() const { return m_metadata; }
+    void setMetadata(const IDBObjectStoreMetadata&amp; metadata) { m_metadata = metadata; }
+
+    typedef Vector&lt;RefPtr&lt;IDBKey&gt;&gt; IndexKeys;
+    typedef HashMap&lt;String, IndexKeys&gt; IndexKeyMap;
+
+    IDBDatabaseBackend* backendDB() const;
+
+private:
+    LegacyObjectStore(const IDBObjectStoreMetadata&amp;, LegacyTransaction*);
+
+    int64_t findIndexId(const String&amp; name) const;
+    bool containsIndex(const String&amp; name) const
+    {
+        return findIndexId(name) != IDBIndexMetadata::InvalidId;
+    }
+
+    IDBObjectStoreMetadata m_metadata;
+    RefPtr&lt;LegacyTransaction&gt; m_transaction;
+    bool m_deleted;
+
+    typedef HashMap&lt;String, RefPtr&lt;LegacyIndex&gt;&gt; IDBIndexMap;
+    IDBIndexMap m_indexMap;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // LegacyObjectStore_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequestcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBOpenDBRequestcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,156 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyOpenDBRequest.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseCallbacksImpl.h&quot;
+#include &quot;IDBPendingTransactionMonitor.h&quot;
+#include &quot;IDBVersionChangeEvent.h&quot;
+#include &quot;LegacyDatabase.h&quot;
+#include &quot;LegacyVersionChangeEvent.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+
+namespace WebCore {
+
+Ref&lt;LegacyOpenDBRequest&gt; LegacyOpenDBRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness versionNullness)
+{
+    Ref&lt;LegacyOpenDBRequest&gt; request(adoptRef(*new LegacyOpenDBRequest(context, callbacks, transactionId, version, versionNullness)));
+    request-&gt;suspendIfNeeded();
+    return request;
+}
+
+LegacyOpenDBRequest::LegacyOpenDBRequest(ScriptExecutionContext* context, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness versionNullness)
+    : LegacyRequest(context, LegacyAny::createNull(), IDBDatabaseBackend::NormalTask, 0)
+    , m_databaseCallbacks(callbacks)
+    , m_transactionId(transactionId)
+    , m_version(version)
+    , m_versionNullness(versionNullness)
+{
+    ASSERT(!m_result);
+}
+
+LegacyOpenDBRequest::~LegacyOpenDBRequest()
+{
+}
+
+EventTargetInterface LegacyOpenDBRequest::eventTargetInterface() const
+{
+    return IDBOpenDBRequestEventTargetInterfaceType;
+}
+
+void LegacyOpenDBRequest::onBlocked(uint64_t oldVersion)
+{
+    LOG(StorageAPI, &quot;LegacyOpenDBRequest::onBlocked()&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+    
+    enqueueEvent(LegacyVersionChangeEvent::create(oldVersion, m_version, eventNames().blockedEvent));
+}
+
+void LegacyOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr&lt;IDBDatabaseBackend&gt; prpDatabaseBackend, const IDBDatabaseMetadata&amp; metadata)
+{
+    LOG(StorageAPI, &quot;LegacyOpenDBRequest::onUpgradeNeeded()&quot;);
+    if (m_contextStopped || !scriptExecutionContext()) {
+        RefPtr&lt;IDBDatabaseBackend&gt; db = prpDatabaseBackend;
+        db-&gt;abort(m_transactionId);
+        db-&gt;close(m_databaseCallbacks);
+        return;
+    }
+    if (!shouldEnqueueEvent())
+        return;
+
+    ASSERT(m_databaseCallbacks);
+
+    RefPtr&lt;IDBDatabaseBackend&gt; databaseBackend = prpDatabaseBackend;
+
+    RefPtr&lt;LegacyDatabase&gt; idbDatabase = LegacyDatabase::create(scriptExecutionContext(), databaseBackend, m_databaseCallbacks);
+    idbDatabase-&gt;setMetadata(metadata);
+    m_databaseCallbacks-&gt;connect(idbDatabase.get());
+    m_databaseCallbacks = nullptr;
+
+    IDBDatabaseMetadata oldMetadata(metadata);
+    oldMetadata.version = oldVersion;
+
+    m_transaction = LegacyTransaction::create(scriptExecutionContext(), m_transactionId, idbDatabase.get(), this, oldMetadata);
+    m_result = LegacyAny::create(idbDatabase.release());
+
+    if (m_versionNullness == IndexedDB::VersionNullness::Null)
+        m_version = 1;
+    enqueueEvent(LegacyVersionChangeEvent::create(oldVersion, m_version, eventNames().upgradeneededEvent));
+}
+
+void LegacyOpenDBRequest::onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt; prpBackend, const IDBDatabaseMetadata&amp; metadata)
+{
+    LOG(StorageAPI, &quot;LegacyOpenDBRequest::onSuccess()&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    RefPtr&lt;IDBDatabaseBackend&gt; backend = prpBackend;
+    RefPtr&lt;LegacyDatabase&gt; idbDatabase;
+    if (m_result) {
+        idbDatabase = m_result-&gt;legacyDatabase();
+        ASSERT(idbDatabase);
+        ASSERT(!m_databaseCallbacks);
+    } else {
+        ASSERT(m_databaseCallbacks);
+        idbDatabase = LegacyDatabase::create(scriptExecutionContext(), backend.release(), m_databaseCallbacks);
+        m_databaseCallbacks-&gt;connect(idbDatabase.get());
+        m_databaseCallbacks = nullptr;
+        m_result = LegacyAny::create(idbDatabase.get());
+    }
+    idbDatabase-&gt;setMetadata(metadata);
+    enqueueEvent(Event::create(eventNames().successEvent, false, false));
+}
+
+bool LegacyOpenDBRequest::shouldEnqueueEvent() const
+{
+    if (m_contextStopped || !scriptExecutionContext())
+        return false;
+    ASSERT(m_readyState == PENDING || m_readyState == DONE);
+    if (m_requestAborted)
+        return false;
+    return true;
+}
+
+bool LegacyOpenDBRequest::dispatchEvent(PassRefPtr&lt;Event&gt; event)
+{
+    // If the connection closed between onUpgradeNeeded and the delivery of the &quot;success&quot; event,
+    // an &quot;error&quot; event should be fired instead.
+    if (event-&gt;type() == eventNames().successEvent &amp;&amp; m_result-&gt;type() == IDBAny::IDBDatabaseType &amp;&amp; m_result-&gt;legacyDatabase()-&gt;isClosePending()) {
+        m_result = nullptr;
+        onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, &quot;The connection was closed.&quot;));
+        return false;
+    }
+
+    return LegacyRequest::dispatchEvent(event);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequesthfromrev189745trunkSourceWebCoreModulesindexeddbIDBOpenDBRequesth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyOpenDBRequest_h
+#define LegacyOpenDBRequest_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &quot;LegacyRequest.h&quot;
+
+namespace WebCore {
+
+class IDBDatabaseCallbacks;
+
+class LegacyOpenDBRequest : public LegacyRequest {
+public:
+    static Ref&lt;LegacyOpenDBRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness);
+    virtual ~LegacyOpenDBRequest();
+
+    virtual void onBlocked(uint64_t existingVersion) override final;
+    virtual void onUpgradeNeeded(uint64_t oldVersion, PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) override final;
+    virtual void onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) override final;
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override final;
+    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override final;
+
+protected:
+    virtual bool shouldEnqueueEvent() const override;
+
+private:
+    LegacyOpenDBRequest(ScriptExecutionContext*, PassRefPtr&lt;IDBDatabaseCallbacks&gt;, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness);
+
+    RefPtr&lt;IDBDatabaseCallbacks&gt; m_databaseCallbacks;
+    const int64_t m_transactionId;
+    uint64_t m_version;
+    IndexedDB::VersionNullness m_versionNullness;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // LegacyOpenDBRequest_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequestcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,586 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyRequest.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;EventException.h&quot;
+#include &quot;EventListener.h&quot;
+#include &quot;EventNames.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;ExceptionCodePlaceholder.h&quot;
+#include &quot;IDBBindingUtilities.h&quot;
+#include &quot;IDBCursorBackend.h&quot;
+#include &quot;IDBCursorWithValue.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBEventDispatcher.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;LegacyCursor.h&quot;
+#include &quot;LegacyCursorWithValue.h&quot;
+#include &quot;LegacyTransaction.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &quot;SharedBuffer.h&quot;
+
+namespace WebCore {
+
+Ref&lt;LegacyRequest&gt; LegacyRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;LegacyAny&gt; source, LegacyTransaction* transaction)
+{
+    Ref&lt;LegacyRequest&gt; request(adoptRef(*new LegacyRequest(context, source, IDBDatabaseBackend::NormalTask, transaction)));
+    request-&gt;suspendIfNeeded();
+    // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
+    if (transaction)
+        transaction-&gt;registerRequest(request.ptr());
+    return request;
+}
+
+Ref&lt;LegacyRequest&gt; LegacyRequest::create(ScriptExecutionContext* context, PassRefPtr&lt;LegacyAny&gt; source, IDBDatabaseBackend::TaskType taskType, LegacyTransaction* transaction)
+{
+    Ref&lt;LegacyRequest&gt; request(adoptRef(*new LegacyRequest(context, source, taskType, transaction)));
+    request-&gt;suspendIfNeeded();
+    // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
+    if (transaction)
+        transaction-&gt;registerRequest(request.ptr());
+    return request;
+}
+
+LegacyRequest::LegacyRequest(ScriptExecutionContext* context, PassRefPtr&lt;LegacyAny&gt; source, IDBDatabaseBackend::TaskType taskType, LegacyTransaction* transaction)
+    : IDBOpenDBRequest(context)
+    , m_result(nullptr)
+    , m_errorCode(0)
+    , m_contextStopped(false)
+    , m_transaction(transaction)
+    , m_readyState(PENDING)
+    , m_requestAborted(false)
+    , m_source(source)
+    , m_taskType(taskType)
+    , m_hasPendingActivity(true)
+    , m_cursorType(IndexedDB::CursorType::KeyAndValue)
+    , m_cursorDirection(IndexedDB::CursorDirection::Next)
+    , m_cursorFinished(false)
+    , m_pendingCursor(nullptr)
+    , m_didFireUpgradeNeededEvent(false)
+    , m_preventPropagation(false)
+    , m_requestState(context)
+{
+}
+
+LegacyRequest::~LegacyRequest()
+{
+}
+
+PassRefPtr&lt;IDBAny&gt; LegacyRequest::result(ExceptionCode&amp; ec) const
+{
+    if (m_readyState != DONE) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    return m_result;
+}
+
+PassRefPtr&lt;DOMError&gt; LegacyRequest::error(ExceptionCode&amp; ec) const
+{
+    if (m_readyState != DONE) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    return m_error;
+}
+
+unsigned short LegacyRequest::errorCode(ExceptionCode&amp; ec) const
+{
+    if (m_readyState != DONE) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+    return m_errorCode;
+}
+
+PassRefPtr&lt;IDBAny&gt; LegacyRequest::source() const
+{
+    return m_source;
+}
+
+PassRefPtr&lt;IDBTransaction&gt; LegacyRequest::transaction() const
+{
+    return m_transaction;
+}
+
+const String&amp; LegacyRequest::readyState() const
+{
+    ASSERT(m_readyState == PENDING || m_readyState == DONE);
+    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pending, (&quot;pending&quot;, AtomicString::ConstructFromLiteral));
+    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, done, (&quot;done&quot;, AtomicString::ConstructFromLiteral));
+
+    if (m_readyState == PENDING)
+        return pending;
+
+    return done;
+}
+
+void LegacyRequest::markEarlyDeath()
+{
+    ASSERT(m_readyState == PENDING);
+    m_readyState = EarlyDeath;
+    if (m_transaction)
+        m_transaction-&gt;unregisterRequest(this);
+}
+
+void LegacyRequest::abort()
+{
+    ASSERT(!m_requestAborted);
+    if (m_contextStopped || !scriptExecutionContext())
+        return;
+    ASSERT(m_readyState == PENDING || m_readyState == DONE);
+    if (m_readyState == DONE)
+        return;
+
+    // Enqueued events may be the only reference to this object.
+    RefPtr&lt;LegacyRequest&gt; self(this);
+
+    EventQueue&amp; eventQueue = scriptExecutionContext()-&gt;eventQueue();
+    for (auto&amp; event : m_enqueuedEvents) {
+        bool removed = eventQueue.cancelEvent(*event);
+        ASSERT_UNUSED(removed, removed);
+    }
+    m_enqueuedEvents.clear();
+
+    m_errorCode = 0;
+    m_error = nullptr;
+    m_errorMessage = String();
+    m_result = nullptr;
+    onError(IDBDatabaseError::create(IDBDatabaseException::AbortError));
+    m_requestAborted = true;
+}
+
+void LegacyRequest::setCursorDetails(IndexedDB::CursorType cursorType, IndexedDB::CursorDirection direction)
+{
+    ASSERT(m_readyState == PENDING);
+    ASSERT(!m_pendingCursor);
+    m_cursorType = cursorType;
+    m_cursorDirection = direction;
+}
+
+void LegacyRequest::setPendingCursor(PassRefPtr&lt;LegacyCursor&gt; cursor)
+{
+    ASSERT(m_readyState == DONE);
+    ASSERT(scriptExecutionContext());
+    ASSERT(m_transaction);
+    ASSERT(!m_pendingCursor);
+    ASSERT(cursor == getResultCursor());
+
+    m_pendingCursor = cursor;
+    m_result = nullptr;
+    m_readyState = PENDING;
+    m_errorCode = 0;
+    m_error = nullptr;
+    m_errorMessage = String();
+    m_transaction-&gt;registerRequest(this);
+}
+
+RefPtr&lt;LegacyCursor&gt; LegacyRequest::getResultCursor()
+{
+    if (!m_result)
+        return nullptr;
+    if (m_result-&gt;type() == IDBAny::IDBCursorType)
+        return m_result-&gt;legacyCursor();
+    if (m_result-&gt;type() == IDBAny::IDBCursorWithValueType)
+        return m_result-&gt;legacyCursorWithValue();
+    return nullptr;
+}
+
+void LegacyRequest::setResultCursor(PassRefPtr&lt;LegacyCursor&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, const Deprecated::ScriptValue&amp; value)
+{
+    ASSERT(m_readyState == PENDING);
+    m_cursorKey = key;
+    m_cursorPrimaryKey = primaryKey;
+    m_cursorValue = value;
+
+    if (m_cursorType == IndexedDB::CursorType::KeyOnly) {
+        m_result = LegacyAny::create(cursor);
+        return;
+    }
+
+    m_result = LegacyAny::create(LegacyCursorWithValue::fromCursor(cursor));
+}
+
+void LegacyRequest::finishCursor()
+{
+    m_cursorFinished = true;
+    if (m_readyState != PENDING)
+        m_hasPendingActivity = false;
+}
+
+bool LegacyRequest::shouldEnqueueEvent() const
+{
+    if (m_contextStopped || !scriptExecutionContext())
+        return false;
+    ASSERT(m_readyState == PENDING || m_readyState == DONE);
+    if (m_requestAborted)
+        return false;
+    ASSERT(m_readyState == PENDING);
+    ASSERT(!m_errorCode &amp;&amp; m_errorMessage.isNull() &amp;&amp; !m_error &amp;&amp; !m_result);
+    return true;
+}
+
+void LegacyRequest::onError(PassRefPtr&lt;IDBDatabaseError&gt; error)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onError() (%s) '%s'&quot;, error-&gt;name().utf8().data(), error-&gt;message().utf8().data());
+    if (!shouldEnqueueEvent())
+        return;
+
+    m_errorCode = error-&gt;code();
+    m_errorMessage = error-&gt;message();
+    m_error = DOMError::create(IDBDatabaseException::getErrorName(error-&gt;idbCode()));
+    m_pendingCursor = nullptr;
+    enqueueEvent(Event::create(eventNames().errorEvent, true, true));
+}
+
+static PassRefPtr&lt;Event&gt; createSuccessEvent()
+{
+    return Event::create(eventNames().successEvent, false, false);
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;DOMStringList&gt; domStringList)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(DOMStringList)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    m_result = LegacyAny::create(domStringList);
+    enqueueEvent(createSuccessEvent());
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;IDBCursorBackend&gt; prpBackend)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(IDBCursor)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    DOMRequestState::Scope scope(m_requestState);
+
+    RefPtr&lt;IDBCursorBackend&gt; backend = prpBackend;
+    RefPtr&lt;IDBKey&gt; key = backend-&gt;key();
+    RefPtr&lt;IDBKey&gt; primaryKey = backend-&gt;primaryKey();
+
+    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), backend-&gt;valueBuffer(), !!key);
+
+    ASSERT(!m_pendingCursor);
+    RefPtr&lt;LegacyCursor&gt; cursor;
+    switch (m_cursorType) {
+    case IndexedDB::CursorType::KeyOnly:
+        cursor = LegacyCursor::create(backend.release(), m_cursorDirection, this, m_source.get(), m_transaction.get());
+        break;
+    case IndexedDB::CursorType::KeyAndValue:
+        cursor = LegacyCursorWithValue::create(backend.release(), m_cursorDirection, this, m_source.get(), m_transaction.get());
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+    }
+    setResultCursor(cursor, key.release(), primaryKey.release(), value);
+
+    enqueueEvent(createSuccessEvent());
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; idbKey)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(IDBKey)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    if (idbKey &amp;&amp; idbKey-&gt;isValid()) {
+        DOMRequestState::Scope scope(m_requestState);
+        m_result = LegacyAny::create(idbKeyToScriptValue(requestState(), idbKey));
+    } else
+        m_result = LegacyAny::createInvalid();
+    enqueueEvent(createSuccessEvent());
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;SharedBuffer&gt; valueBuffer)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(SharedBuffer)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    DOMRequestState::Scope scope(m_requestState);
+
+    // FIXME: By not knowing whether or not the key is defined here, we don't know
+    // if a null valueBuffer means the value is null or the value is undefined.
+    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), valueBuffer, true);
+    onSuccessInternal(value);
+}
+
+#ifndef NDEBUG
+static PassRefPtr&lt;IDBObjectStore&gt; effectiveObjectStore(LegacyAny* source)
+{
+    if (source-&gt;type() == IDBAny::IDBObjectStoreType)
+        return source-&gt;idbObjectStore();
+    if (source-&gt;type() == IDBAny::IDBIndexType)
+        return source-&gt;idbIndex()-&gt;objectStore();
+
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+#endif
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;SharedBuffer&gt; valueBuffer, PassRefPtr&lt;IDBKey&gt; prpPrimaryKey, const IDBKeyPath&amp; keyPath)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(SharedBuffer, IDBKey, IDBKeyPath)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+#ifndef NDEBUG
+    ASSERT(keyPath == effectiveObjectStore(m_source.get())-&gt;keyPath());
+#endif
+    DOMRequestState::Scope scope(m_requestState);
+
+    // FIXME: By not knowing whether or not the key is defined here, we don't know
+    // if a null valueBuffer means the value is null or the value is undefined.
+    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), valueBuffer, true);
+
+    RefPtr&lt;IDBKey&gt; primaryKey = prpPrimaryKey;
+
+    if (!keyPath.isNull()) {
+#ifndef NDEBUG
+        RefPtr&lt;IDBKey&gt; expectedKey = createIDBKeyFromScriptValueAndKeyPath(requestState()-&gt;exec(), value, keyPath);
+        ASSERT(!expectedKey || expectedKey-&gt;isEqual(primaryKey.get()));
+#endif
+        bool injected = injectIDBKeyIntoScriptValue(requestState(), primaryKey, value, keyPath);
+        ASSERT_UNUSED(injected, injected);
+    }
+
+    onSuccessInternal(value);
+}
+
+void LegacyRequest::onSuccess(int64_t value)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(int64_t)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+    return onSuccessInternal(SerializedScriptValue::numberValue(value));
+}
+
+void LegacyRequest::onSuccess()
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess()&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+    return onSuccessInternal(SerializedScriptValue::undefinedValue());
+}
+
+void LegacyRequest::onSuccessInternal(PassRefPtr&lt;SerializedScriptValue&gt; value)
+{
+    ASSERT(!m_contextStopped);
+    DOMRequestState::Scope scope(m_requestState);
+    return onSuccessInternal(deserializeIDBValue(requestState(), value));
+}
+
+void LegacyRequest::onSuccessInternal(const Deprecated::ScriptValue&amp; value)
+{
+    m_result = LegacyAny::create(value);
+    if (m_pendingCursor) {
+        m_pendingCursor-&gt;close();
+        m_pendingCursor = nullptr;
+    }
+    enqueueEvent(createSuccessEvent());
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt; buffer)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::onSuccess(key, primaryKey, valueBuffer)&quot;);
+    if (!shouldEnqueueEvent())
+        return;
+
+    DOMRequestState::Scope scope(m_requestState);
+
+    Deprecated::ScriptValue value = deserializeIDBValueBuffer(requestState(), buffer, !!key);
+
+    ASSERT(m_pendingCursor);
+    setResultCursor(m_pendingCursor.release(), key, primaryKey, value);
+    enqueueEvent(createSuccessEvent());
+}
+
+void LegacyRequest::onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;)
+{
+    // Only the LegacyOpenDBRequest version of this should ever be called;
+    ASSERT_NOT_REACHED();
+}
+
+bool LegacyRequest::hasPendingActivity() const
+{
+    // FIXME: In an ideal world, we should return true as long as anyone has a or can
+    //        get a handle to us and we have event listeners. This is order to handle
+    //        user generated events properly.
+    return m_hasPendingActivity &amp;&amp; !m_contextStopped;
+}
+
+void LegacyRequest::stop()
+{
+    if (m_contextStopped)
+        return;
+
+    m_contextStopped = true;
+    m_requestState.clear();
+    if (m_readyState == PENDING)
+        markEarlyDeath();
+}
+
+bool LegacyRequest::canSuspendForPageCache() const
+{
+    return !m_hasPendingActivity;
+}
+
+const char* LegacyRequest::activeDOMObjectName() const
+{
+    return &quot;LegacyRequest&quot;;
+}
+
+EventTargetInterface LegacyRequest::eventTargetInterface() const
+{
+    return IDBRequestEventTargetInterfaceType;
+}
+
+bool LegacyRequest::dispatchEvent(PassRefPtr&lt;Event&gt; event)
+{
+    LOG(StorageAPI, &quot;LegacyRequest::dispatchEvent&quot;);
+    ASSERT(m_readyState == PENDING);
+    ASSERT(!m_contextStopped);
+    ASSERT(m_hasPendingActivity);
+    ASSERT(m_enqueuedEvents.size());
+    ASSERT(scriptExecutionContext());
+    ASSERT(event-&gt;target() == this);
+    ASSERT_WITH_MESSAGE(m_readyState &lt; DONE, &quot;When dispatching event %s, m_readyState &lt; DONE(%d), was %d&quot;, event-&gt;type().string().utf8().data(), DONE, m_readyState);
+
+    DOMRequestState::Scope scope(m_requestState);
+
+    if (event-&gt;type() != eventNames().blockedEvent)
+        m_readyState = DONE;
+
+    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
+        if (m_enqueuedEvents[i].get() == event.get())
+            m_enqueuedEvents.remove(i);
+    }
+
+    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
+    targets.append(this);
+    if (m_transaction &amp;&amp; !m_preventPropagation) {
+        targets.append(m_transaction);
+        // If there ever are events that are associated with a database but
+        // that do not have a transaction, then this will not work and we need
+        // this object to actually hold a reference to the database (to ensure
+        // it stays alive).
+        targets.append(m_transaction-&gt;db());
+    }
+
+    // Cursor properties should not updated until the success event is being dispatched.
+    RefPtr&lt;LegacyCursor&gt; cursorToNotify;
+    if (event-&gt;type() == eventNames().successEvent) {
+        cursorToNotify = getResultCursor();
+        if (cursorToNotify) {
+            cursorToNotify-&gt;setValueReady(requestState(), m_cursorKey.release(), m_cursorPrimaryKey.release(), m_cursorValue);
+            m_cursorValue.clear();
+        }
+    }
+
+    if (event-&gt;type() == eventNames().upgradeneededEvent) {
+        ASSERT(!m_didFireUpgradeNeededEvent);
+        m_didFireUpgradeNeededEvent = true;
+    }
+
+    // FIXME: When we allow custom event dispatching, this will probably need to change.
+    ASSERT_WITH_MESSAGE(event-&gt;type() == eventNames().successEvent || event-&gt;type() == eventNames().errorEvent || event-&gt;type() == eventNames().blockedEvent || event-&gt;type() == eventNames().upgradeneededEvent, &quot;event type was %s&quot;, event-&gt;type().string().utf8().data());
+    const bool setTransactionActive = m_transaction &amp;&amp; (event-&gt;type() == eventNames().successEvent || event-&gt;type() == eventNames().upgradeneededEvent || (event-&gt;type() == eventNames().errorEvent &amp;&amp; m_errorCode != IDBDatabaseException::AbortError));
+
+    if (setTransactionActive)
+        m_transaction-&gt;setActive(true);
+
+    bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets);
+
+    if (m_transaction) {
+        if (m_readyState == DONE)
+            m_transaction-&gt;unregisterRequest(this);
+
+        // Possibly abort the transaction. This must occur after unregistering (so this request
+        // doesn't receive a second error) and before deactivating (which might trigger commit).
+        if (event-&gt;type() == eventNames().errorEvent &amp;&amp; dontPreventDefault &amp;&amp; !m_requestAborted) {
+            m_transaction-&gt;setError(m_error, m_errorMessage);
+            m_transaction-&gt;abort(IGNORE_EXCEPTION);
+        }
+
+        // If this was the last request in the transaction's list, it may commit here.
+        if (setTransactionActive)
+            m_transaction-&gt;setActive(false);
+    }
+
+    if (cursorToNotify)
+        cursorToNotify-&gt;postSuccessHandlerCallback();
+
+    if (m_readyState == DONE &amp;&amp; (!cursorToNotify || m_cursorFinished) &amp;&amp; event-&gt;type() != eventNames().upgradeneededEvent)
+        m_hasPendingActivity = false;
+
+    return dontPreventDefault;
+}
+
+void LegacyRequest::uncaughtExceptionInEventHandler()
+{
+    if (m_transaction &amp;&amp; !m_requestAborted) {
+        m_transaction-&gt;setError(DOMError::create(IDBDatabaseException::getErrorName(IDBDatabaseException::AbortError)), &quot;Uncaught exception in event handler.&quot;);
+        m_transaction-&gt;abort(IGNORE_EXCEPTION);
+    }
+}
+
+void LegacyRequest::transactionDidFinishAndDispatch()
+{
+    ASSERT(m_transaction);
+    ASSERT(m_transaction-&gt;isVersionChange());
+    ASSERT(m_readyState == DONE);
+    ASSERT(scriptExecutionContext());
+    m_transaction = nullptr;
+    m_readyState = PENDING;
+}
+
+void LegacyRequest::enqueueEvent(PassRefPtr&lt;Event&gt; event)
+{
+    ASSERT(m_readyState == PENDING || m_readyState == DONE);
+
+    if (m_contextStopped || !scriptExecutionContext())
+        return;
+
+    ASSERT_WITH_MESSAGE(m_readyState == PENDING || m_didFireUpgradeNeededEvent, &quot;When queueing event %s, m_readyState was %d&quot;, event-&gt;type().string().utf8().data(), m_readyState);
+
+    event-&gt;setTarget(this);
+
+    if (scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event.get()))
+        m_enqueuedEvents.append(event);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequesthfromrev189745trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,162 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyRequest_h
+#define LegacyRequest_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;DOMError.h&quot;
+#include &quot;DOMRequestState.h&quot;
+#include &quot;DOMStringList.h&quot;
+#include &quot;Event.h&quot;
+#include &quot;EventListener.h&quot;
+#include &quot;EventTarget.h&quot;
+#include &quot;IDBCallbacks.h&quot;
+#include &quot;IDBCursor.h&quot;
+#include &quot;IDBDatabaseBackend.h&quot;
+#include &quot;IDBDatabaseCallbacks.h&quot;
+#include &quot;IDBOpenDBRequest.h&quot;
+#include &quot;LegacyAny.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+
+namespace WebCore {
+
+class LegacyTransaction;
+
+typedef int ExceptionCode;
+
+class LegacyRequest : public IDBOpenDBRequest, public IDBCallbacks {
+public:
+    static Ref&lt;LegacyRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;LegacyAny&gt; source, LegacyTransaction*);
+    static Ref&lt;LegacyRequest&gt; create(ScriptExecutionContext*, PassRefPtr&lt;LegacyAny&gt; source, IDBDatabaseBackend::TaskType, LegacyTransaction*);
+    virtual ~LegacyRequest();
+
+    virtual PassRefPtr&lt;IDBAny&gt; result(ExceptionCode&amp;) const override final;
+    PassRefPtr&lt;LegacyAny&gt; legacyResult(ExceptionCode&amp;);
+    virtual unsigned short errorCode(ExceptionCode&amp;) const override final;
+    virtual PassRefPtr&lt;DOMError&gt; error(ExceptionCode&amp;) const override final;
+    virtual PassRefPtr&lt;IDBAny&gt; source() const override final;
+    virtual PassRefPtr&lt;IDBTransaction&gt; transaction() const override final;
+    virtual const String&amp; readyState() const override final;
+
+    void preventPropagation() { m_preventPropagation = true; }
+
+    void markEarlyDeath();
+    void setCursorDetails(IndexedDB::CursorType, IndexedDB::CursorDirection);
+    void setPendingCursor(PassRefPtr&lt;LegacyCursor&gt;);
+    void finishCursor();
+    void abort();
+
+    // IDBCallbacks
+    virtual void onError(PassRefPtr&lt;IDBDatabaseError&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;DOMStringList&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;IDBCursorBackend&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;SharedBuffer&gt;, PassRefPtr&lt;IDBKey&gt;, const IDBKeyPath&amp;) override final;
+    virtual void onSuccess(int64_t) override final;
+    virtual void onSuccess() override final;
+    virtual void onSuccess(PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, PassRefPtr&lt;SharedBuffer&gt;) override final;
+    virtual void onSuccess(PassRefPtr&lt;IDBDatabaseBackend&gt;, const IDBDatabaseMetadata&amp;) override;
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override;
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+    virtual void uncaughtExceptionInEventHandler() override final;
+
+    using EventTarget::dispatchEvent;
+    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override;
+
+    void transactionDidFinishAndDispatch();
+
+    IDBDatabaseBackend::TaskType taskType() { return m_taskType; }
+
+    DOMRequestState* requestState() { return &amp;m_requestState; }
+
+    // ActiveDOMObject API.
+    bool hasPendingActivity() const override;
+
+    using IDBCallbacks::ref;
+    using IDBCallbacks::deref;
+
+protected:
+    LegacyRequest(ScriptExecutionContext*, PassRefPtr&lt;LegacyAny&gt; source, IDBDatabaseBackend::TaskType, LegacyTransaction*);
+    void enqueueEvent(PassRefPtr&lt;Event&gt;);
+    virtual bool shouldEnqueueEvent() const;
+    void onSuccessInternal(PassRefPtr&lt;SerializedScriptValue&gt;);
+    void onSuccessInternal(const Deprecated::ScriptValue&amp;);
+
+    RefPtr&lt;LegacyAny&gt; m_result;
+    unsigned short m_errorCode;
+    String m_errorMessage;
+    RefPtr&lt;DOMError&gt; m_error;
+    bool m_contextStopped;
+    RefPtr&lt;LegacyTransaction&gt; m_transaction;
+    ReadyState m_readyState;
+    bool m_requestAborted; // May be aborted by transaction then receive async onsuccess; ignore vs. assert.
+
+private:
+    // ActiveDOMObject API.
+    void stop() override;
+    const char* activeDOMObjectName() const override;
+    bool canSuspendForPageCache() const override;
+
+    // EventTarget API.
+    virtual void refEventTarget() override final { ref(); }
+    virtual void derefEventTarget() override final { deref(); }
+
+    RefPtr&lt;LegacyCursor&gt; getResultCursor();
+    void setResultCursor(PassRefPtr&lt;LegacyCursor&gt;, PassRefPtr&lt;IDBKey&gt;, PassRefPtr&lt;IDBKey&gt; primaryKey, const Deprecated::ScriptValue&amp;);
+
+    RefPtr&lt;LegacyAny&gt; m_source;
+    const IDBDatabaseBackend::TaskType m_taskType;
+
+    bool m_hasPendingActivity;
+    Vector&lt;RefPtr&lt;Event&gt;&gt; m_enqueuedEvents;
+
+    // Only used if the result type will be a cursor.
+    IndexedDB::CursorType m_cursorType;
+    IndexedDB::CursorDirection m_cursorDirection;
+    bool m_cursorFinished;
+    RefPtr&lt;LegacyCursor&gt; m_pendingCursor;
+    RefPtr&lt;IDBKey&gt; m_cursorKey;
+    RefPtr&lt;IDBKey&gt; m_cursorPrimaryKey;
+    Deprecated::ScriptValue m_cursorValue;
+    bool m_didFireUpgradeNeededEvent;
+    bool m_preventPropagation;
+
+    DOMRequestState m_requestState;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // LegacyRequest_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyTransactioncppfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,380 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyTransaction.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;EventException.h&quot;
+#include &quot;EventQueue.h&quot;
+#include &quot;ExceptionCodePlaceholder.h&quot;
+#include &quot;IDBDatabase.h&quot;
+#include &quot;IDBDatabaseException.h&quot;
+#include &quot;IDBEventDispatcher.h&quot;
+#include &quot;IDBIndex.h&quot;
+#include &quot;IDBObjectStore.h&quot;
+#include &quot;IDBPendingTransactionMonitor.h&quot;
+#include &quot;LegacyCursor.h&quot;
+#include &quot;LegacyObjectStore.h&quot;
+#include &quot;LegacyOpenDBRequest.h&quot;
+#include &quot;Logging.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+
+namespace WebCore {
+
+Ref&lt;LegacyTransaction&gt; LegacyTransaction::create(ScriptExecutionContext* context, int64_t id, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode mode, LegacyDatabase* db)
+{
+    LegacyOpenDBRequest* openDBRequest = nullptr;
+    Ref&lt;LegacyTransaction&gt; transaction(adoptRef(*new LegacyTransaction(context, id, objectStoreNames, mode, db, openDBRequest, IDBDatabaseMetadata())));
+    transaction-&gt;suspendIfNeeded();
+    return transaction;
+}
+
+Ref&lt;LegacyTransaction&gt; LegacyTransaction::create(ScriptExecutionContext* context, int64_t id, LegacyDatabase* db, LegacyOpenDBRequest* openDBRequest, const IDBDatabaseMetadata&amp; previousMetadata)
+{
+    Ref&lt;LegacyTransaction&gt; transaction(adoptRef(*new LegacyTransaction(context, id, Vector&lt;String&gt;(), IndexedDB::TransactionMode::VersionChange, db, openDBRequest, previousMetadata)));
+    transaction-&gt;suspendIfNeeded();
+    return transaction;
+}
+
+LegacyTransaction::LegacyTransaction(ScriptExecutionContext* context, int64_t id, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode mode, LegacyDatabase* db, LegacyOpenDBRequest* openDBRequest, const IDBDatabaseMetadata&amp; previousMetadata)
+    : IDBTransaction(context)
+    , m_id(id)
+    , m_database(db)
+    , m_objectStoreNames(objectStoreNames)
+    , m_openDBRequest(openDBRequest)
+    , m_mode(mode)
+    , m_state(Active)
+    , m_hasPendingActivity(true)
+    , m_contextStopped(false)
+    , m_previousMetadata(previousMetadata)
+{
+    if (mode == IndexedDB::TransactionMode::VersionChange) {
+        // Not active until the callback.
+        m_state = Inactive;
+    }
+
+    // We pass a reference of this object before it can be adopted.
+    relaxAdoptionRequirement();
+    if (m_state == Active)
+        IDBPendingTransactionMonitor::addNewTransaction(this);
+    m_database-&gt;transactionCreated(this);
+}
+
+LegacyTransaction::~LegacyTransaction()
+{
+    ASSERT(m_state == Finished || m_contextStopped);
+    ASSERT(m_requestList.isEmpty() || m_contextStopped);
+}
+
+const String&amp; LegacyTransaction::mode() const
+{
+    return modeToString(m_mode);
+}
+
+IDBDatabase* LegacyTransaction::db() const
+{
+    return m_database.get();
+}
+
+void LegacyTransaction::setError(PassRefPtr&lt;DOMError&gt; error, const String&amp; errorMessage)
+{
+    ASSERT(m_state != Finished);
+    ASSERT(error);
+
+    // The first error to be set is the true cause of the
+    // transaction abort.
+    if (!m_error) {
+        m_error = error;
+        m_errorMessage = errorMessage;
+    }
+}
+
+PassRefPtr&lt;IDBObjectStore&gt; LegacyTransaction::objectStore(const String&amp; name, ExceptionCode&amp; ec)
+{
+    if (m_state == Finished) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return 0;
+    }
+
+    IDBObjectStoreMap::iterator it = m_objectStoreMap.find(name);
+    if (it != m_objectStoreMap.end())
+        return it-&gt;value;
+
+    if (!isVersionChange() &amp;&amp; !m_objectStoreNames.contains(name)) {
+        ec = IDBDatabaseException::NotFoundError;
+        return 0;
+    }
+
+    int64_t objectStoreId = m_database-&gt;findObjectStoreId(name);
+    if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
+        ASSERT(isVersionChange());
+        ec = IDBDatabaseException::NotFoundError;
+        return 0;
+    }
+
+    const IDBDatabaseMetadata&amp; metadata = m_database-&gt;metadata();
+
+    RefPtr&lt;LegacyObjectStore&gt; objectStore = LegacyObjectStore::create(metadata.objectStores.get(objectStoreId), this);
+    objectStoreCreated(name, objectStore);
+    return objectStore.release();
+}
+
+void LegacyTransaction::objectStoreCreated(const String&amp; name, PassRefPtr&lt;LegacyObjectStore&gt; prpObjectStore)
+{
+    ASSERT(m_state != Finished);
+    RefPtr&lt;LegacyObjectStore&gt; objectStore = prpObjectStore;
+    m_objectStoreMap.set(name, objectStore);
+    if (isVersionChange())
+        m_objectStoreCleanupMap.set(objectStore, objectStore-&gt;metadata());
+}
+
+void LegacyTransaction::objectStoreDeleted(const String&amp; name)
+{
+    ASSERT(m_state != Finished);
+    ASSERT(isVersionChange());
+    IDBObjectStoreMap::iterator it = m_objectStoreMap.find(name);
+    if (it != m_objectStoreMap.end()) {
+        RefPtr&lt;LegacyObjectStore&gt; objectStore = it-&gt;value;
+        m_objectStoreMap.remove(name);
+        objectStore-&gt;markDeleted();
+        m_objectStoreCleanupMap.set(objectStore, objectStore-&gt;metadata());
+        m_deletedObjectStores.add(objectStore);
+    }
+}
+
+void LegacyTransaction::setActive(bool active)
+{
+    LOG(StorageAPI, &quot;LegacyTransaction::setActive(%s) for transaction id %lli&quot;, active ? &quot;true&quot; : &quot;false&quot;, static_cast&lt;long long&gt;(m_id));
+    ASSERT_WITH_MESSAGE(m_state != Finished, &quot;A finished transaction tried to setActive(%s)&quot;, active ? &quot;true&quot; : &quot;false&quot;);
+    if (m_state == Finishing)
+        return;
+    ASSERT(active != (m_state == Active));
+    m_state = active ? Active : Inactive;
+
+    if (!active &amp;&amp; m_requestList.isEmpty())
+        backendDB()-&gt;commit(m_id);
+}
+
+void LegacyTransaction::abort(ExceptionCode&amp; ec)
+{
+    if (m_state == Finishing || m_state == Finished) {
+        ec = IDBDatabaseException::InvalidStateError;
+        return;
+    }
+
+    m_state = Finishing;
+
+    while (!m_requestList.isEmpty()) {
+        RefPtr&lt;LegacyRequest&gt; request = *m_requestList.begin();
+        m_requestList.remove(request);
+        request-&gt;abort();
+    }
+
+    RefPtr&lt;LegacyTransaction&gt; selfRef = this;
+    backendDB()-&gt;abort(m_id);
+}
+
+LegacyTransaction::OpenCursorNotifier::OpenCursorNotifier(PassRefPtr&lt;LegacyTransaction&gt; transaction, LegacyCursor* cursor)
+    : m_transaction(transaction)
+    , m_cursor(cursor)
+{
+    m_transaction-&gt;registerOpenCursor(m_cursor);
+}
+
+LegacyTransaction::OpenCursorNotifier::~OpenCursorNotifier()
+{
+    if (m_cursor)
+        m_transaction-&gt;unregisterOpenCursor(m_cursor);
+}
+
+void LegacyTransaction::OpenCursorNotifier::cursorFinished()
+{
+    if (m_cursor) {
+        m_transaction-&gt;unregisterOpenCursor(m_cursor);
+        m_cursor = nullptr;
+        m_transaction = nullptr;
+    }
+}
+
+void LegacyTransaction::registerOpenCursor(LegacyCursor* cursor)
+{
+    m_openCursors.add(cursor);
+}
+
+void LegacyTransaction::unregisterOpenCursor(LegacyCursor* cursor)
+{
+    m_openCursors.remove(cursor);
+}
+
+void LegacyTransaction::closeOpenCursors()
+{
+    HashSet&lt;LegacyCursor*&gt; cursors;
+    cursors.swap(m_openCursors);
+    for (auto&amp; cursor : cursors)
+        cursor-&gt;close();
+}
+
+void LegacyTransaction::registerRequest(LegacyRequest* request)
+{
+    ASSERT(request);
+    ASSERT(m_state == Active);
+    m_requestList.add(request);
+}
+
+void LegacyTransaction::unregisterRequest(LegacyRequest* request)
+{
+    ASSERT(request);
+    // If we aborted the request, it will already have been removed.
+    m_requestList.remove(request);
+}
+
+void LegacyTransaction::onAbort(PassRefPtr&lt;IDBDatabaseError&gt; prpError)
+{
+    LOG(StorageAPI, &quot;LegacyTransaction::onAbort&quot;);
+    RefPtr&lt;IDBDatabaseError&gt; error = prpError;
+    ASSERT(m_state != Finished);
+
+    if (m_state != Finishing) {
+        ASSERT(error.get());
+        setError(DOMError::create(error-&gt;name()), error-&gt;message());
+
+        // Abort was not triggered by front-end, so outstanding requests must
+        // be aborted now.
+        while (!m_requestList.isEmpty()) {
+            RefPtr&lt;LegacyRequest&gt; request = *m_requestList.begin();
+            m_requestList.remove(request);
+            request-&gt;abort();
+        }
+        m_state = Finishing;
+    }
+
+    if (isVersionChange()) {
+        for (auto&amp; objectStore : m_objectStoreCleanupMap)
+            objectStore.key-&gt;setMetadata(objectStore.value);
+        m_database-&gt;setMetadata(m_previousMetadata);
+        m_database-&gt;close();
+    }
+    m_objectStoreCleanupMap.clear();
+    closeOpenCursors();
+
+    // Enqueue events before notifying database, as database may close which enqueues more events and order matters.
+    enqueueEvent(Event::create(eventNames().abortEvent, true, false));
+    m_database-&gt;transactionFinished(this);
+}
+
+void LegacyTransaction::onComplete()
+{
+    LOG(StorageAPI, &quot;LegacyTransaction::onComplete&quot;);
+    ASSERT(m_state != Finished);
+    m_state = Finishing;
+    m_objectStoreCleanupMap.clear();
+    closeOpenCursors();
+
+    // Enqueue events before notifying database, as database may close which enqueues more events and order matters.
+    enqueueEvent(Event::create(eventNames().completeEvent, false, false));
+    m_database-&gt;transactionFinished(this);
+}
+
+bool LegacyTransaction::hasPendingActivity() const
+{
+    // FIXME: In an ideal world, we should return true as long as anyone has a or can
+    //        get a handle to us or any child request object and any of those have
+    //        event listeners. This is  in order to handle user generated events properly.
+    return m_hasPendingActivity &amp;&amp; !m_contextStopped;
+}
+
+bool LegacyTransaction::dispatchEvent(PassRefPtr&lt;Event&gt; event)
+{
+    LOG(StorageAPI, &quot;LegacyTransaction::dispatchEvent&quot;);
+    ASSERT(m_state != Finished);
+    ASSERT(m_hasPendingActivity);
+    ASSERT(scriptExecutionContext());
+    ASSERT(event-&gt;target() == this);
+    m_state = Finished;
+
+    // Break reference cycles.
+    for (auto&amp; objectStore : m_objectStoreMap)
+        objectStore.value-&gt;transactionFinished();
+    m_objectStoreMap.clear();
+    for (auto&amp; objectStore : m_deletedObjectStores)
+        objectStore-&gt;transactionFinished();
+    m_deletedObjectStores.clear();
+
+    Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
+    targets.append(this);
+    targets.append(db());
+
+    // FIXME: When we allow custom event dispatching, this will probably need to change.
+    ASSERT(event-&gt;type() == eventNames().completeEvent || event-&gt;type() == eventNames().abortEvent);
+    bool returnValue = IDBEventDispatcher::dispatch(event.get(), targets);
+    // FIXME: Try to construct a test where |this| outlives openDBRequest and we
+    // get a crash.
+    if (m_openDBRequest) {
+        ASSERT(isVersionChange());
+        m_openDBRequest-&gt;transactionDidFinishAndDispatch();
+    }
+    m_hasPendingActivity = false;
+    return returnValue;
+}
+
+bool LegacyTransaction::canSuspendForPageCache() const
+{
+    // FIXME: Technically we can suspend before the first request is schedule
+    //        and after the complete/abort event is enqueued.
+    return m_state == Finished;
+}
+
+void LegacyTransaction::stop()
+{
+    m_contextStopped = true;
+
+    abort(IGNORE_EXCEPTION);
+}
+
+const char* LegacyTransaction::activeDOMObjectName() const
+{
+    return &quot;LegacyTransaction&quot;;
+}
+
+void LegacyTransaction::enqueueEvent(PassRefPtr&lt;Event&gt; event)
+{
+    ASSERT_WITH_MESSAGE(m_state != Finished, &quot;A finished transaction tried to enqueue an event of type %s.&quot;, event-&gt;type().string().utf8().data());
+    if (m_contextStopped || !scriptExecutionContext())
+        return;
+
+    event-&gt;setTarget(this);
+    scriptExecutionContext()-&gt;eventQueue().enqueueEvent(event);
+}
+
+IDBDatabaseBackend* LegacyTransaction::backendDB() const
+{
+    return m_database-&gt;backend();
+}
+
+}
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyTransactionhfromrev189745trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyTransaction.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+/*
+ * Copyright (C) 2010 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyTransaction_h
+#define LegacyTransaction_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;DOMError.h&quot;
+#include &quot;Event.h&quot;
+#include &quot;EventListener.h&quot;
+#include &quot;EventTarget.h&quot;
+#include &quot;IDBDatabaseMetadata.h&quot;
+#include &quot;IDBTransaction.h&quot;
+#include &quot;IndexedDB.h&quot;
+#include &quot;LegacyDatabase.h&quot;
+#include &quot;LegacyRequest.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class IDBDatabaseBackend;
+class IDBDatabaseError;
+class LegacyCursor;
+class LegacyObjectStore;
+class LegacyOpenDBRequest;
+struct IDBObjectStoreMetadata;
+
+class LegacyTransaction final : public IDBTransaction {
+public:
+    static Ref&lt;LegacyTransaction&gt; create(ScriptExecutionContext*, int64_t, const Vector&lt;String&gt;&amp; objectStoreNames, IndexedDB::TransactionMode, LegacyDatabase*);
+    static Ref&lt;LegacyTransaction&gt; create(ScriptExecutionContext*, int64_t, LegacyDatabase*, LegacyOpenDBRequest*, const IDBDatabaseMetadata&amp; previousMetadata);
+    virtual ~LegacyTransaction();
+
+    IDBDatabaseBackend* backendDB() const;
+
+    int64_t id() const { return m_id; }
+    bool isActive() const { return m_state == Active; }
+    bool isFinished() const { return m_state == Finished; }
+    bool isReadOnly() const { return m_mode == IndexedDB::TransactionMode::ReadOnly; }
+    bool isVersionChange() const { return m_mode == IndexedDB::TransactionMode::VersionChange; }
+
+    virtual const String&amp; mode() const override final;
+    virtual IDBDatabase* db() const override final;
+    virtual PassRefPtr&lt;DOMError&gt; error() const override final { return m_error; }
+    virtual PassRefPtr&lt;IDBObjectStore&gt; objectStore(const String&amp; name, ExceptionCode&amp;) override final;
+    virtual void abort(ExceptionCode&amp;) override final;
+
+    class OpenCursorNotifier {
+    public:
+        OpenCursorNotifier(PassRefPtr&lt;LegacyTransaction&gt;, LegacyCursor*);
+        ~OpenCursorNotifier();
+        void cursorFinished();
+    private:
+        RefPtr&lt;LegacyTransaction&gt; m_transaction;
+        LegacyCursor* m_cursor;
+    };
+
+    void registerRequest(LegacyRequest*);
+    void unregisterRequest(LegacyRequest*);
+    void objectStoreCreated(const String&amp;, PassRefPtr&lt;LegacyObjectStore&gt;);
+    void objectStoreDeleted(const String&amp;);
+    void setActive(bool);
+    void setError(PassRefPtr&lt;DOMError&gt;, const String&amp; errorMessage);
+
+    void onAbort(PassRefPtr&lt;IDBDatabaseError&gt;);
+    void onComplete();
+
+    // EventTarget
+    virtual EventTargetInterface eventTargetInterface() const override final { return IDBTransactionEventTargetInterfaceType; }
+    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+
+    using EventTarget::dispatchEvent;
+    virtual bool dispatchEvent(PassRefPtr&lt;Event&gt;) override final;
+
+    // ActiveDOMObject
+    virtual bool hasPendingActivity() const override final;
+
+private:
+    LegacyTransaction(ScriptExecutionContext*, int64_t, const Vector&lt;String&gt;&amp;, IndexedDB::TransactionMode, LegacyDatabase*, LegacyOpenDBRequest*, const IDBDatabaseMetadata&amp;);
+
+    void enqueueEvent(PassRefPtr&lt;Event&gt;);
+    void closeOpenCursors();
+
+    void registerOpenCursor(LegacyCursor*);
+    void unregisterOpenCursor(LegacyCursor*);
+
+    // ActiveDOMObject API.
+    bool canSuspendForPageCache() const override;
+    void stop() override;
+    const char* activeDOMObjectName() const override;
+
+    // EventTarget API.
+    virtual void refEventTarget() override { ref(); }
+    virtual void derefEventTarget() override { deref(); }
+
+    enum State {
+        Inactive, // Created or started, but not in an event callback
+        Active, // Created or started, in creation scope or an event callback
+        Finishing, // In the process of aborting or completing.
+        Finished, // No more events will fire and no new requests may be filed.
+    };
+
+    int64_t m_id;
+    RefPtr&lt;LegacyDatabase&gt; m_database;
+    const Vector&lt;String&gt; m_objectStoreNames;
+    LegacyOpenDBRequest* m_openDBRequest;
+    const IndexedDB::TransactionMode m_mode;
+    State m_state;
+    bool m_hasPendingActivity;
+    bool m_contextStopped;
+    RefPtr&lt;DOMError&gt; m_error;
+    String m_errorMessage;
+
+    ListHashSet&lt;RefPtr&lt;LegacyRequest&gt;&gt; m_requestList;
+
+    typedef HashMap&lt;String, RefPtr&lt;LegacyObjectStore&gt;&gt; IDBObjectStoreMap;
+    IDBObjectStoreMap m_objectStoreMap;
+
+    typedef HashSet&lt;RefPtr&lt;LegacyObjectStore&gt;&gt; IDBObjectStoreSet;
+    IDBObjectStoreSet m_deletedObjectStores;
+
+    typedef HashMap&lt;RefPtr&lt;LegacyObjectStore&gt;, IDBObjectStoreMetadata&gt; IDBObjectStoreMetadataMap;
+    IDBObjectStoreMetadataMap m_objectStoreCleanupMap;
+    IDBDatabaseMetadata m_previousMetadata;
+
+    HashSet&lt;LegacyCursor*&gt; m_openCursors;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // LegacyTransaction_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyVersionChangeEventcppfromrev189745trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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;LegacyVersionChangeEvent.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+LegacyVersionChangeEvent::LegacyVersionChangeEvent(unsigned long long oldVersion, unsigned long long newVersion, const AtomicString&amp; eventType)
+    : IDBVersionChangeEvent(eventType)
+    , m_oldVersion(oldVersion)
+    , m_newVersion(newVersion)
+{
+}
+
+LegacyVersionChangeEvent::~LegacyVersionChangeEvent()
+{
+}
+
+EventInterface LegacyVersionChangeEvent::eventInterface() const
+{
+    return IDBVersionChangeEventInterfaceType;
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyVersionChangeEventhfromrev189745trunkSourceWebCoreModulesindexeddbIDBVersionChangeEventh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h (from rev 189745, trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h) (0 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyVersionChangeEvent.h        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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 LegacyVersionChangeEvent_h
+#define LegacyVersionChangeEvent_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBVersionChangeEvent.h&quot;
+#include &quot;IndexedDB.h&quot;
+
+namespace WebCore {
+
+class LegacyVersionChangeEvent : public IDBVersionChangeEvent {
+public:
+    static Ref&lt;LegacyVersionChangeEvent&gt; create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, const AtomicString&amp; eventType = AtomicString())
+    {
+        return adoptRef(*new LegacyVersionChangeEvent(oldVersion, newVersion, eventType));
+    }
+
+    virtual ~LegacyVersionChangeEvent();
+
+    virtual uint64_t oldVersion() const override final { return m_oldVersion; }
+    virtual uint64_t newVersion() const override final { return m_newVersion; }
+
+    virtual EventInterface eventInterface() const override final;
+
+private:
+    LegacyVersionChangeEvent(unsigned long long oldVersion, unsigned long long newVersion, const AtomicString&amp; eventType);
+
+    uint64_t m_oldVersion;
+    uint64_t m_newVersion;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // LegacyVersionChangeEvent_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -6775,7 +6775,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\DOMWindowIndexedDatabase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBAny.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBCursor.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBCursorBackend.cpp&quot; /&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\Modules\indexeddb\legacy\IDBCursorBackend.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBDatabase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBFactory.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\indexeddb\IDBIndex.cpp&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1906,15 +1906,18 @@
</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>-                510194441836F7E400925523 /* IDBCursorBackendOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510194421836F7E400925523 /* IDBCursorBackendOperations.cpp */; };
-                510194451836F7E500925523 /* IDBCursorBackendOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 510194431836F7E400925523 /* IDBCursorBackendOperations.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                51059DDD1820B17600DFF9B1 /* IDBTransactionBackendOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51059DD91820B17600DFF9B1 /* IDBTransactionBackendOperations.cpp */; };
-                51059DDE1820B17600DFF9B1 /* IDBTransactionBackendOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 51059DDA1820B17600DFF9B1 /* IDBTransactionBackendOperations.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                5103C2B11BA22D1A00E26337 /* LegacyAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B6E1BA0A76100F789CE /* LegacyAny.cpp */; };
+                5103C2B21BA2317400E26337 /* IDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B501B9F889B00F789CE /* IDBTransaction.cpp */; };
+                5103C2B31BA2324D00E26337 /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B541B9F88E800F789CE /* IDBCursor.cpp */; };
+                5103C2B41BA232AE00E26337 /* IDBCursorWithValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B421B9F889B00F789CE /* IDBCursorWithValue.cpp */; };
+                5103C2B51BA232D400E26337 /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B441B9F889B00F789CE /* IDBDatabase.cpp */; };
+                5103C2B61BA233BF00E26337 /* IDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B4E1B9F889B00F789CE /* IDBRequest.cpp */; };
+                5103C2B71BA233C400E26337 /* IDBOpenDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B4C1B9F889B00F789CE /* IDBOpenDBRequest.cpp */; };
+                5103C2B81BA235C500E26337 /* IDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B521B9F889B00F789CE /* IDBVersionChangeEvent.cpp */; };
+                5103C2B91BA23A2600E26337 /* LegacyAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B6F1BA0A76100F789CE /* LegacyAny.h */; };
</ins><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">                 510A326F18318431003C5326 /* IDBServerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A326E18318431003C5326 /* IDBServerConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                510B7DB7182D9F5D009BF957 /* IDBTransactionBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510B7DB5182D9F5D009BF957 /* IDBTransactionBackend.cpp */; };
-                510B7DB8182D9F5D009BF957 /* IDBTransactionBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 510B7DB6182D9F5D009BF957 /* IDBTransactionBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 510D4A33103165EE0049EA54 /* SocketStreamErrorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */; };
</span><span class="cx">                 510D4A34103165EE0049EA54 /* SocketStreamErrorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A2E103165EE0049EA54 /* SocketStreamErrorBase.h */; };
</span><span class="cx">                 510D4A36103165EE0049EA54 /* SocketStreamHandleBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A30103165EE0049EA54 /* SocketStreamHandleBase.cpp */; };
</span><span class="lines">@@ -1952,7 +1955,6 @@
</span><span class="cx">                 512DD8FB0D91E6AF000F89EE /* ArchiveResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512DD8F10D91E6AF000F89EE /* ArchiveResource.cpp */; };
</span><span class="cx">                 512DD8FC0D91E6AF000F89EE /* ArchiveResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F20D91E6AF000F89EE /* ArchiveResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 512DD8FD0D91E6AF000F89EE /* ArchiveFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */; };
</span><del>-                512EA9BC181F2EE0001D01E0 /* IDBPendingOpenCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 512EA9BB181F2EE0001D01E0 /* IDBPendingOpenCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 512EA9BE18202857001D01E0 /* IDBOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 512EA9BD18202857001D01E0 /* IDBOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51327D6011A33A2B004F9D65 /* SinkDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 51327D5E11A33A2B004F9D65 /* SinkDocument.h */; };
</span><span class="cx">                 51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */; };
</span><span class="lines">@@ -1989,14 +1991,35 @@
</span><span class="cx">                 514C767D0CE923A1007EF3CD /* ResourceRequestBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76680CE923A1007EF3CD /* ResourceRequestBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76690CE923A1007EF3CD /* ResourceResponseBase.cpp */; };
</span><span class="cx">                 514C767F0CE923A1007EF3CD /* ResourceResponseBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C766A0CE923A1007EF3CD /* ResourceResponseBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                5157D4641BA24AEE0085CA2F /* IDBFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B461B9F889B00F789CE /* IDBFactory.cpp */; };
+                5157D4651BA24AF80085CA2F /* IDBIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B481B9F889B00F789CE /* IDBIndex.cpp */; };
+                5157D4661BA24AFD0085CA2F /* IDBObjectStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B4A1B9F889B00F789CE /* IDBObjectStore.cpp */; };
</ins><span class="cx">                 5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */; };
</span><span class="cx">                 5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */; };
</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="cx">                 5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 5162C7F311F77EFB00612EFE /* SchemeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5163117D1851242B00534647 /* IDBDatabaseMetadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5163117C1851242B00534647 /* IDBDatabaseMetadata.cpp */; };
</span><del>-                516730A3182D8FBB003FAF5C /* IDBCursorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516730A1182D8FBB003FAF5C /* IDBCursorBackend.cpp */; };
-                516730A4182D8FBB003FAF5C /* IDBCursorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 516730A2182D8FBB003FAF5C /* IDBCursorBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                51645B5A1B9FA6C800F789CE /* LegacyCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B281B9F639100F789CE /* LegacyCursor.cpp */; };
+                51645B5B1B9FA6C800F789CE /* LegacyCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B291B9F639100F789CE /* LegacyCursor.h */; };
+                51645B5C1B9FA6C800F789CE /* LegacyCursorWithValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B2A1B9F639100F789CE /* LegacyCursorWithValue.cpp */; };
+                51645B5D1B9FA6C800F789CE /* LegacyCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B2B1B9F639100F789CE /* LegacyCursorWithValue.h */; };
+                51645B5E1B9FA6C800F789CE /* LegacyDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B2C1B9F639100F789CE /* LegacyDatabase.cpp */; };
+                51645B5F1B9FA6C800F789CE /* LegacyDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B2D1B9F639100F789CE /* LegacyDatabase.h */; };
+                51645B601B9FA6C800F789CE /* LegacyFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B2E1B9F639100F789CE /* LegacyFactory.cpp */; };
+                51645B611B9FA6C800F789CE /* LegacyFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B2F1B9F639100F789CE /* LegacyFactory.h */; };
+                51645B621B9FA6C800F789CE /* LegacyIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B301B9F639100F789CE /* LegacyIndex.cpp */; };
+                51645B631B9FA6C800F789CE /* LegacyIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B311B9F639100F789CE /* LegacyIndex.h */; };
+                51645B641B9FA6C800F789CE /* LegacyObjectStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B321B9F639100F789CE /* LegacyObjectStore.cpp */; };
+                51645B651B9FA6C800F789CE /* LegacyObjectStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B331B9F639100F789CE /* LegacyObjectStore.h */; };
+                51645B661B9FA6C800F789CE /* LegacyOpenDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B341B9F639100F789CE /* LegacyOpenDBRequest.cpp */; };
+                51645B671B9FA6C800F789CE /* LegacyOpenDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B351B9F639100F789CE /* LegacyOpenDBRequest.h */; };
+                51645B681B9FA6C800F789CE /* LegacyRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B361B9F639100F789CE /* LegacyRequest.cpp */; };
+                51645B691B9FA6C800F789CE /* LegacyRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B371B9F639100F789CE /* LegacyRequest.h */; };
+                51645B6A1B9FA6C800F789CE /* LegacyTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B381B9F639100F789CE /* LegacyTransaction.cpp */; };
+                51645B6B1B9FA6C800F789CE /* LegacyTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B391B9F639100F789CE /* LegacyTransaction.h */; };
+                51645B6C1B9FA6C800F789CE /* LegacyVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B3A1B9F639100F789CE /* LegacyVersionChangeEvent.cpp */; };
+                51645B6D1B9FA6C800F789CE /* LegacyVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B3B1B9F639100F789CE /* LegacyVersionChangeEvent.h */; };
</ins><span class="cx">                 516953971329A3C800B92D04 /* IconDatabaseBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516953951329A3C800B92D04 /* IconDatabaseBase.cpp */; };
</span><span class="cx">                 516953981329A3C800B92D04 /* IconDatabaseBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 516953961329A3C800B92D04 /* IconDatabaseBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */; };
</span><span class="lines">@@ -2007,8 +2030,6 @@
</span><span class="cx">                 51741D110B07259A00ED442C /* HistoryItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51741D0D0B07259A00ED442C /* HistoryItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51741D120B07259A00ED442C /* HistoryItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51741D0E0B07259A00ED442C /* HistoryItem.cpp */; };
</span><span class="cx">                 5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5174E20810A1F44F00F95E6F /* PopStateEvent.h */; };
</span><del>-                51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */; };
-                51771C8F182DB4B7008E781E /* IDBDatabaseBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 5179CE24195C81420019C198 /* GamepadProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 5179CE23195C81420019C198 /* GamepadProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5179CE26195C821D0019C198 /* GamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5179CE25195C821D0019C198 /* GamepadProvider.cpp */; };
</span><span class="cx">                 5179CE2A195C91860019C198 /* GamepadProviderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5179CE29195C91860019C198 /* GamepadProviderClient.h */; };
</span><span class="lines">@@ -2044,7 +2065,6 @@
</span><span class="cx">                 51ABB5B9186D0ED1008391A1 /* IDBObjectStoreMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ABB5B7186D0ED1008391A1 /* IDBObjectStoreMetadata.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51ABF64D16392E2800132A7A /* LoaderStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ABF64C16392E2800132A7A /* LoaderStrategy.cpp */; };
</span><span class="cx">                 51AF503616F100F60095B2E8 /* ResourceLoaderTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 51AF503516F100F60095B2E8 /* ResourceLoaderTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                51B07A441823248B00AA8D1A /* IDBPendingDeleteCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */; };
</span><span class="cx">                 51B454EA1B4DAE7D0085EAA6 /* PingHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B454E91B4DAE7D0085EAA6 /* PingHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51B45D201AB8D1E200117CD2 /* ContentExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51B45D1E1AB8D1E200117CD2 /* ContentExtension.cpp */; };
</span><span class="lines">@@ -2062,44 +2082,17 @@
</span><span class="cx">                 51D719B7181106E00016DC51 /* DOMWindowIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */; };
</span><span class="cx">                 51D719B9181106E00016DC51 /* IDBAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7196F181106DF0016DC51 /* IDBAny.cpp */; };
</span><span class="cx">                 51D719BA181106E00016DC51 /* IDBAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71970181106DF0016DC51 /* IDBAny.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                51D719BE181106E00016DC51 /* IDBCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71974181106DF0016DC51 /* IDBCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                51D719BF181106E00016DC51 /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71975181106DF0016DC51 /* IDBCursor.cpp */; };
-                51D719C0181106E00016DC51 /* IDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71976181106DF0016DC51 /* IDBCursor.h */; };
-                51D719C3181106E00016DC51 /* IDBCursorWithValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71979181106DF0016DC51 /* IDBCursorWithValue.cpp */; };
-                51D719C4181106E00016DC51 /* IDBCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197A181106DF0016DC51 /* IDBCursorWithValue.h */; };
-                51D719C6181106E00016DC51 /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7197C181106DF0016DC51 /* IDBDatabase.cpp */; };
-                51D719C7181106E00016DC51 /* IDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197D181106DF0016DC51 /* IDBDatabase.h */; };
-                51D719CA181106E00016DC51 /* IDBDatabaseCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                51D719CB181106E00016DC51 /* IDBDatabaseCallbacksImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */; };
-                51D719CC181106E00016DC51 /* IDBDatabaseCallbacksImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */; };
</del><span class="cx">                 51D719CD181106E00016DC51 /* IDBDatabaseError.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71983181106DF0016DC51 /* IDBDatabaseError.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D719CE181106E00016DC51 /* IDBDatabaseException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71984181106DF0016DC51 /* IDBDatabaseException.cpp */; };
</span><span class="cx">                 51D719CF181106E00016DC51 /* IDBDatabaseException.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71985181106DF0016DC51 /* IDBDatabaseException.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D719D0181106E00016DC51 /* IDBEventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71986181106DF0016DC51 /* IDBEventDispatcher.cpp */; };
</span><span class="cx">                 51D719D1181106E00016DC51 /* IDBEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71987181106DF0016DC51 /* IDBEventDispatcher.h */; };
</span><del>-                51D719D2181106E00016DC51 /* IDBFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71988181106DF0016DC51 /* IDBFactory.cpp */; };
-                51D719D3181106E00016DC51 /* IDBFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71989181106DF0016DC51 /* IDBFactory.h */; };
-                51D719D6181106E00016DC51 /* IDBFactoryBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7198C181106E00016DC51 /* IDBFactoryBackendInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                51D719D8181106E00016DC51 /* IDBIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7198E181106E00016DC51 /* IDBIndex.cpp */; };
-                51D719D9181106E00016DC51 /* IDBIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7198F181106E00016DC51 /* IDBIndex.h */; };
</del><span class="cx">                 51D719DB181106E00016DC51 /* IDBKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71991181106E00016DC51 /* IDBKey.cpp */; };
</span><span class="cx">                 51D719DC181106E00016DC51 /* IDBKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71992181106E00016DC51 /* IDBKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D719DD181106E00016DC51 /* IDBKeyPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71993181106E00016DC51 /* IDBKeyPath.cpp */; };
</span><span class="cx">                 51D719DE181106E00016DC51 /* IDBKeyPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71994181106E00016DC51 /* IDBKeyPath.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D719DF181106E00016DC51 /* IDBKeyRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71995181106E00016DC51 /* IDBKeyRange.cpp */; };
</span><span class="cx">                 51D719E0181106E00016DC51 /* IDBKeyRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71996181106E00016DC51 /* IDBKeyRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                51D719E3181106E00016DC51 /* IDBObjectStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71999181106E00016DC51 /* IDBObjectStore.cpp */; };
-                51D719E4181106E00016DC51 /* IDBObjectStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7199A181106E00016DC51 /* IDBObjectStore.h */; };
-                51D719E6181106E00016DC51 /* IDBOpenDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7199C181106E00016DC51 /* IDBOpenDBRequest.cpp */; };
-                51D719E7181106E00016DC51 /* IDBOpenDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7199D181106E00016DC51 /* IDBOpenDBRequest.h */; };
-                51D719E9181106E00016DC51 /* IDBPendingTransactionMonitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7199F181106E00016DC51 /* IDBPendingTransactionMonitor.cpp */; };
-                51D719EA181106E00016DC51 /* IDBPendingTransactionMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719A0181106E00016DC51 /* IDBPendingTransactionMonitor.h */; };
-                51D719EB181106E00016DC51 /* IDBRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D719A1181106E00016DC51 /* IDBRequest.cpp */; };
-                51D719EC181106E00016DC51 /* IDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719A2181106E00016DC51 /* IDBRequest.h */; };
-                51D719EE181106E00016DC51 /* IDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D719A4181106E00016DC51 /* IDBTransaction.cpp */; };
-                51D719EF181106E00016DC51 /* IDBTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719A5181106E00016DC51 /* IDBTransaction.h */; };
-                51D719F5181106E00016DC51 /* IDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D719AB181106E00016DC51 /* IDBVersionChangeEvent.cpp */; };
-                51D719F6181106E00016DC51 /* IDBVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719AC181106E00016DC51 /* IDBVersionChangeEvent.h */; };
</del><span class="cx">                 51D719F8181106E00016DC51 /* IndexedDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719AE181106E00016DC51 /* IndexedDB.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D719FB181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D719B1181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp */; };
</span><span class="cx">                 51D719FC181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D719B2181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.h */; };
</span><span class="lines">@@ -2123,12 +2116,31 @@
</span><span class="cx">                 51E3F9D60DA05E1D00250911 /* JSStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E3F9D40DA05E1D00250911 /* JSStorage.cpp */; };
</span><span class="cx">                 51E4143416A6596300C633C7 /* ResourceHandleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E4143216A6595100C633C7 /* ResourceHandleTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51E6821016387302003BBF3C /* LoaderStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E6820F16387302003BBF3C /* LoaderStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                51EAC5671815ED3E004F1BA4 /* IDBTransactionCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EAC5651815ED3E004F1BA4 /* IDBTransactionCoordinator.cpp */; };
-                51EAC5681815ED3E004F1BA4 /* IDBTransactionCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EAC5661815ED3E004F1BA4 /* IDBTransactionCoordinator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 51EAC5B218163F4E004F1BA4 /* IDBRecordIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EAC5B018163F4E004F1BA4 /* IDBRecordIdentifier.h */; };
</span><span class="cx">                 51EC92650CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EC925D0CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp */; };
</span><span class="cx">                 51EE7B381AA50B0500F92B21 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EE7B371AA50B0500F92B21 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51EE7B3A1AA5123100F92B21 /* ResourceLoadInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EE7B391AA5123100F92B21 /* ResourceLoadInfo.cpp */; };
</span><ins>+                51F41A681BA73B5B002E053B /* IDBCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A481BA73B2C002E053B /* IDBCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A691BA73B5B002E053B /* IDBCursorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A491BA73B2C002E053B /* IDBCursorBackend.cpp */; };
+                51F41A6A1BA73B5B002E053B /* IDBCursorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A4A1BA73B2C002E053B /* IDBCursorBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A6B1BA73B5B002E053B /* IDBCursorBackendOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A4B1BA73B2C002E053B /* IDBCursorBackendOperations.cpp */; };
+                51F41A6C1BA73B5B002E053B /* IDBCursorBackendOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A4C1BA73B2C002E053B /* IDBCursorBackendOperations.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A6D1BA73B5B002E053B /* IDBDatabaseBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A4D1BA73B2C002E053B /* IDBDatabaseBackend.cpp */; };
+                51F41A6E1BA73B5B002E053B /* IDBDatabaseBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A4E1BA73B2C002E053B /* IDBDatabaseBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A6F1BA73B5B002E053B /* IDBDatabaseCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B401B9F695E00F789CE /* IDBDatabaseCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A701BA73B5B002E053B /* IDBDatabaseCallbacksImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B3E1B9F692300F789CE /* IDBDatabaseCallbacksImpl.cpp */; };
+                51F41A711BA73B5B002E053B /* IDBDatabaseCallbacksImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B3F1B9F692300F789CE /* IDBDatabaseCallbacksImpl.h */; };
+                51F41A721BA73B5B002E053B /* IDBFactoryBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A4F1BA73B2C002E053B /* IDBFactoryBackendInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A731BA73B5B002E053B /* IDBTransactionBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A521BA73B2C002E053B /* IDBTransactionBackend.cpp */; };
+                51F41A741BA73B5B002E053B /* IDBTransactionBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A531BA73B2C002E053B /* IDBTransactionBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A751BA73B5B002E053B /* IDBTransactionBackendOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A541BA73B2C002E053B /* IDBTransactionBackendOperations.cpp */; };
+                51F41A761BA73B5B002E053B /* IDBTransactionBackendOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A551BA73B2C002E053B /* IDBTransactionBackendOperations.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A771BA73B5B002E053B /* IDBTransactionCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F41A561BA73B2C002E053B /* IDBTransactionCoordinator.cpp */; };
+                51F41A781BA73B5B002E053B /* IDBTransactionCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A571BA73B2C002E053B /* IDBTransactionCoordinator.h */; };
+                51F41A791BA73B5B002E053B /* IDBPendingDeleteCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A501BA73B2C002E053B /* IDBPendingDeleteCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A7A1BA73B5B002E053B /* IDBPendingOpenCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F41A511BA73B2C002E053B /* IDBPendingOpenCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51F41A7B1BA73B5B002E053B /* IDBPendingTransactionMonitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B3C1B9F68CF00F789CE /* IDBPendingTransactionMonitor.cpp */; };
+                51F41A7C1BA73B5B002E053B /* IDBPendingTransactionMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51645B3D1B9F68CF00F789CE /* IDBPendingTransactionMonitor.h */; };
</ins><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">@@ -9171,15 +9183,9 @@
</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>-                510194421836F7E400925523 /* IDBCursorBackendOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorBackendOperations.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510194431836F7E400925523 /* IDBCursorBackendOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackendOperations.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51059DD91820B17600DFF9B1 /* IDBTransactionBackendOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionBackendOperations.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51059DDA1820B17600DFF9B1 /* IDBTransactionBackendOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionBackendOperations.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><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="cx">                 5106D7BC18BDB76F000AB166 /* ContextMenuContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 510A326E18318431003C5326 /* IDBServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBServerConnection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                510B7DB5182D9F5D009BF957 /* IDBTransactionBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                510B7DB6182D9F5D009BF957 /* IDBTransactionBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamErrorBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 510D4A2E103165EE0049EA54 /* SocketStreamErrorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamErrorBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 510D4A30103165EE0049EA54 /* SocketStreamHandleBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamHandleBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9218,7 +9224,6 @@
</span><span class="cx">                 512DD8F10D91E6AF000F89EE /* ArchiveResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveResource.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512DD8F20D91E6AF000F89EE /* ArchiveResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveResource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                512EA9BB181F2EE0001D01E0 /* IDBPendingOpenCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingOpenCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 512EA9BD18202857001D01E0 /* IDBOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOperation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51327D5E11A33A2B004F9D65 /* SinkDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinkDocument.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SinkDocument.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9262,8 +9267,53 @@
</span><span class="cx">                 5162C7F211F77EFA00612EFE /* SchemeRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SchemeRegistry.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5162C7F311F77EFB00612EFE /* SchemeRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchemeRegistry.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5163117C1851242B00534647 /* IDBDatabaseMetadata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseMetadata.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                516730A1182D8FBB003FAF5C /* IDBCursorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                516730A2182D8FBB003FAF5C /* IDBCursorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                51645B281B9F639100F789CE /* LegacyCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyCursor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B291B9F639100F789CE /* LegacyCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCursor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2A1B9F639100F789CE /* LegacyCursorWithValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyCursorWithValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2B1B9F639100F789CE /* LegacyCursorWithValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCursorWithValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2C1B9F639100F789CE /* LegacyDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyDatabase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2D1B9F639100F789CE /* LegacyDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2E1B9F639100F789CE /* LegacyFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B2F1B9F639100F789CE /* LegacyFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B301B9F639100F789CE /* LegacyIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyIndex.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B311B9F639100F789CE /* LegacyIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyIndex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B321B9F639100F789CE /* LegacyObjectStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyObjectStore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B331B9F639100F789CE /* LegacyObjectStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyObjectStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B341B9F639100F789CE /* LegacyOpenDBRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyOpenDBRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B351B9F639100F789CE /* LegacyOpenDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyOpenDBRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B361B9F639100F789CE /* LegacyRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B371B9F639100F789CE /* LegacyRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B381B9F639100F789CE /* LegacyTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B391B9F639100F789CE /* LegacyTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3A1B9F639100F789CE /* LegacyVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyVersionChangeEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3B1B9F639100F789CE /* LegacyVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyVersionChangeEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3C1B9F68CF00F789CE /* IDBPendingTransactionMonitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBPendingTransactionMonitor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3D1B9F68CF00F789CE /* IDBPendingTransactionMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingTransactionMonitor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3E1B9F692300F789CE /* IDBDatabaseCallbacksImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseCallbacksImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B3F1B9F692300F789CE /* IDBDatabaseCallbacksImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacksImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B401B9F695E00F789CE /* IDBDatabaseCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B411B9F889B00F789CE /* IDBCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B421B9F889B00F789CE /* IDBCursorWithValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorWithValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B431B9F889B00F789CE /* IDBCursorWithValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorWithValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B441B9F889B00F789CE /* IDBDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B451B9F889B00F789CE /* IDBDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B461B9F889B00F789CE /* IDBFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B471B9F889B00F789CE /* IDBFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B481B9F889B00F789CE /* IDBIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndex.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B491B9F889B00F789CE /* IDBIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4A1B9F889B00F789CE /* IDBObjectStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBObjectStore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4B1B9F889B00F789CE /* IDBObjectStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBObjectStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4C1B9F889B00F789CE /* IDBOpenDBRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBOpenDBRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4D1B9F889B00F789CE /* IDBOpenDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOpenDBRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4E1B9F889B00F789CE /* IDBRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B4F1B9F889B00F789CE /* IDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B501B9F889B00F789CE /* IDBTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B511B9F889B00F789CE /* IDBTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B521B9F889B00F789CE /* IDBVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBVersionChangeEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B531B9F889B00F789CE /* IDBVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBVersionChangeEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B541B9F88E800F789CE /* IDBCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B6E1BA0A76100F789CE /* LegacyAny.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyAny.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51645B6F1BA0A76100F789CE /* LegacyAny.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyAny.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 516953951329A3C800B92D04 /* IconDatabaseBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IconDatabaseBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 516953961329A3C800B92D04 /* IconDatabaseBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconDatabaseBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTreeWalkerCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9277,8 +9327,6 @@
</span><span class="cx">                 51741D0E0B07259A00ED442C /* HistoryItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryItem.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5174E20810A1F44F00F95E6F /* PopStateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopStateEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5174E20B10A1F49A00F95E6F /* PopStateEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PopStateEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5179CE23195C81420019C198 /* GamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadProvider.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5179CE25195C821D0019C198 /* GamepadProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GamepadProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5179CE29195C91860019C198 /* GamepadProviderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadProviderClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9323,7 +9371,6 @@
</span><span class="cx">                 51ABB5B7186D0ED1008391A1 /* IDBObjectStoreMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBObjectStoreMetadata.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51ABF64C16392E2800132A7A /* LoaderStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderStrategy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51AF503516F100F60095B2E8 /* ResourceLoaderTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderTypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingDeleteCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51B454E91B4DAE7D0085EAA6 /* PingHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51B45D1E1AB8D1E200117CD2 /* ContentExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtension.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9342,30 +9389,15 @@
</span><span class="cx">                 51D7196F181106DF0016DC51 /* IDBAny.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBAny.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71970181106DF0016DC51 /* IDBAny.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBAny.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71971181106DF0016DC51 /* IDBAny.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBAny.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D71974181106DF0016DC51 /* IDBCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCallbacks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D71975181106DF0016DC51 /* IDBCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D71976181106DF0016DC51 /* IDBCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D71977181106DF0016DC51 /* IDBCursor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBCursor.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D71979181106DF0016DC51 /* IDBCursorWithValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorWithValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7197A181106DF0016DC51 /* IDBCursorWithValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorWithValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D7197B181106DF0016DC51 /* IDBCursorWithValue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBCursorWithValue.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D7197C181106DF0016DC51 /* IDBDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7197D181106DF0016DC51 /* IDBDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D7197E181106DF0016DC51 /* IDBDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBDatabase.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseCallbacksImpl.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacksImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D71983181106DF0016DC51 /* IDBDatabaseError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseError.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71984181106DF0016DC51 /* IDBDatabaseException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseException.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71985181106DF0016DC51 /* IDBDatabaseException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseException.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71986181106DF0016DC51 /* IDBEventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBEventDispatcher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71987181106DF0016DC51 /* IDBEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBEventDispatcher.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D71988181106DF0016DC51 /* IDBFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D71989181106DF0016DC51 /* IDBFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D7198A181106DF0016DC51 /* IDBFactory.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBFactory.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D7198C181106E00016DC51 /* IDBFactoryBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryBackendInterface.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7198E181106E00016DC51 /* IDBIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndex.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7198F181106E00016DC51 /* IDBIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndex.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D71990181106E00016DC51 /* IDBIndex.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBIndex.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71991181106E00016DC51 /* IDBKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBKey.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71992181106E00016DC51 /* IDBKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBKey.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9374,22 +9406,10 @@
</span><span class="cx">                 51D71995181106E00016DC51 /* IDBKeyRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBKeyRange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71996181106E00016DC51 /* IDBKeyRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBKeyRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D71997181106E00016DC51 /* IDBKeyRange.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBKeyRange.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D71999181106E00016DC51 /* IDBObjectStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBObjectStore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7199A181106E00016DC51 /* IDBObjectStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBObjectStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D7199B181106E00016DC51 /* IDBObjectStore.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBObjectStore.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D7199C181106E00016DC51 /* IDBOpenDBRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBOpenDBRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D7199D181106E00016DC51 /* IDBOpenDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOpenDBRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D7199E181106E00016DC51 /* IDBOpenDBRequest.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBOpenDBRequest.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D7199F181106E00016DC51 /* IDBPendingTransactionMonitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBPendingTransactionMonitor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D719A0181106E00016DC51 /* IDBPendingTransactionMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingTransactionMonitor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D719A1181106E00016DC51 /* IDBRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D719A2181106E00016DC51 /* IDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D719A3181106E00016DC51 /* IDBRequest.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBRequest.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D719A4181106E00016DC51 /* IDBTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D719A5181106E00016DC51 /* IDBTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D719A6181106E00016DC51 /* IDBTransaction.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBTransaction.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51D719AB181106E00016DC51 /* IDBVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBVersionChangeEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51D719AC181106E00016DC51 /* IDBVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBVersionChangeEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51D719AD181106E00016DC51 /* IDBVersionChangeEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBVersionChangeEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D719AE181106E00016DC51 /* IndexedDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedDB.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51D719B1181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerGlobalScopeIndexedDatabase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9419,12 +9439,26 @@
</span><span class="cx">                 51E3F9D50DA05E1D00250911 /* JSStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStorage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E4143216A6595100C633C7 /* ResourceHandleTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceHandleTypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51E6820F16387302003BBF3C /* LoaderStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderStrategy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                51EAC5651815ED3E004F1BA4 /* IDBTransactionCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionCoordinator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                51EAC5661815ED3E004F1BA4 /* IDBTransactionCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionCoordinator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 51EAC5B018163F4E004F1BA4 /* IDBRecordIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRecordIdentifier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51EC925D0CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomSQLStatementErrorCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51EE7B371AA50B0500F92B21 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51EE7B391AA5123100F92B21 /* ResourceLoadInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                51F41A481BA73B2C002E053B /* IDBCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCallbacks.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A491BA73B2C002E053B /* IDBCursorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4A1BA73B2C002E053B /* IDBCursorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4B1BA73B2C002E053B /* IDBCursorBackendOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursorBackendOperations.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4C1BA73B2C002E053B /* IDBCursorBackendOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackendOperations.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4D1BA73B2C002E053B /* IDBDatabaseBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4E1BA73B2C002E053B /* IDBDatabaseBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A4F1BA73B2C002E053B /* IDBFactoryBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryBackendInterface.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A501BA73B2C002E053B /* IDBPendingDeleteCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingDeleteCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A511BA73B2C002E053B /* IDBPendingOpenCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingOpenCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A521BA73B2C002E053B /* IDBTransactionBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionBackend.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A531BA73B2C002E053B /* IDBTransactionBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionBackend.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A541BA73B2C002E053B /* IDBTransactionBackendOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionBackendOperations.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A551BA73B2C002E053B /* IDBTransactionBackendOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionBackendOperations.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A561BA73B2C002E053B /* IDBTransactionCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBTransactionCoordinator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51F41A571BA73B2C002E053B /* IDBTransactionCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBTransactionCoordinator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><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><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="lines">@@ -16552,6 +16586,56 @@
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                51645B271B9F637E00F789CE /* legacy */ = {
+                        isa = PBXGroup;
+                        children = (
+                                51F41A481BA73B2C002E053B /* IDBCallbacks.h */,
+                                51F41A491BA73B2C002E053B /* IDBCursorBackend.cpp */,
+                                51F41A4A1BA73B2C002E053B /* IDBCursorBackend.h */,
+                                51F41A4B1BA73B2C002E053B /* IDBCursorBackendOperations.cpp */,
+                                51F41A4C1BA73B2C002E053B /* IDBCursorBackendOperations.h */,
+                                51F41A4D1BA73B2C002E053B /* IDBDatabaseBackend.cpp */,
+                                51F41A4E1BA73B2C002E053B /* IDBDatabaseBackend.h */,
+                                51645B401B9F695E00F789CE /* IDBDatabaseCallbacks.h */,
+                                51645B3E1B9F692300F789CE /* IDBDatabaseCallbacksImpl.cpp */,
+                                51645B3F1B9F692300F789CE /* IDBDatabaseCallbacksImpl.h */,
+                                51F41A4F1BA73B2C002E053B /* IDBFactoryBackendInterface.h */,
+                                51F41A521BA73B2C002E053B /* IDBTransactionBackend.cpp */,
+                                51F41A531BA73B2C002E053B /* IDBTransactionBackend.h */,
+                                51F41A541BA73B2C002E053B /* IDBTransactionBackendOperations.cpp */,
+                                51F41A551BA73B2C002E053B /* IDBTransactionBackendOperations.h */,
+                                51F41A561BA73B2C002E053B /* IDBTransactionCoordinator.cpp */,
+                                51F41A571BA73B2C002E053B /* IDBTransactionCoordinator.h */,
+                                51F41A501BA73B2C002E053B /* IDBPendingDeleteCall.h */,
+                                51F41A511BA73B2C002E053B /* IDBPendingOpenCall.h */,
+                                51645B3C1B9F68CF00F789CE /* IDBPendingTransactionMonitor.cpp */,
+                                51645B3D1B9F68CF00F789CE /* IDBPendingTransactionMonitor.h */,
+                                51645B6E1BA0A76100F789CE /* LegacyAny.cpp */,
+                                51645B6F1BA0A76100F789CE /* LegacyAny.h */,
+                                51645B281B9F639100F789CE /* LegacyCursor.cpp */,
+                                51645B291B9F639100F789CE /* LegacyCursor.h */,
+                                51645B2A1B9F639100F789CE /* LegacyCursorWithValue.cpp */,
+                                51645B2B1B9F639100F789CE /* LegacyCursorWithValue.h */,
+                                51645B2C1B9F639100F789CE /* LegacyDatabase.cpp */,
+                                51645B2D1B9F639100F789CE /* LegacyDatabase.h */,
+                                51645B2E1B9F639100F789CE /* LegacyFactory.cpp */,
+                                51645B2F1B9F639100F789CE /* LegacyFactory.h */,
+                                51645B301B9F639100F789CE /* LegacyIndex.cpp */,
+                                51645B311B9F639100F789CE /* LegacyIndex.h */,
+                                51645B321B9F639100F789CE /* LegacyObjectStore.cpp */,
+                                51645B331B9F639100F789CE /* LegacyObjectStore.h */,
+                                51645B341B9F639100F789CE /* LegacyOpenDBRequest.cpp */,
+                                51645B351B9F639100F789CE /* LegacyOpenDBRequest.h */,
+                                51645B361B9F639100F789CE /* LegacyRequest.cpp */,
+                                51645B371B9F639100F789CE /* LegacyRequest.h */,
+                                51645B381B9F639100F789CE /* LegacyTransaction.cpp */,
+                                51645B391B9F639100F789CE /* LegacyTransaction.h */,
+                                51645B3A1B9F639100F789CE /* LegacyVersionChangeEvent.cpp */,
+                                51645B3B1B9F639100F789CE /* LegacyVersionChangeEvent.h */,
+                        );
+                        path = legacy;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 51741D080B07257000ED442C /* history */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -18651,31 +18735,22 @@
</span><span class="cx">                 9712A55315004E3C0048AF10 /* indexeddb */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                51645B271B9F637E00F789CE /* legacy */,
</ins><span class="cx">                                 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */,
</span><span class="cx">                                 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */,
</span><span class="cx">                                 51D7196E181106DF0016DC51 /* DOMWindowIndexedDatabase.idl */,
</span><span class="cx">                                 51D7196F181106DF0016DC51 /* IDBAny.cpp */,
</span><span class="cx">                                 51D71970181106DF0016DC51 /* IDBAny.h */,
</span><span class="cx">                                 51D71971181106DF0016DC51 /* IDBAny.idl */,
</span><del>-                                51D71974181106DF0016DC51 /* IDBCallbacks.h */,
-                                51D71975181106DF0016DC51 /* IDBCursor.cpp */,
-                                51D71976181106DF0016DC51 /* IDBCursor.h */,
</del><ins>+                                51645B541B9F88E800F789CE /* IDBCursor.cpp */,
+                                51645B411B9F889B00F789CE /* IDBCursor.h */,
</ins><span class="cx">                                 51D71977181106DF0016DC51 /* IDBCursor.idl */,
</span><del>-                                516730A1182D8FBB003FAF5C /* IDBCursorBackend.cpp */,
-                                516730A2182D8FBB003FAF5C /* IDBCursorBackend.h */,
-                                510194421836F7E400925523 /* IDBCursorBackendOperations.cpp */,
-                                510194431836F7E400925523 /* IDBCursorBackendOperations.h */,
-                                51D71979181106DF0016DC51 /* IDBCursorWithValue.cpp */,
-                                51D7197A181106DF0016DC51 /* IDBCursorWithValue.h */,
</del><ins>+                                51645B421B9F889B00F789CE /* IDBCursorWithValue.cpp */,
+                                51645B431B9F889B00F789CE /* IDBCursorWithValue.h */,
</ins><span class="cx">                                 51D7197B181106DF0016DC51 /* IDBCursorWithValue.idl */,
</span><del>-                                51D7197C181106DF0016DC51 /* IDBDatabase.cpp */,
-                                51D7197D181106DF0016DC51 /* IDBDatabase.h */,
</del><ins>+                                51645B441B9F889B00F789CE /* IDBDatabase.cpp */,
+                                51645B451B9F889B00F789CE /* IDBDatabase.h */,
</ins><span class="cx">                                 51D7197E181106DF0016DC51 /* IDBDatabase.idl */,
</span><del>-                                51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */,
-                                51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */,
-                                51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */,
-                                51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */,
-                                51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */,
</del><span class="cx">                                 51D71983181106DF0016DC51 /* IDBDatabaseError.h */,
</span><span class="cx">                                 51D71984181106DF0016DC51 /* IDBDatabaseException.cpp */,
</span><span class="cx">                                 51D71985181106DF0016DC51 /* IDBDatabaseException.h */,
</span><span class="lines">@@ -18683,13 +18758,12 @@
</span><span class="cx">                                 51C9611A183D2B8000D2002E /* IDBDatabaseMetadata.h */,
</span><span class="cx">                                 51D71986181106DF0016DC51 /* IDBEventDispatcher.cpp */,
</span><span class="cx">                                 51D71987181106DF0016DC51 /* IDBEventDispatcher.h */,
</span><del>-                                51D71988181106DF0016DC51 /* IDBFactory.cpp */,
-                                51D71989181106DF0016DC51 /* IDBFactory.h */,
</del><ins>+                                51645B461B9F889B00F789CE /* IDBFactory.cpp */,
+                                51645B471B9F889B00F789CE /* IDBFactory.h */,
</ins><span class="cx">                                 51D7198A181106DF0016DC51 /* IDBFactory.idl */,
</span><del>-                                51D7198C181106E00016DC51 /* IDBFactoryBackendInterface.h */,
</del><span class="cx">                                 5123AF1C18918AE40031CDC9 /* IDBGetResult.h */,
</span><del>-                                51D7198E181106E00016DC51 /* IDBIndex.cpp */,
-                                51D7198F181106E00016DC51 /* IDBIndex.h */,
</del><ins>+                                51645B481B9F889B00F789CE /* IDBIndex.cpp */,
+                                51645B491B9F889B00F789CE /* IDBIndex.h */,
</ins><span class="cx">                                 51D71990181106E00016DC51 /* IDBIndex.idl */,
</span><span class="cx">                                 51ABB5B6186D0ED1008391A1 /* IDBIndexMetadata.h */,
</span><span class="cx">                                 51D71991181106E00016DC51 /* IDBKey.cpp */,
</span><span class="lines">@@ -18703,34 +18777,24 @@
</span><span class="cx">                                 51D71997181106E00016DC51 /* IDBKeyRange.idl */,
</span><span class="cx">                                 5123AF161890A4CA0031CDC9 /* IDBKeyRangeData.cpp */,
</span><span class="cx">                                 5123AF171890A4CA0031CDC9 /* IDBKeyRangeData.h */,
</span><del>-                                51D71999181106E00016DC51 /* IDBObjectStore.cpp */,
-                                51D7199A181106E00016DC51 /* IDBObjectStore.h */,
</del><ins>+                                51645B4A1B9F889B00F789CE /* IDBObjectStore.cpp */,
+                                51645B4B1B9F889B00F789CE /* IDBObjectStore.h */,
</ins><span class="cx">                                 51D7199B181106E00016DC51 /* IDBObjectStore.idl */,
</span><span class="cx">                                 51ABB5B7186D0ED1008391A1 /* IDBObjectStoreMetadata.h */,
</span><del>-                                51D7199C181106E00016DC51 /* IDBOpenDBRequest.cpp */,
-                                51D7199D181106E00016DC51 /* IDBOpenDBRequest.h */,
</del><ins>+                                51645B4C1B9F889B00F789CE /* IDBOpenDBRequest.cpp */,
+                                51645B4D1B9F889B00F789CE /* IDBOpenDBRequest.h */,
</ins><span class="cx">                                 51D7199E181106E00016DC51 /* IDBOpenDBRequest.idl */,
</span><span class="cx">                                 512EA9BD18202857001D01E0 /* IDBOperation.h */,
</span><del>-                                51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */,
-                                512EA9BB181F2EE0001D01E0 /* IDBPendingOpenCall.h */,
-                                51D7199F181106E00016DC51 /* IDBPendingTransactionMonitor.cpp */,
-                                51D719A0181106E00016DC51 /* IDBPendingTransactionMonitor.h */,
</del><span class="cx">                                 51EAC5B018163F4E004F1BA4 /* IDBRecordIdentifier.h */,
</span><del>-                                51D719A1181106E00016DC51 /* IDBRequest.cpp */,
-                                51D719A2181106E00016DC51 /* IDBRequest.h */,
</del><ins>+                                51645B4E1B9F889B00F789CE /* IDBRequest.cpp */,
+                                51645B4F1B9F889B00F789CE /* IDBRequest.h */,
</ins><span class="cx">                                 51D719A3181106E00016DC51 /* IDBRequest.idl */,
</span><span class="cx">                                 510A326E18318431003C5326 /* IDBServerConnection.h */,
</span><del>-                                51D719A4181106E00016DC51 /* IDBTransaction.cpp */,
-                                51D719A5181106E00016DC51 /* IDBTransaction.h */,
</del><ins>+                                51645B501B9F889B00F789CE /* IDBTransaction.cpp */,
+                                51645B511B9F889B00F789CE /* IDBTransaction.h */,
</ins><span class="cx">                                 51D719A6181106E00016DC51 /* IDBTransaction.idl */,
</span><del>-                                510B7DB5182D9F5D009BF957 /* IDBTransactionBackend.cpp */,
-                                510B7DB6182D9F5D009BF957 /* IDBTransactionBackend.h */,
-                                51059DD91820B17600DFF9B1 /* IDBTransactionBackendOperations.cpp */,
-                                51059DDA1820B17600DFF9B1 /* IDBTransactionBackendOperations.h */,
-                                51EAC5651815ED3E004F1BA4 /* IDBTransactionCoordinator.cpp */,
-                                51EAC5661815ED3E004F1BA4 /* IDBTransactionCoordinator.h */,
-                                51D719AB181106E00016DC51 /* IDBVersionChangeEvent.cpp */,
-                                51D719AC181106E00016DC51 /* IDBVersionChangeEvent.h */,
</del><ins>+                                51645B521B9F889B00F789CE /* IDBVersionChangeEvent.cpp */,
+                                51645B531B9F889B00F789CE /* IDBVersionChangeEvent.h */,
</ins><span class="cx">                                 51D719AD181106E00016DC51 /* IDBVersionChangeEvent.idl */,
</span><span class="cx">                                 51D719AE181106E00016DC51 /* IndexedDB.h */,
</span><span class="cx">                                 51D719B1181106E00016DC51 /* WorkerGlobalScopeIndexedDatabase.cpp */,
</span><span class="lines">@@ -23984,6 +24048,7 @@
</span><span class="cx">                                 073AB4B317F8BACA006E0D6F /* AllVideoCapabilities.h in Headers */,
</span><span class="cx">                                 CEDA12D7152CA1CB00D9E08D /* AlternativeTextClient.h in Headers */,
</span><span class="cx">                                 CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */,
</span><ins>+                                51F41A761BA73B5B002E053B /* IDBTransactionBackendOperations.h in Headers */,
</ins><span class="cx">                                 CE7B2DB31586ABAD0098B3FA /* AlternativeTextUIController.h in Headers */,
</span><span class="cx">                                 FD31603E12B0267600C1A359 /* AnalyserNode.h in Headers */,
</span><span class="cx">                                 31A795C71888BCB200382F90 /* ANGLEInstancedArrays.h in Headers */,
</span><span class="lines">@@ -24014,6 +24079,7 @@
</span><span class="cx">                                 0FFD4D6118651FA300512F6E /* AsyncScrollingCoordinator.h in Headers */,
</span><span class="cx">                                 37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */,
</span><span class="cx">                                 A8C4A80D09D563270003AC8D /* Attr.h in Headers */,
</span><ins>+                                51645B5D1B9FA6C800F789CE /* LegacyCursorWithValue.h in Headers */,
</ins><span class="cx">                                 A8C4A80B09D563270003AC8D /* Attribute.h in Headers */,
</span><span class="cx">                                 FD31607A12B026F700C1A359 /* AudioArray.h in Headers */,
</span><span class="cx">                                 FD629EA3154B47160006D026 /* AudioBasicInspectorNode.h in Headers */,
</span><span class="lines">@@ -24547,6 +24613,7 @@
</span><span class="cx">                                 85B498ED0ADB32FB00925CBB /* DOMCSSRuleInternal.h in Headers */,
</span><span class="cx">                                 85032DE30AA8C9BE007D3B7D /* DOMCSSRuleList.h in Headers */,
</span><span class="cx">                                 85E711920AC5D5350053270F /* DOMCSSRuleListInternal.h in Headers */,
</span><ins>+                                51645B5B1B9FA6C800F789CE /* LegacyCursor.h in Headers */,
</ins><span class="cx">                                 85032DE50AA8C9BE007D3B7D /* DOMCSSStyleDeclaration.h in Headers */,
</span><span class="cx">                                 2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */,
</span><span class="cx">                                 85E711930AC5D5350053270F /* DOMCSSStyleDeclarationInternal.h in Headers */,
</span><span class="lines">@@ -24561,6 +24628,7 @@
</span><span class="cx">                                 858C381C0AA8E29600B187A4 /* DOMCSSValue.h in Headers */,
</span><span class="cx">                                 85B498F30ADB336A00925CBB /* DOMCSSValueInternal.h in Headers */,
</span><span class="cx">                                 26F756B31B3B66F70005DD79 /* ImmutableNFA.h in Headers */,
</span><ins>+                                51F41A781BA73B5B002E053B /* IDBTransactionCoordinator.h in Headers */,
</ins><span class="cx">                                 858C383C0AA8ED8200B187A4 /* DOMCSSValueList.h in Headers */,
</span><span class="cx">                                 85909D2B0ACC7D5500DF01F1 /* DOMCSSValueListInternal.h in Headers */,
</span><span class="cx">                                 E10B9CCC0B747A44003ED890 /* DOMCustomXPathNSResolver.h in Headers */,
</span><span class="lines">@@ -24797,6 +24865,7 @@
</span><span class="cx">                                 85ACA99C0A9B575900671E90 /* DOMText.h in Headers */,
</span><span class="cx">                                 DDE63ED50B7D45A800226998 /* DOMTextEvent.h in Headers */,
</span><span class="cx">                                 85E711D90AC5D5350053270F /* DOMTextInternal.h in Headers */,
</span><ins>+                                51645B6D1B9FA6C800F789CE /* LegacyVersionChangeEvent.h in Headers */,
</ins><span class="cx">                                 188604B40F2E654A000B6443 /* DOMTimer.h in Headers */,
</span><span class="cx">                                 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */,
</span><span class="cx">                                 8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */,
</span><span class="lines">@@ -24950,6 +25019,7 @@
</span><span class="cx">                                 976D6C83122B8A3D001FD1F7 /* FileError.h in Headers */,
</span><span class="cx">                                 2EDF369F122C94C8002F7D4E /* FileException.h in Headers */,
</span><span class="cx">                                 1A88A90517553CD7000C74F9 /* FileIconLoader.h in Headers */,
</span><ins>+                                51645B631B9FA6C800F789CE /* LegacyIndex.h in Headers */,
</ins><span class="cx">                                 F55B3DBE1251F12D003EF269 /* FileInputType.h in Headers */,
</span><span class="cx">                                 976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */,
</span><span class="cx">                                 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */,
</span><span class="lines">@@ -25105,6 +25175,7 @@
</span><span class="cx">                                 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
</span><span class="cx">                                 A8DF3FD0097FA0FC0052981B /* HTMLCollection.h in Headers */,
</span><span class="cx">                                 977B3865122883E900B81FF8 /* HTMLConstructionSite.h in Headers */,
</span><ins>+                                51F41A6A1BA73B5B002E053B /* IDBCursorBackend.h in Headers */,
</ins><span class="cx">                                 7C3E510A18DF8F3500C112F7 /* HTMLConverter.h in Headers */,
</span><span class="cx">                                 F5C041DB0FFCA7CE00839D4A /* HTMLDataListElement.h in Headers */,
</span><span class="cx">                                 D359D78A129CA2710006E5D2 /* HTMLDetailsElement.h in Headers */,
</span><span class="lines">@@ -25224,44 +25295,21 @@
</span><span class="cx">                                 45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */,
</span><span class="cx">                                 51D719BA181106E00016DC51 /* IDBAny.h in Headers */,
</span><span class="cx">                                 C585A66311D4FAC5004C3E4B /* IDBBindingUtilities.h in Headers */,
</span><del>-                                51D719BE181106E00016DC51 /* IDBCallbacks.h in Headers */,
-                                51D719C0181106E00016DC51 /* IDBCursor.h in Headers */,
-                                516730A4182D8FBB003FAF5C /* IDBCursorBackend.h in Headers */,
-                                510194451836F7E500925523 /* IDBCursorBackendOperations.h in Headers */,
-                                51D719C4181106E00016DC51 /* IDBCursorWithValue.h in Headers */,
-                                51D719C7181106E00016DC51 /* IDBDatabase.h in Headers */,
-                                51771C8F182DB4B7008E781E /* IDBDatabaseBackend.h in Headers */,
-                                51D719CA181106E00016DC51 /* IDBDatabaseCallbacks.h in Headers */,
-                                51D719CC181106E00016DC51 /* IDBDatabaseCallbacksImpl.h in Headers */,
</del><span class="cx">                                 51D719CD181106E00016DC51 /* IDBDatabaseError.h in Headers */,
</span><span class="cx">                                 51D719CF181106E00016DC51 /* IDBDatabaseException.h in Headers */,
</span><span class="cx">                                 51C9611B183D2B8000D2002E /* IDBDatabaseMetadata.h in Headers */,
</span><span class="cx">                                 51D719D1181106E00016DC51 /* IDBEventDispatcher.h in Headers */,
</span><del>-                                51D719D3181106E00016DC51 /* IDBFactory.h in Headers */,
-                                51D719D6181106E00016DC51 /* IDBFactoryBackendInterface.h in Headers */,
</del><span class="cx">                                 5123AF1D18918AE40031CDC9 /* IDBGetResult.h in Headers */,
</span><del>-                                51D719D9181106E00016DC51 /* IDBIndex.h in Headers */,
</del><span class="cx">                                 51ABB5B8186D0ED1008391A1 /* IDBIndexMetadata.h in Headers */,
</span><span class="cx">                                 51D719DC181106E00016DC51 /* IDBKey.h in Headers */,
</span><span class="cx">                                 511EC1A6188DACA400BA3EB6 /* IDBKeyData.h in Headers */,
</span><span class="cx">                                 51D719DE181106E00016DC51 /* IDBKeyPath.h in Headers */,
</span><span class="cx">                                 51D719E0181106E00016DC51 /* IDBKeyRange.h in Headers */,
</span><span class="cx">                                 5123AF191890A4CA0031CDC9 /* IDBKeyRangeData.h in Headers */,
</span><del>-                                51D719E4181106E00016DC51 /* IDBObjectStore.h in Headers */,
</del><span class="cx">                                 51ABB5B9186D0ED1008391A1 /* IDBObjectStoreMetadata.h in Headers */,
</span><del>-                                51D719E7181106E00016DC51 /* IDBOpenDBRequest.h in Headers */,
</del><span class="cx">                                 512EA9BE18202857001D01E0 /* IDBOperation.h in Headers */,
</span><del>-                                51B07A441823248B00AA8D1A /* IDBPendingDeleteCall.h in Headers */,
-                                512EA9BC181F2EE0001D01E0 /* IDBPendingOpenCall.h in Headers */,
-                                51D719EA181106E00016DC51 /* IDBPendingTransactionMonitor.h in Headers */,
</del><span class="cx">                                 51EAC5B218163F4E004F1BA4 /* IDBRecordIdentifier.h in Headers */,
</span><del>-                                51D719EC181106E00016DC51 /* IDBRequest.h in Headers */,
</del><span class="cx">                                 510A326F18318431003C5326 /* IDBServerConnection.h in Headers */,
</span><del>-                                51D719EF181106E00016DC51 /* IDBTransaction.h in Headers */,
-                                510B7DB8182D9F5D009BF957 /* IDBTransactionBackend.h in Headers */,
-                                51059DDE1820B17600DFF9B1 /* IDBTransactionBackendOperations.h in Headers */,
-                                51EAC5681815ED3E004F1BA4 /* IDBTransactionCoordinator.h in Headers */,
-                                51D719F6181106E00016DC51 /* IDBVersionChangeEvent.h in Headers */,
</del><span class="cx">                                 1A71D57C0F33819000F9CE4E /* IdentifierRep.h in Headers */,
</span><span class="cx">                                 49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
</span><span class="cx">                                 C0C054CD1118C8E400CE2636 /* IDLParser.pm in Headers */,
</span><span class="lines">@@ -25352,6 +25400,7 @@
</span><span class="cx">                                 E134F5AB12EE343F004EC58D /* IntRectHash.h in Headers */,
</span><span class="cx">                                 B27535750B053814002CE64F /* IntSize.h in Headers */,
</span><span class="cx">                                 B27535760B053814002CE64F /* IntSizeHash.h in Headers */,
</span><ins>+                                51F41A6C1BA73B5B002E053B /* IDBCursorBackendOperations.h in Headers */,
</ins><span class="cx">                                 CE12524D1A1A77DE00864480 /* IOPMLibSPI.h in Headers */,
</span><span class="cx">                                 44DEF6431A6FF92700D45EEC /* IOReturnSPI.h in Headers */,
</span><span class="cx">                                 2D0B4AAB18DA1CCD00434DE1 /* IOSurface.h in Headers */,
</span><span class="lines">@@ -25368,6 +25417,7 @@
</span><span class="cx">                                 65DF31DB09D1C123000BE325 /* JSAttr.h in Headers */,
</span><span class="cx">                                 FDA15E9E12B03EE1003A583A /* JSAudioBuffer.h in Headers */,
</span><span class="cx">                                 FDF7E9C413AC21DB00A51EAC /* JSAudioBufferCallback.h in Headers */,
</span><ins>+                                51645B5F1B9FA6C800F789CE /* LegacyDatabase.h in Headers */,
</ins><span class="cx">                                 FDA15EA012B03EE1003A583A /* JSAudioBufferSourceNode.h in Headers */,
</span><span class="cx">                                 FDA15EA612B03EE1003A583A /* JSAudioContext.h in Headers */,
</span><span class="cx">                                 51B454EA1B4DAE7D0085EAA6 /* PingHandle.h in Headers */,
</span><span class="lines">@@ -25402,6 +25452,7 @@
</span><span class="cx">                                 93F9B6E10BA0FB7200854064 /* JSComment.h in Headers */,
</span><span class="cx">                                 79AC9219109945C80021266E /* JSCompositionEvent.h in Headers */,
</span><span class="cx">                                 FDA15EBE12B03F0B003A583A /* JSConvolverNode.h in Headers */,
</span><ins>+                                5103C2B91BA23A2600E26337 /* LegacyAny.h in Headers */,
</ins><span class="cx">                                 FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */,
</span><span class="cx">                                 930705DA09E0C9BF00B17FE4 /* JSCounter.h in Headers */,
</span><span class="cx">                                 975CA2A21303679D00E99AD9 /* JSCrypto.h in Headers */,
</span><span class="lines">@@ -25486,6 +25537,7 @@
</span><span class="cx">                                 5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */,
</span><span class="cx">                                 3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
</span><span class="cx">                                 724ED3321A3A8B2300F5F13C /* JSEXTBlendMinMax.h in Headers */,
</span><ins>+                                51F41A791BA73B5B002E053B /* IDBPendingDeleteCall.h in Headers */,
</ins><span class="cx">                                 5C4304B6191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h in Headers */,
</span><span class="cx">                                 7728698414FD9ADA00F484DC /* JSEXTTextureFilterAnisotropic.h in Headers */,
</span><span class="cx">                                 BC00F0150E0A189500FD04E3 /* JSFile.h in Headers */,
</span><span class="lines">@@ -25777,6 +25829,7 @@
</span><span class="cx">                                 B2FA3D8B0AB75A6F000E5AC4 /* JSSVGFEOffsetElement.h in Headers */,
</span><span class="cx">                                 B2FA3D8D0AB75A6F000E5AC4 /* JSSVGFEPointLightElement.h in Headers */,
</span><span class="cx">                                 B2FA3D8F0AB75A6F000E5AC4 /* JSSVGFESpecularLightingElement.h in Headers */,
</span><ins>+                                51F41A6E1BA73B5B002E053B /* IDBDatabaseBackend.h in Headers */,
</ins><span class="cx">                                 B2FA3D910AB75A6F000E5AC4 /* JSSVGFESpotLightElement.h in Headers */,
</span><span class="cx">                                 B2FA3D930AB75A6F000E5AC4 /* JSSVGFETileElement.h in Headers */,
</span><span class="cx">                                 B2FA3D950AB75A6F000E5AC4 /* JSSVGFETurbulenceElement.h in Headers */,
</span><span class="lines">@@ -25820,6 +25873,7 @@
</span><span class="cx">                                 B2FA3DC70AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticAbs.h in Headers */,
</span><span class="cx">                                 B2FA3DC90AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticRel.h in Headers */,
</span><span class="cx">                                 B2FA3DCB0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothAbs.h in Headers */,
</span><ins>+                                51645B611B9FA6C800F789CE /* LegacyFactory.h in Headers */,
</ins><span class="cx">                                 B2FA3DCD0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothRel.h in Headers */,
</span><span class="cx">                                 B2FA3DCF0AB75A6F000E5AC4 /* JSSVGPathSegLinetoAbs.h in Headers */,
</span><span class="cx">                                 B2FA3DD10AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalAbs.h in Headers */,
</span><span class="lines">@@ -25933,6 +25987,7 @@
</span><span class="cx">                                 65DF320609D1CC60000BE325 /* JSWheelEvent.h in Headers */,
</span><span class="cx">                                 E1CAA5C60E8BD23600A73ECA /* JSWorker.h in Headers */,
</span><span class="cx">                                 E18256900EF2B02D00933242 /* JSWorkerGlobalScope.h in Headers */,
</span><ins>+                                51F41A7C1BA73B5B002E053B /* IDBPendingTransactionMonitor.h in Headers */,
</ins><span class="cx">                                 150524F41B712FF600696AA9 /* MediaPlayerPrivateMediaStreamAVFObjC.h in Headers */,
</span><span class="cx">                                 E1C36D350EB0A094007410BC /* JSWorkerGlobalScopeBase.h in Headers */,
</span><span class="cx">                                 E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */,
</span><span class="lines">@@ -26010,6 +26065,7 @@
</span><span class="cx">                                 2D413F611A187A3F0041A521 /* LookupSPI.h in Headers */,
</span><span class="cx">                                 1A0409DC1A4360B5009E47F3 /* MachSendRight.h in Headers */,
</span><span class="cx">                                 CE12524F1A1A78D200864480 /* MachVMSPI.h in Headers */,
</span><ins>+                                51645B6B1B9FA6C800F789CE /* LegacyTransaction.h in Headers */,
</ins><span class="cx">                                 932AD70617EFA2C40038F8FF /* MainFrame.h in Headers */,
</span><span class="cx">                                 1A8F6BC60DB55CDC001DB794 /* ManifestParser.h in Headers */,
</span><span class="cx">                                 93309DF8099E64920056E581 /* markup.h in Headers */,
</span><span class="lines">@@ -26188,6 +26244,7 @@
</span><span class="cx">                                 1A569D0F0D7E2B82007C3983 /* npruntime_impl.h in Headers */,
</span><span class="cx">                                 1A569D100D7E2B82007C3983 /* npruntime_internal.h in Headers */,
</span><span class="cx">                                 1A569D110D7E2B82007C3983 /* npruntime_priv.h in Headers */,
</span><ins>+                                51645B691B9FA6C800F789CE /* LegacyRequest.h in Headers */,
</ins><span class="cx">                                 1A927FD41416A15B003A83C8 /* nptypes.h in Headers */,
</span><span class="cx">                                 CE1252511A1BEBD800864480 /* NSCalendarDateSPI.h in Headers */,
</span><span class="cx">                                 31DF63571AF187DD0078FD91 /* NSColorSPI.h in Headers */,
</span><span class="lines">@@ -26197,6 +26254,7 @@
</span><span class="cx">                                 9321D5901A390704008052BE /* NSImmediateActionGestureRecognizerSPI.h in Headers */,
</span><span class="cx">                                 937F4CCE1A2D4B0100BB39F5 /* NSMenuSPI.h in Headers */,
</span><span class="cx">                                 CE1252471A16C2C200864480 /* NSPointerFunctionsSPI.h in Headers */,
</span><ins>+                                51F41A741BA73B5B002E053B /* IDBTransactionBackend.h in Headers */,
</ins><span class="cx">                                 93F1E1EC1A40FDDC00348D13 /* NSPopoverSPI.h in Headers */,
</span><span class="cx">                                 93500F3213FDE3BE0099EC24 /* NSScrollerImpDetails.h in Headers */,
</span><span class="cx">                                 2DCB837919F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h in Headers */,
</span><span class="lines">@@ -26246,6 +26304,7 @@
</span><span class="cx">                                 2D5C9D0219C7B52E00B3C5C1 /* PageOverlayController.h in Headers */,
</span><span class="cx">                                 FBDB61A116D6037E00BB3394 /* PageRuleCollector.h in Headers */,
</span><span class="cx">                                 F3820895147D35F90010BC06 /* PageRuntimeAgent.h in Headers */,
</span><ins>+                                51F41A6F1BA73B5B002E053B /* IDBDatabaseCallbacks.h in Headers */,
</ins><span class="cx">                                 A5F36D3B18F758720054C024 /* PageScriptDebugServer.h in Headers */,
</span><span class="cx">                                 371E65CC13661EDC00BEEDB0 /* PageSerializer.h in Headers */,
</span><span class="cx">                                 A7197F24175689C4007B9442 /* PageThrottler.h in Headers */,
</span><span class="lines">@@ -26419,6 +26478,7 @@
</span><span class="cx">                                 A871DED30A1530C700B12A68 /* RenderFrame.h in Headers */,
</span><span class="cx">                                 0FD3080F117CF7E700A791F7 /* RenderFrameBase.h in Headers */,
</span><span class="cx">                                 A871DED10A1530C700B12A68 /* RenderFrameSet.h in Headers */,
</span><ins>+                                51645B671B9FA6C800F789CE /* LegacyOpenDBRequest.h in Headers */,
</ins><span class="cx">                                 CDEA7C841276230400B846DD /* RenderFullScreen.h in Headers */,
</span><span class="cx">                                 0F3F0E5A157030C3006DA57F /* RenderGeometryMap.h in Headers */,
</span><span class="cx">                                 BC128A73137C867C00CAC845 /* RenderGrid.h in Headers */,
</span><span class="lines">@@ -26613,6 +26673,7 @@
</span><span class="cx">                                 078E092C17D14D1C00420AA1 /* RTCStatsResponse.h in Headers */,
</span><span class="cx">                                 078E094617D16E1C00420AA1 /* RTCStatsResponseBase.h in Headers */,
</span><span class="cx">                                 078E094717D16E1C00420AA1 /* RTCVoidRequest.h in Headers */,
</span><ins>+                                51F41A711BA73B5B002E053B /* IDBDatabaseCallbacksImpl.h in Headers */,
</ins><span class="cx">                                 078E092D17D14D1C00420AA1 /* RTCVoidRequestImpl.h in Headers */,
</span><span class="cx">                                 5824ABA31AE81116009074B7 /* RubyElement.h in Headers */,
</span><span class="cx">                                 5824ABA71AE81384009074B7 /* RubyTextElement.h in Headers */,
</span><span class="lines">@@ -26783,6 +26844,7 @@
</span><span class="cx">                                 1A22464C0CC98DDB00C05240 /* SQLiteStatement.h in Headers */,
</span><span class="cx">                                 1A22464E0CC98DDB00C05240 /* SQLiteTransaction.h in Headers */,
</span><span class="cx">                                 97BC6A421505F081001B74AC /* SQLResultSet.h in Headers */,
</span><ins>+                                51F41A721BA73B5B002E053B /* IDBFactoryBackendInterface.h in Headers */,
</ins><span class="cx">                                 97BC6A451505F081001B74AC /* SQLResultSetRowList.h in Headers */,
</span><span class="cx">                                 FE8A674816CDD19E00930BF8 /* SQLStatement.h in Headers */,
</span><span class="cx">                                 97BC6A491505F081001B74AC /* SQLStatementCallback.h in Headers */,
</span><span class="lines">@@ -27247,6 +27309,7 @@
</span><span class="cx">                                 868160D618766A130021E79D /* UserActivity.h in Headers */,
</span><span class="cx">                                 26255F0318878E110006E1FD /* UserAgent.h in Headers */,
</span><span class="cx">                                 CDAB6D3117C9259500C60B34 /* UserAgentScripts.h in Headers */,
</span><ins>+                                51645B651B9FA6C800F789CE /* LegacyObjectStore.h in Headers */,
</ins><span class="cx">                                 656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */,
</span><span class="cx">                                 1AE79D43188DB61F002239C2 /* UserContentController.h in Headers */,
</span><span class="cx">                                 003F1FEA11E6AB43008258D9 /* UserContentTypes.h in Headers */,
</span><span class="lines">@@ -27254,6 +27317,7 @@
</span><span class="cx">                                 2542F4DB1166C25A00E89A86 /* UserGestureIndicator.h in Headers */,
</span><span class="cx">                                 9920398318B95BC600B39AF9 /* UserInputBridge.h in Headers */,
</span><span class="cx">                                 078E092E17D14D1C00420AA1 /* UserMediaClient.h in Headers */,
</span><ins>+                                51F41A681BA73B5B002E053B /* IDBCallbacks.h in Headers */,
</ins><span class="cx">                                 078E092F17D14D1C00420AA1 /* UserMediaController.h in Headers */,
</span><span class="cx">                                 078E093017D14D1C00420AA1 /* UserMediaRequest.h in Headers */,
</span><span class="cx">                                 7C3B79721908757B00B47A2D /* UserMessageHandler.h in Headers */,
</span><span class="lines">@@ -27337,6 +27401,7 @@
</span><span class="cx">                                 A14832CC187F67C400DA63A6 /* WebCoreThreadRun.h in Headers */,
</span><span class="cx">                                 A14832CD187F682E00DA63A6 /* WebCoreThreadSafe.h in Headers */,
</span><span class="cx">                                 A14832CF187F684700DA63A6 /* WebCoreThreadSystemInterface.h in Headers */,
</span><ins>+                                51F41A7A1BA73B5B002E053B /* IDBPendingOpenCall.h in Headers */,
</ins><span class="cx">                                 0F099D0917B968A100FF84B9 /* WebCoreTypedArrayController.h in Headers */,
</span><span class="cx">                                 37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */,
</span><span class="cx">                                 44A20DB90F84166C00B3E1FE /* WebCoreURLResponseIOS.h in Headers */,
</span><span class="lines">@@ -28036,6 +28101,7 @@
</span><span class="cx">                                 41D015CB0F4B5C71004A662F /* ContentType.cpp in Sources */,
</span><span class="cx">                                 97627B8D14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp in Sources */,
</span><span class="cx">                                 5106D7BD18BDB76F000AB166 /* ContextMenuContext.cpp in Sources */,
</span><ins>+                                51F41A6D1BA73B5B002E053B /* IDBDatabaseBackend.cpp in Sources */,
</ins><span class="cx">                                 065AD4F60B0C2EDA005A2B1D /* ContextMenuController.cpp in Sources */,
</span><span class="cx">                                 06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */,
</span><span class="cx">                                 93B6A0EA0B0BCA8400F5027A /* ContextMenuMac.mm in Sources */,
</span><span class="lines">@@ -28060,6 +28126,7 @@
</span><span class="cx">                                 E1C415DE0F655D7C0092D2FB /* CrossOriginPreflightResultCache.cpp in Sources */,
</span><span class="cx">                                 2E4346580F546A9900B0F1BA /* CrossThreadCopier.cpp in Sources */,
</span><span class="cx">                                 E16980491133644700894115 /* CRuntimeObject.cpp in Sources */,
</span><ins>+                                51645B601B9FA6C800F789CE /* LegacyFactory.cpp in Sources */,
</ins><span class="cx">                                 975CA28A130365F800E99AD9 /* Crypto.cpp in Sources */,
</span><span class="cx">                                 E172AF6D180F24C600FBADB9 /* CryptoAlgorithm.cpp in Sources */,
</span><span class="cx">                                 E125F8411824253A00D84CD9 /* CryptoAlgorithmAES_CBC.cpp in Sources */,
</span><span class="lines">@@ -28134,6 +28201,7 @@
</span><span class="cx">                                 A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */,
</span><span class="cx">                                 BC772B3D0C4EA91E0083285F /* CSSParser.cpp in Sources */,
</span><span class="cx">                                 BC02A5400E099C5A004B6D2B /* CSSParserValues.cpp in Sources */,
</span><ins>+                                5103C2B41BA232AE00E26337 /* IDBCursorWithValue.cpp in Sources */,
</ins><span class="cx">                                 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */,
</span><span class="cx">                                 A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
</span><span class="cx">                                 A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
</span><span class="lines">@@ -28373,6 +28441,7 @@
</span><span class="cx">                                 52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */,
</span><span class="cx">                                 8518DD790A9CF31B0091B7A6 /* DOMNamedNodeMap.mm in Sources */,
</span><span class="cx">                                 853BF4DC0ABB6B55008647BB /* DOMNode.mm in Sources */,
</span><ins>+                                51645B661B9FA6C800F789CE /* LegacyOpenDBRequest.cpp in Sources */,
</ins><span class="cx">                                 85526C380AB0A17E000302EA /* DOMNodeIterator.mm in Sources */,
</span><span class="cx">                                 85ACAA8E0A9B759C00671E90 /* DOMNodeList.mm in Sources */,
</span><span class="cx">                                 856C8AE50A912649005C687B /* DOMObject.mm in Sources */,
</span><span class="lines">@@ -28452,6 +28521,7 @@
</span><span class="cx">                                 A8C4A80809D563270003AC8D /* Element.cpp in Sources */,
</span><span class="cx">                                 B5B7A17017C10AA800E4AA0A /* ElementData.cpp in Sources */,
</span><span class="cx">                                 4FFC022D1643B726004E1638 /* ElementRareData.cpp in Sources */,
</span><ins>+                                51F41A691BA73B5B002E053B /* IDBCursorBackend.cpp in Sources */,
</ins><span class="cx">                                 FBDB619B16D6032A00BB3394 /* ElementRuleCollector.cpp in Sources */,
</span><span class="cx">                                 A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
</span><span class="cx">                                 F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
</span><span class="lines">@@ -28549,6 +28619,7 @@
</span><span class="cx">                                 51E3AA0A1B98BCAB0036AD81 /* SecurityOriginData.cpp in Sources */,
</span><span class="cx">                                 B6D9D23614EABD260090D75E /* FocusEvent.cpp in Sources */,
</span><span class="cx">                                 B2C3DA640D006CD600EF6F26 /* Font.cpp in Sources */,
</span><ins>+                                51645B6C1B9FA6C800F789CE /* LegacyVersionChangeEvent.cpp in Sources */,
</ins><span class="cx">                                 B2C3DA620D006CD600EF6F26 /* FontCache.cpp in Sources */,
</span><span class="cx">                                 3727DFD5142AAE4500D449CB /* FontCacheIOS.mm in Sources */,
</span><span class="cx">                                 B2AFFC7C0D00A5C10030074D /* FontCacheMac.mm in Sources */,
</span><span class="lines">@@ -28660,6 +28731,7 @@
</span><span class="cx">                                 93309DE7099E64920056E581 /* htmlediting.cpp in Sources */,
</span><span class="cx">                                 93F19A9208245E59001E9ABC /* HTMLElement.cpp in Sources */,
</span><span class="cx">                                 A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */,
</span><ins>+                                5103C2B51BA232D400E26337 /* IDBDatabase.cpp in Sources */,
</ins><span class="cx">                                 977B37231228721700B81FF8 /* HTMLElementStack.cpp in Sources */,
</span><span class="cx">                                 A871D45F0A127CBC00B12A68 /* HTMLEmbedElement.cpp in Sources */,
</span><span class="cx">                                 977B3869122883E900B81FF8 /* HTMLEntityParser.cpp in Sources */,
</span><span class="lines">@@ -28751,6 +28823,7 @@
</span><span class="cx">                                 E44613AA0CD6331000FADA75 /* HTMLVideoElement.cpp in Sources */,
</span><span class="cx">                                 839AAFEC1A0C0C8D00605F99 /* HTMLWBRElement.cpp in Sources */,
</span><span class="cx">                                 0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */,
</span><ins>+                                51645B5A1B9FA6C800F789CE /* LegacyCursor.cpp in Sources */,
</ins><span class="cx">                                 1AC900C31943C0FC008625B5 /* HTTPHeaderNames.cpp in Sources */,
</span><span class="cx">                                 514C76720CE923A1007EF3CD /* HTTPParsers.cpp in Sources */,
</span><span class="cx">                                 371A67CB11C6C7DB00047B8B /* HyphenationCF.cpp in Sources */,
</span><span class="lines">@@ -28764,32 +28837,14 @@
</span><span class="cx">                                 51E1ECC00C91C90400DC255B /* IconRecord.cpp in Sources */,
</span><span class="cx">                                 51D719B9181106E00016DC51 /* IDBAny.cpp in Sources */,
</span><span class="cx">                                 C585A66211D4FAC5004C3E4B /* IDBBindingUtilities.cpp in Sources */,
</span><del>-                                51D719BF181106E00016DC51 /* IDBCursor.cpp in Sources */,
-                                516730A3182D8FBB003FAF5C /* IDBCursorBackend.cpp in Sources */,
-                                510194441836F7E400925523 /* IDBCursorBackendOperations.cpp in Sources */,
-                                51D719C3181106E00016DC51 /* IDBCursorWithValue.cpp in Sources */,
-                                51D719C6181106E00016DC51 /* IDBDatabase.cpp in Sources */,
-                                51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */,
-                                51D719CB181106E00016DC51 /* IDBDatabaseCallbacksImpl.cpp in Sources */,
</del><span class="cx">                                 51D719CE181106E00016DC51 /* IDBDatabaseException.cpp in Sources */,
</span><span class="cx">                                 5163117D1851242B00534647 /* IDBDatabaseMetadata.cpp in Sources */,
</span><span class="cx">                                 51D719D0181106E00016DC51 /* IDBEventDispatcher.cpp in Sources */,
</span><del>-                                51D719D2181106E00016DC51 /* IDBFactory.cpp in Sources */,
-                                51D719D8181106E00016DC51 /* IDBIndex.cpp in Sources */,
</del><span class="cx">                                 51D719DB181106E00016DC51 /* IDBKey.cpp in Sources */,
</span><span class="cx">                                 511EC1A8188DAE7B00BA3EB6 /* IDBKeyData.cpp in Sources */,
</span><span class="cx">                                 51D719DD181106E00016DC51 /* IDBKeyPath.cpp in Sources */,
</span><span class="cx">                                 51D719DF181106E00016DC51 /* IDBKeyRange.cpp in Sources */,
</span><span class="cx">                                 5123AF181890A4CA0031CDC9 /* IDBKeyRangeData.cpp in Sources */,
</span><del>-                                51D719E3181106E00016DC51 /* IDBObjectStore.cpp in Sources */,
-                                51D719E6181106E00016DC51 /* IDBOpenDBRequest.cpp in Sources */,
-                                51D719E9181106E00016DC51 /* IDBPendingTransactionMonitor.cpp in Sources */,
-                                51D719EB181106E00016DC51 /* IDBRequest.cpp in Sources */,
-                                51D719EE181106E00016DC51 /* IDBTransaction.cpp in Sources */,
-                                510B7DB7182D9F5D009BF957 /* IDBTransactionBackend.cpp in Sources */,
-                                51059DDD1820B17600DFF9B1 /* IDBTransactionBackendOperations.cpp in Sources */,
-                                51EAC5671815ED3E004F1BA4 /* IDBTransactionCoordinator.cpp in Sources */,
-                                51D719F5181106E00016DC51 /* IDBVersionChangeEvent.cpp in Sources */,
</del><span class="cx">                                 1A71D57B0F33819000F9CE4E /* IdentifierRep.cpp in Sources */,
</span><span class="cx">                                 C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */,
</span><span class="cx">                                 C3CF17A615B0063F00276D39 /* IdTargetObserverRegistry.cpp in Sources */,
</span><span class="lines">@@ -28842,6 +28897,7 @@
</span><span class="cx">                                 1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
</span><span class="cx">                                 82AB1743124B99EC00C5069D /* InspectorCSSAgent.cpp in Sources */,
</span><span class="cx">                                 4A9CC82016BF9BB400EC645A /* InspectorCSSOMWrappers.cpp in Sources */,
</span><ins>+                                51F41A771BA73B5B002E053B /* IDBTransactionCoordinator.cpp in Sources */,
</ins><span class="cx">                                 7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */,
</span><span class="cx">                                 41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */,
</span><span class="cx">                                 7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */,
</span><span class="lines">@@ -29351,6 +29407,7 @@
</span><span class="cx">                                 B2FA3D520AB75A6F000E5AC4 /* JSSVGAnimateElement.cpp in Sources */,
</span><span class="cx">                                 4496E39D1398136C003EE32A /* JSSVGAnimateMotionElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3D540AB75A6F000E5AC4 /* JSSVGAnimateTransformElement.cpp in Sources */,
</span><ins>+                                5103C2B31BA2324D00E26337 /* IDBCursor.cpp in Sources */,
</ins><span class="cx">                                 B2FA3D560AB75A6F000E5AC4 /* JSSVGAnimationElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3D580AB75A6F000E5AC4 /* JSSVGCircleElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3D5A0AB75A6F000E5AC4 /* JSSVGClipPathElement.cpp in Sources */,
</span><span class="lines">@@ -29448,6 +29505,7 @@
</span><span class="cx">                                 B2FA3DE20AB75A6F000E5AC4 /* JSSVGPointList.cpp in Sources */,
</span><span class="cx">                                 B2FA3DE50AB75A6F000E5AC4 /* JSSVGPolygonElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3DE70AB75A6F000E5AC4 /* JSSVGPolylineElement.cpp in Sources */,
</span><ins>+                                51F41A701BA73B5B002E053B /* IDBDatabaseCallbacksImpl.cpp in Sources */,
</ins><span class="cx">                                 B2FA3DE90AB75A6F000E5AC4 /* JSSVGPreserveAspectRatio.cpp in Sources */,
</span><span class="cx">                                 B2FA3DEB0AB75A6F000E5AC4 /* JSSVGRadialGradientElement.cpp in Sources */,
</span><span class="cx">                                 8542A7940AE5C94000DF58DF /* JSSVGRect.cpp in Sources */,
</span><span class="lines">@@ -29466,6 +29524,7 @@
</span><span class="cx">                                 B22362280C3AF04A0008CA9B /* JSSVGTextPathElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3E060AB75A6F000E5AC4 /* JSSVGTextPositioningElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3E080AB75A6F000E5AC4 /* JSSVGTitleElement.cpp in Sources */,
</span><ins>+                                5103C2B21BA2317400E26337 /* IDBTransaction.cpp in Sources */,
</ins><span class="cx">                                 B2FA3E0A0AB75A6F000E5AC4 /* JSSVGTransform.cpp in Sources */,
</span><span class="cx">                                 B2FA3E0C0AB75A6F000E5AC4 /* JSSVGTransformList.cpp in Sources */,
</span><span class="cx">                                 B2FA3E0E0AB75A6F000E5AC4 /* JSSVGTRefElement.cpp in Sources */,
</span><span class="lines">@@ -29568,6 +29627,7 @@
</span><span class="cx">                                 463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */,
</span><span class="cx">                                 E1271A590EEECDE400F61213 /* JSWorkerNavigator.cpp in Sources */,
</span><span class="cx">                                 BC348BD30DB7F804004ABAB9 /* JSXMLHttpRequest.cpp in Sources */,
</span><ins>+                                5157D4661BA24AFD0085CA2F /* IDBObjectStore.cpp in Sources */,
</ins><span class="cx">                                 BC348BBE0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp in Sources */,
</span><span class="cx">                                 BC60DA390D2A302800B9918F /* JSXMLHttpRequestException.cpp in Sources */,
</span><span class="cx">                                 F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */,
</span><span class="lines">@@ -29620,6 +29680,7 @@
</span><span class="cx">                                 656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */,
</span><span class="cx">                                 7EE6846812D26E3800E79415 /* LoaderRunLoopCF.cpp in Sources */,
</span><span class="cx">                                 51ABF64D16392E2800132A7A /* LoaderStrategy.cpp in Sources */,
</span><ins>+                                5103C2B81BA235C500E26337 /* IDBVersionChangeEvent.cpp in Sources */,
</ins><span class="cx">                                 06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */,
</span><span class="cx">                                 F5973DE115CFB2030027F804 /* LocaleMac.mm in Sources */,
</span><span class="cx">                                 7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */,
</span><span class="lines">@@ -29785,6 +29846,7 @@
</span><span class="cx">                                 1A569D1A0D7E2B82007C3983 /* objc_utility.mm in Sources */,
</span><span class="cx">                                 1CF6BDFB0E9BB26A0025E1CD /* ObjCEventListener.mm in Sources */,
</span><span class="cx">                                 1CF6BE140E9BB4670025E1CD /* ObjCNodeFilterCondition.mm in Sources */,
</span><ins>+                                51645B5C1B9FA6C800F789CE /* LegacyCursorWithValue.cpp in Sources */,
</ins><span class="cx">                                 E16982601134636A00894115 /* ObjCRuntimeObject.mm in Sources */,
</span><span class="cx">                                 7E5D7A76161D3F8F00896C34 /* OESElementIndexUint.cpp in Sources */,
</span><span class="cx">                                 9001774012E0347800648462 /* OESStandardDerivatives.cpp in Sources */,
</span><span class="lines">@@ -29814,10 +29876,12 @@
</span><span class="cx">                                 9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */,
</span><span class="cx">                                 7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */,
</span><span class="cx">                                 1C26497C0D7E24EC00BD10F2 /* PageMac.cpp in Sources */,
</span><ins>+                                5103C2B61BA233BF00E26337 /* IDBRequest.cpp in Sources */,
</ins><span class="cx">                                 2D5C9CFF19C7B52E00B3C5C1 /* PageOverlay.cpp in Sources */,
</span><span class="cx">                                 2D5C9D0119C7B52E00B3C5C1 /* PageOverlayController.cpp in Sources */,
</span><span class="cx">                                 FBDB619D16D6034600BB3394 /* PageRuleCollector.cpp in Sources */,
</span><span class="cx">                                 F3820894147D35F90010BC06 /* PageRuntimeAgent.cpp in Sources */,
</span><ins>+                                51645B621B9FA6C800F789CE /* LegacyIndex.cpp in Sources */,
</ins><span class="cx">                                 A5F36D3A18F758720054C024 /* PageScriptDebugServer.cpp in Sources */,
</span><span class="cx">                                 371E65CE13661EED00BEEDB0 /* PageSerializer.cpp in Sources */,
</span><span class="cx">                                 A7197F2617568AE5007B9442 /* PageThrottler.cpp in Sources */,
</span><span class="lines">@@ -29861,6 +29925,7 @@
</span><span class="cx">                                 41BF700F0FE86F61005E8DEC /* PlatformMessagePortChannel.cpp in Sources */,
</span><span class="cx">                                 C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */,
</span><span class="cx">                                 C598902E14E9B0F800E8D18B /* PlatformPasteboardMac.mm in Sources */,
</span><ins>+                                51F41A731BA73B5B002E053B /* IDBTransactionBackend.cpp in Sources */,
</ins><span class="cx">                                 E45390430EAFD637003695C8 /* PlatformScreenIOS.mm in Sources */,
</span><span class="cx">                                 BC94D1080C274F88006BC617 /* PlatformScreenMac.mm in Sources */,
</span><span class="cx">                                 2934940B16C02C0A00901318 /* PlatformSpeechSynthesisUtterance.cpp in Sources */,
</span><span class="lines">@@ -30007,6 +30072,7 @@
</span><span class="cx">                                 BC3BE9930E9C1C7C00835588 /* RenderScrollbar.cpp in Sources */,
</span><span class="cx">                                 BC3BE9AB0E9C242000835588 /* RenderScrollbarPart.cpp in Sources */,
</span><span class="cx">                                 BC3BE9A50E9C239600835588 /* RenderScrollbarTheme.cpp in Sources */,
</span><ins>+                                51F41A751BA73B5B002E053B /* IDBTransactionBackendOperations.cpp in Sources */,
</ins><span class="cx">                                 458FE4091589DF0B005609E6 /* RenderSearchField.cpp in Sources */,
</span><span class="cx">                                 58DEED8619873FF000888FF3 /* RenderSelectionInfo.cpp in Sources */,
</span><span class="cx">                                 AB247A6C0AFD6383003FA5FD /* RenderSlider.cpp in Sources */,
</span><span class="lines">@@ -30036,6 +30102,7 @@
</span><span class="cx">                                 BCEA4867097D93020094C9E4 /* RenderView.cpp in Sources */,
</span><span class="cx">                                 BE20507D18A458BF0080647E /* RenderVTTCue.cpp in Sources */,
</span><span class="cx">                                 A871DFE50A15376B00B12A68 /* RenderWidget.cpp in Sources */,
</span><ins>+                                51F41A7B1BA73B5B002E053B /* IDBPendingTransactionMonitor.cpp in Sources */,
</ins><span class="cx">                                 F5528DA61AC1033E000EF7AD /* ReplaceDeleteFromTextNodeCommand.cpp in Sources */,
</span><span class="cx">                                 F5528DA91AC109DF000EF7AD /* ReplaceInsertIntoTextNodeCommand.cpp in Sources */,
</span><span class="cx">                                 A89CCC520F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp in Sources */,
</span><span class="lines">@@ -30046,6 +30113,7 @@
</span><span class="cx">                                 99CC0B5818BE984A006CEBCC /* ReplayInputDispatchMethods.cpp in Sources */,
</span><span class="cx">                                 99CC0B5918BE984A006CEBCC /* ReplaySession.cpp in Sources */,
</span><span class="cx">                                 99CC0B5B18BE984A006CEBCC /* ReplaySessionSegment.cpp in Sources */,
</span><ins>+                                51645B5E1B9FA6C800F789CE /* LegacyDatabase.cpp in Sources */,
</ins><span class="cx">                                 F55B3DCF1251F12D003EF269 /* ResetInputType.cpp in Sources */,
</span><span class="cx">                                 934F713E0D5A6F2800018D69 /* ResourceErrorBase.cpp in Sources */,
</span><span class="cx">                                 7EE6846B12D26E3800E79415 /* ResourceErrorCF.cpp in Sources */,
</span><span class="lines">@@ -30196,6 +30264,7 @@
</span><span class="cx">                                 E18DF33818AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm in Sources */,
</span><span class="cx">                                 077AF14418F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm in Sources */,
</span><span class="cx">                                 A75E497710752ACB00C9B896 /* SerializedScriptValue.cpp in Sources */,
</span><ins>+                                51645B6A1B9FA6C800F789CE /* LegacyTransaction.cpp in Sources */,
</ins><span class="cx">                                 2D93AEE419DF5641002A86C3 /* ServicesOverlayController.mm in Sources */,
</span><span class="cx">                                 93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
</span><span class="cx">                                 B8DBDB4B130B0F8A00F5CDB1 /* SetSelectionCommand.cpp in Sources */,
</span><span class="lines">@@ -30235,6 +30304,7 @@
</span><span class="cx">                                 CD3A496117A9D01B00274E42 /* SourceBuffer.cpp in Sources */,
</span><span class="cx">                                 CD3A496417A9D01B00274E42 /* SourceBufferList.cpp in Sources */,
</span><span class="cx">                                 CDC8B5AA18047FF10016E685 /* SourceBufferPrivateAVFObjC.mm in Sources */,
</span><ins>+                                5157D4641BA24AEE0085CA2F /* IDBFactory.cpp in Sources */,
</ins><span class="cx">                                 84A81F410FC7E02700955300 /* SourceGraphic.cpp in Sources */,
</span><span class="cx">                                 076306D717E149CF005A7C4E /* SourceInfo.cpp in Sources */,
</span><span class="cx">                                 536D5A25193F40FC00CE4CAB /* SourceSizeList.cpp in Sources */,
</span><span class="lines">@@ -30246,6 +30316,7 @@
</span><span class="cx">                                 AA2A5ACD16A485FA00975A25 /* SpeechSynthesisVoice.cpp in Sources */,
</span><span class="cx">                                 A78FE13B12366B1000ACE8D0 /* SpellChecker.cpp in Sources */,
</span><span class="cx">                                 B8DBDB4D130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp in Sources */,
</span><ins>+                                5103C2B11BA22D1A00E26337 /* LegacyAny.cpp in Sources */,
</ins><span class="cx">                                 4512502215DCE37D002F84E2 /* SpinButtonElement.cpp in Sources */,
</span><span class="cx">                                 93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
</span><span class="cx">                                 93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
</span><span class="lines">@@ -30282,6 +30353,7 @@
</span><span class="cx">                                 BC5EB67D0E81D42000B25965 /* StyleBoxData.cpp in Sources */,
</span><span class="cx">                                 8386A97019F61E4F00E1EC4A /* StyleBuilder.cpp in Sources */,
</span><span class="cx">                                 BCEF447A0E6747D0001C1287 /* StyleCachedImage.cpp in Sources */,
</span><ins>+                                5103C2B71BA233C400E26337 /* IDBOpenDBRequest.cpp in Sources */,
</ins><span class="cx">                                 9393E604151A9A1800066F06 /* StyleCachedImageSet.cpp in Sources */,
</span><span class="cx">                                 A8C4A7FE09D563270003AC8D /* StyledElement.cpp in Sources */,
</span><span class="cx">                                 BC5EB8B80E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.cpp in Sources */,
</span><span class="lines">@@ -30484,12 +30556,14 @@
</span><span class="cx">                                 150524F71B712FFF00696AA9 /* MediaStreamPrivateAVFObjC.mm in Sources */,
</span><span class="cx">                                 B2227AD00D00BF220071B782 /* SVGTextPositioningElement.cpp in Sources */,
</span><span class="cx">                                 B2227AD30D00BF220071B782 /* SVGTitleElement.cpp in Sources */,
</span><ins>+                                5157D4651BA24AF80085CA2F /* IDBIndex.cpp in Sources */,
</ins><span class="cx">                                 1CCDF5BD1990332400BCEBAD /* SVGToOTFFontConversion.cpp in Sources */,
</span><span class="cx">                                 B2227AD60D00BF220071B782 /* SVGTransform.cpp in Sources */,
</span><span class="cx">                                 B2227AD90D00BF220071B782 /* SVGTransformable.cpp in Sources */,
</span><span class="cx">                                 B2227ADC0D00BF220071B782 /* SVGTransformDistance.cpp in Sources */,
</span><span class="cx">                                 B2227ADE0D00BF220071B782 /* SVGTransformList.cpp in Sources */,
</span><span class="cx">                                 DEC297611B4F2F8D005F5945 /* JSCustomEventCustom.cpp in Sources */,
</span><ins>+                                51645B641B9FA6C800F789CE /* LegacyObjectStore.cpp in Sources */,
</ins><span class="cx">                                 B2227AE10D00BF220071B782 /* SVGTRefElement.cpp in Sources */,
</span><span class="cx">                                 B2227AE40D00BF220071B782 /* SVGTSpanElement.cpp in Sources */,
</span><span class="cx">                                 B2227AE90D00BF220071B782 /* SVGURIReference.cpp in Sources */,
</span><span class="lines">@@ -30574,6 +30648,7 @@
</span><span class="cx">                                 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */,
</span><span class="cx">                                 93309EA4099EB78C0056E581 /* Timer.cpp in Sources */,
</span><span class="cx">                                 E44613AF0CD6331000FADA75 /* TimeRanges.cpp in Sources */,
</span><ins>+                                51645B681B9FA6C800F789CE /* LegacyRequest.cpp in Sources */,
</ins><span class="cx">                                 A1DE71321861322200734192 /* TouchConstructors.cpp in Sources */,
</span><span class="cx">                                 A1DE712D18612AC100734192 /* TouchEvents.cpp in Sources */,
</span><span class="cx">                                 070334D9145A006F008D8D45 /* TrackBase.cpp in Sources */,
</span><span class="lines">@@ -30733,6 +30808,7 @@
</span><span class="cx">                                 D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */,
</span><span class="cx">                                 7C48A6D0191C9D6500026674 /* WebKitNamespace.cpp in Sources */,
</span><span class="cx">                                 A5DEBDA316FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp in Sources */,
</span><ins>+                                51F41A6B1BA73B5B002E053B /* IDBCursorBackendOperations.cpp in Sources */,
</ins><span class="cx">                                 31C0FF240E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp in Sources */,
</span><span class="cx">                                 0FCF332E0F2B9A25004B6795 /* WebLayer.mm in Sources */,
</span><span class="cx">                                 0709D78E1AE55554004E42F8 /* WebMediaSessionManager.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebKit2/CMakeLists.txt        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -70,6 +70,8 @@
</span><span class="cx">     &quot;${WEBKIT2_DIR}/WebProcess/WebPage&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/battery&quot;
</span><ins>+    &quot;${WEBCORE_DIR}/Modules/indexeddb&quot;
+    &quot;${WEBCORE_DIR}/Modules/indexeddb/legacy&quot;
</ins><span class="cx">     &quot;${WEBCORE_DIR}/Modules/mediastream&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/networkinfo&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/Modules/notifications&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (189745 => 189746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-09-14 20:36:04 UTC (rev 189745)
+++ trunk/Source/WebKit2/ChangeLog        2015-09-14 21:01:41 UTC (rev 189746)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-09-14  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Rename current concrete IDB implementation to &quot;Legacy&quot;.
+        https://bugs.webkit.org/show_bug.cgi?id=149118
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt:
+
</ins><span class="cx"> 2015-09-14  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
</span></span></pre>
</div>
</div>

</body>
</html>