<!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>[194169] trunk/Source/WebCore</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/194169">194169</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-16 12:29:09 -0800 (Wed, 16 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
https://bugs.webkit.org/show_bug.cgi?id=152351
Reviewed by NOBODY (OOPS!).
No new tests (Refactor, existing tests pass).
* Modules/indexeddb/IndexedDB.h:
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::requestType):
* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::isOpenRequest):
(WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
* Modules/indexeddb/server/IDBServerOperation.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::isOpenRequest):
(WebCore::IDBRequestData::isDeleteRequest):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIndexedDBh">trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerOperationcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerOperationh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/ChangeLog        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2015-12-16 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
+ https://bugs.webkit.org/show_bug.cgi?id=152351
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Refactor, existing tests pass).
+
+ * Modules/indexeddb/IndexedDB.h:
+
+ * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
+ (WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
+ (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
+ * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
+
+ * Modules/indexeddb/client/IDBRequestImpl.h:
+ (WebCore::IDBClient::IDBRequest::requestType):
+
+ * Modules/indexeddb/server/IDBServerOperation.cpp:
+ (WebCore::IDBServer::IDBServerOperation::isOpenRequest):
+ (WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
+ * Modules/indexeddb/server/IDBServerOperation.h:
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
+ (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
+ (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
+ (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
+ (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+ * Modules/indexeddb/shared/IDBRequestData.cpp:
+ (WebCore::IDBRequestData::IDBRequestData):
+ * Modules/indexeddb/shared/IDBRequestData.h:
+ (WebCore::IDBRequestData::isOpenRequest):
+ (WebCore::IDBRequestData::isDeleteRequest):
+
</ins><span class="cx"> 2015-12-16 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Build fix after r194156.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIndexedDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -99,6 +99,12 @@
</span><span class="cx"> Min,
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+enum class RequestType {
+ Open,
+ Delete,
+ Other,
+};
+
</ins><span class="cx"> } // namespace IndexedDB
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -41,20 +41,21 @@
</span><span class="cx"> Ref<IDBOpenDBRequest> IDBOpenDBRequest::createDeleteRequest(IDBConnectionToServer& connection, ScriptExecutionContext* context, const IDBDatabaseIdentifier& databaseIdentifier)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(databaseIdentifier.isValid());
</span><del>- return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, 0));
</del><ins>+ return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, 0, IndexedDB::RequestType::Delete));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Ref<IDBOpenDBRequest> IDBOpenDBRequest::createOpenRequest(IDBConnectionToServer& connection, ScriptExecutionContext* context, const IDBDatabaseIdentifier& databaseIdentifier, uint64_t version)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(databaseIdentifier.isValid());
</span><del>- return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, version));
</del><ins>+ return adoptRef(*new IDBOpenDBRequest(connection, context, databaseIdentifier, version, IndexedDB::RequestType::Open));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-IDBOpenDBRequest::IDBOpenDBRequest(IDBConnectionToServer& connection, ScriptExecutionContext* context, const IDBDatabaseIdentifier& databaseIdentifier, uint64_t version)
</del><ins>+IDBOpenDBRequest::IDBOpenDBRequest(IDBConnectionToServer& connection, ScriptExecutionContext* context, const IDBDatabaseIdentifier& databaseIdentifier, uint64_t version, IndexedDB::RequestType requestType)
</ins><span class="cx"> : IDBRequest(connection, context)
</span><span class="cx"> , m_databaseIdentifier(databaseIdentifier)
</span><span class="cx"> , m_version(version)
</span><span class="cx"> {
</span><ins>+ m_requestType = requestType;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBOpenDBRequest::~IDBOpenDBRequest()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBOpenDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> void fireErrorAfterVersionChangeCompletion();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- IDBOpenDBRequest(IDBConnectionToServer&, ScriptExecutionContext*, const IDBDatabaseIdentifier&, uint64_t version);
</del><ins>+ IDBOpenDBRequest(IDBConnectionToServer&, ScriptExecutionContext*, const IDBDatabaseIdentifier&, uint64_t version, IndexedDB::RequestType);
</ins><span class="cx">
</span><span class="cx"> void onError(const IDBResultData&);
</span><span class="cx"> void onSuccess(const IDBResultData&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBRequestImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -100,6 +100,8 @@
</span><span class="cx"> void setSource(IDBCursor&);
</span><span class="cx"> void setVersionChangeTransaction(IDBTransaction&);
</span><span class="cx">
</span><ins>+ IndexedDB::RequestType requestType() const { return m_requestType; }
+
</ins><span class="cx"> protected:
</span><span class="cx"> IDBRequest(IDBConnectionToServer&, ScriptExecutionContext*);
</span><span class="cx"> IDBRequest(ScriptExecutionContext&, IDBObjectStore&, IDBTransaction&);
</span><span class="lines">@@ -126,6 +128,7 @@
</span><span class="cx"> bool m_shouldExposeTransactionToDOM { true };
</span><span class="cx"> RefPtr<DOMError> m_domError;
</span><span class="cx"> IDBError m_idbError;
</span><ins>+ IndexedDB::RequestType m_requestType = { IndexedDB::RequestType::Other };
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void onError();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerOperationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -44,6 +44,16 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool IDBServerOperation::isOpenRequest() const
+{
+ return m_requestData.isOpenRequest();
+}
+
+bool IDBServerOperation::isDeleteRequest() const
+{
+ return m_requestData.isDeleteRequest();
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -43,6 +43,9 @@
</span><span class="cx"> IDBConnectionToClient& connection() { return m_connection; }
</span><span class="cx"> const IDBRequestData& requestData() const { return m_requestData; }
</span><span class="cx">
</span><ins>+ bool isOpenRequest() const;
+ bool isDeleteRequest() const;
+
</ins><span class="cx"> private:
</span><span class="cx"> IDBServerOperation(IDBConnectionToClient&, const IDBRequestData&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -109,6 +109,7 @@
</span><span class="cx">
</span><span class="cx"> for (auto& operation : m_pendingDeleteDatabaseOperations) {
</span><span class="cx"> ASSERT(m_databaseInfo);
</span><ins>+ ASSERT(operation->isDeleteRequest());
</ins><span class="cx"> operation->connection().didDeleteDatabase(IDBResultData::deleteDatabaseSuccess(operation->requestData().requestIdentifier(), *m_databaseInfo));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -158,10 +159,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(!m_versionChangeOperation);
</del><ins>+ ASSERT(!m_currentOperation);
</ins><span class="cx"> ASSERT(!m_versionChangeDatabaseConnection);
</span><span class="cx">
</span><del>- m_versionChangeOperation = adoptRef(operation.leakRef());
</del><ins>+ m_currentOperation = WTF::move(operation);
</ins><span class="cx"> m_versionChangeDatabaseConnection = rawConnection;
</span><span class="cx">
</span><span class="cx"> // 3.3.7 "versionchange" transaction steps
</span><span class="lines">@@ -175,7 +176,7 @@
</span><span class="cx"> notifyConnectionsOfVersionChangeForUpgrade();
</span><span class="cx">
</span><span class="cx"> // And we notify this OpenDBRequest that it is blocked until those connections close.
</span><del>- m_versionChangeDatabaseConnection->connectionToClient().notifyOpenDBRequestBlocked(m_versionChangeOperation->requestData().requestIdentifier(), m_databaseInfo->version(), requestedVersion);
</del><ins>+ m_versionChangeDatabaseConnection->connectionToClient().notifyOpenDBRequestBlocked(m_currentOperation->requestData().requestIdentifier(), m_databaseInfo->version(), requestedVersion);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool UniqueIDBDatabase::hasAnyOpenConnections() const
</span><span class="lines">@@ -245,11 +246,11 @@
</span><span class="cx"> LOG(IndexedDB, "(main) UniqueIDBDatabase::startVersionChangeTransaction");
</span><span class="cx">
</span><span class="cx"> ASSERT(!m_versionChangeTransaction);
</span><del>- ASSERT(m_versionChangeOperation);
</del><ins>+ ASSERT(m_currentOperation);
+ ASSERT(m_currentOperation->isOpenRequest());
</ins><span class="cx"> ASSERT(m_versionChangeDatabaseConnection);
</span><span class="cx">
</span><del>- auto operation = m_versionChangeOperation;
- m_versionChangeOperation = nullptr;
</del><ins>+ auto operation = WTF::move(m_currentOperation);
</ins><span class="cx">
</span><span class="cx"> uint64_t requestedVersion = operation->requestData().requestedVersion();
</span><span class="cx"> if (!requestedVersion)
</span><span class="lines">@@ -275,10 +276,11 @@
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade()
</span><span class="cx"> {
</span><del>- ASSERT(m_versionChangeOperation);
</del><ins>+ ASSERT(m_currentOperation);
+ ASSERT(m_currentOperation->isOpenRequest());
</ins><span class="cx"> ASSERT(m_versionChangeDatabaseConnection);
</span><span class="cx">
</span><del>- notifyConnectionsOfVersionChange(m_versionChangeOperation->requestData().requestedVersion());
</del><ins>+ notifyConnectionsOfVersionChange(m_currentOperation->requestData().requestedVersion());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UniqueIDBDatabase::notifyConnectionsOfVersionChange(uint64_t requestedVersion)
</span><span class="lines">@@ -921,7 +923,7 @@
</span><span class="cx">
</span><span class="cx"> // If the database was not deleted in the previous step, try to run a transaction now.
</span><span class="cx"> if (m_pendingTransactions.isEmpty()) {
</span><del>- if (!hasAnyOpenConnections() && m_versionChangeOperation) {
</del><ins>+ if (!hasAnyOpenConnections() && m_currentOperation) {
</ins><span class="cx"> startVersionChangeTransaction();
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -173,11 +173,11 @@
</span><span class="cx">
</span><span class="cx"> Deque<Ref<IDBServerOperation>> m_pendingOpenDatabaseOperations;
</span><span class="cx"> Deque<Ref<IDBServerOperation>> m_pendingDeleteDatabaseOperations;
</span><ins>+ RefPtr<IDBServerOperation> m_currentOperation;
</ins><span class="cx">
</span><span class="cx"> HashSet<RefPtr<UniqueIDBDatabaseConnection>> m_openDatabaseConnections;
</span><span class="cx"> HashSet<RefPtr<UniqueIDBDatabaseConnection>> m_closePendingDatabaseConnections;
</span><span class="cx">
</span><del>- RefPtr<IDBServerOperation> m_versionChangeOperation;
</del><span class="cx"> RefPtr<UniqueIDBDatabaseConnection> m_versionChangeDatabaseConnection;
</span><span class="cx"> UniqueIDBDatabaseTransaction* m_versionChangeTransaction { nullptr };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> , m_requestIdentifier(std::make_unique<IDBResourceIdentifier>(connection, request))
</span><span class="cx"> , m_databaseIdentifier(request.databaseIdentifier())
</span><span class="cx"> , m_requestedVersion(request.version())
</span><ins>+ , m_requestType(request.requestType())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -62,6 +63,7 @@
</span><span class="cx"> , m_indexRecordType(other.m_indexRecordType)
</span><span class="cx"> , m_databaseIdentifier(other.m_databaseIdentifier)
</span><span class="cx"> , m_requestedVersion(other.m_requestedVersion)
</span><ins>+ , m_requestType(other.m_requestType)
</ins><span class="cx"> {
</span><span class="cx"> if (other.m_requestIdentifier)
</span><span class="cx"> m_requestIdentifier = std::make_unique<IDBResourceIdentifier>(*other.m_requestIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBRequestDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h (194168 => 194169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2015-12-16 20:06:00 UTC (rev 194168)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h        2015-12-16 20:29:09 UTC (rev 194169)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "IDBDatabaseIdentifier.h"
</span><span class="cx"> #include "IDBResourceIdentifier.h"
</span><ins>+#include "IndexedDB.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -61,6 +62,9 @@
</span><span class="cx"> const IDBDatabaseIdentifier& databaseIdentifier() const { return m_databaseIdentifier; }
</span><span class="cx"> uint64_t requestedVersion() const;
</span><span class="cx">
</span><ins>+ bool isOpenRequest() const { return m_requestType == IndexedDB::RequestType::Open; }
+ bool isDeleteRequest() const { return m_requestType == IndexedDB::RequestType::Delete; }
+
</ins><span class="cx"> IDBRequestData isolatedCopy();
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -74,6 +78,8 @@
</span><span class="cx">
</span><span class="cx"> IDBDatabaseIdentifier m_databaseIdentifier;
</span><span class="cx"> uint64_t m_requestedVersion { 0 };
</span><ins>+
+ IndexedDB::RequestType m_requestType { IndexedDB::RequestType::Other };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>
</body>
</html>