<!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>[188175] 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/188175">188175</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-08-07 16:39:53 -0700 (Fri, 07 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
https://bugs.webkit.org/show_bug.cgi?id=147798

Reviewed by Geoffrey Garen.

This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
into SQLTransaction.

Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.

* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::stateFunctionFor):
(WebCore::SQLTransactionBackend::lockAcquired):
(WebCore::SQLTransactionBackend::openTransactionAndPreflight):
(WebCore::SQLTransactionBackend::runStatements):
(WebCore::SQLTransactionBackend::runCurrentStatement):
(WebCore::SQLTransactionBackend::handleCurrentStatementError):
(WebCore::SQLTransactionBackend::handleTransactionError):
(WebCore::SQLTransactionBackend::postflightAndCommit):
(WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
(WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
(WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
(WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
* Modules/webdatabase/SQLTransactionBackend.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionBackendcpp">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionBackendh">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188174 => 188175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-07 23:31:36 UTC (rev 188174)
+++ trunk/Source/WebCore/ChangeLog        2015-08-07 23:39:53 UTC (rev 188175)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2015-08-07  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
+        https://bugs.webkit.org/show_bug.cgi?id=147798
+
+        Reviewed by Geoffrey Garen.
+
+        This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
+        into SQLTransaction.
+
+        Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
+        to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.
+
+        * Modules/webdatabase/SQLTransactionBackend.cpp:
+        (WebCore::SQLTransactionBackend::stateFunctionFor):
+        (WebCore::SQLTransactionBackend::lockAcquired):
+        (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
+        (WebCore::SQLTransactionBackend::runStatements):
+        (WebCore::SQLTransactionBackend::runCurrentStatement):
+        (WebCore::SQLTransactionBackend::handleCurrentStatementError):
+        (WebCore::SQLTransactionBackend::handleTransactionError):
+        (WebCore::SQLTransactionBackend::postflightAndCommit):
+        (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
+        (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
+        (WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
+        (WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
+        * Modules/webdatabase/SQLTransactionBackend.h:
+
</ins><span class="cx"> 2015-08-07  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Lightweight locks should be adaptive
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp (188174 => 188175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp        2015-08-07 23:31:36 UTC (rev 188174)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp        2015-08-07 23:39:53 UTC (rev 188175)
</span><span class="lines">@@ -447,14 +447,14 @@
</span><span class="cx">         &amp;SQLTransactionBackend::acquireLock,                 // 2.
</span><span class="cx">         &amp;SQLTransactionBackend::openTransactionAndPreflight, // 3.
</span><span class="cx">         &amp;SQLTransactionBackend::runStatements,               // 4.
</span><del>-        &amp;SQLTransactionBackend::postflightAndCommit,         // 5.
</del><ins>+        &amp;SQLTransactionBackend::unreachableState,            // 5. postflightAndCommit
</ins><span class="cx">         &amp;SQLTransactionBackend::cleanupAndTerminate,         // 6.
</span><span class="cx">         &amp;SQLTransactionBackend::cleanupAfterTransactionErrorCallback, // 7.
</span><del>-        &amp;SQLTransactionBackend::sendToFrontendState,         // 8. deliverTransactionCallback
-        &amp;SQLTransactionBackend::sendToFrontendState,         // 9. deliverTransactionErrorCallback
-        &amp;SQLTransactionBackend::sendToFrontendState,         // 10. deliverStatementCallback
-        &amp;SQLTransactionBackend::sendToFrontendState,         // 11. deliverQuotaIncreaseCallback
-        &amp;SQLTransactionBackend::sendToFrontendState          // 12. deliverSuccessCallback
</del><ins>+        &amp;SQLTransactionBackend::unreachableState,            // 8. deliverTransactionCallback
+        &amp;SQLTransactionBackend::unreachableState,            // 9. deliverTransactionErrorCallback
+        &amp;SQLTransactionBackend::unreachableState,            // 10. deliverStatementCallback
+        &amp;SQLTransactionBackend::unreachableState,            // 11. deliverQuotaIncreaseCallback
+        &amp;SQLTransactionBackend::unreachableState             // 12. deliverSuccessCallback
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     ASSERT(WTF_ARRAY_LENGTH(stateFunctions) == static_cast&lt;int&gt;(SQLTransactionState::NumberOfStates));
</span><span class="lines">@@ -552,7 +552,10 @@
</span><span class="cx"> void SQLTransactionBackend::lockAcquired()
</span><span class="cx"> {
</span><span class="cx">     m_lockAcquired = true;
</span><del>-    requestTransitToState(SQLTransactionState::OpenTransactionAndPreflight);
</del><ins>+
+    m_requestedState = SQLTransactionState::OpenTransactionAndPreflight;
+    ASSERT(m_requestedState != SQLTransactionState::End);
+    m_database-&gt;scheduleTransactionStep(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SQLTransactionState SQLTransactionBackend::openTransactionAndPreflight()
</span><span class="lines">@@ -565,7 +568,9 @@
</span><span class="cx">     // If the database was deleted, jump to the error callback
</span><span class="cx">     if (m_database-&gt;deleted()) {
</span><span class="cx">         m_transactionError = SQLError::create(SQLError::UNKNOWN_ERR, &quot;unable to open a transaction, because the user deleted the database&quot;);
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return SQLTransactionState::Idle;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Set the maximum usage for this transaction if this transactions is not read-only
</span><span class="lines">@@ -588,7 +593,9 @@
</span><span class="cx">         m_transactionError = SQLError::create(SQLError::DATABASE_ERR, &quot;unable to begin transaction&quot;,
</span><span class="cx">             m_database-&gt;sqliteDatabase().lastError(), m_database-&gt;sqliteDatabase().lastErrorMsg());
</span><span class="cx">         m_sqliteTransaction = nullptr;
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return SQLTransactionState::Idle;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Note: We intentionally retrieve the actual version even with an empty expected version.
</span><span class="lines">@@ -601,8 +608,11 @@
</span><span class="cx">         m_database-&gt;disableAuthorizer();
</span><span class="cx">         m_sqliteTransaction = nullptr;
</span><span class="cx">         m_database-&gt;enableAuthorizer();
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return SQLTransactionState::Idle;
</ins><span class="cx">     }
</span><ins>+
</ins><span class="cx">     m_hasVersionMismatch = !m_database-&gt;expectedVersion().isEmpty() &amp;&amp; (m_database-&gt;expectedVersion() != actualVersion);
</span><span class="cx"> 
</span><span class="cx">     // Spec 4.3.2.3: Perform preflight steps, jumping to the error callback if they fail
</span><span class="lines">@@ -613,12 +623,16 @@
</span><span class="cx">         m_transactionError = m_wrapper-&gt;sqlError();
</span><span class="cx">         if (!m_transactionError)
</span><span class="cx">             m_transactionError = SQLError::create(SQLError::UNKNOWN_ERR, &quot;unknown error occurred during transaction preflight&quot;);
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return SQLTransactionState::Idle;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Spec 4.3.2.4: Invoke the transaction callback with the new SQLTransaction object
</span><del>-    if (m_hasCallback)
-        return SQLTransactionState::DeliverTransactionCallback;
</del><ins>+    if (m_hasCallback) {
+        m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverTransactionCallback);
+        return SQLTransactionState::Idle;
+    }
</ins><span class="cx"> 
</span><span class="cx">     // If we have no callback to make, skip pass to the state after:
</span><span class="cx">     return SQLTransactionState::RunStatements;
</span><span class="lines">@@ -627,7 +641,6 @@
</span><span class="cx"> SQLTransactionState SQLTransactionBackend::runStatements()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_lockAcquired);
</span><del>-    SQLTransactionState nextState;
</del><span class="cx"> 
</span><span class="cx">     // If there is a series of statements queued up that are all successful and have no associated
</span><span class="cx">     // SQLStatementCallback objects, then we can burn through the queue
</span><span class="lines">@@ -646,16 +659,22 @@
</span><span class="cx">             // If the current statement has already been run, failed due to quota constraints, and we're not retrying it,
</span><span class="cx">             // that means it ended in an error. Handle it now
</span><span class="cx">             if (m_currentStatementBackend &amp;&amp; m_currentStatementBackend-&gt;lastExecutionFailedDueToQuota()) {
</span><del>-                return nextStateForCurrentStatementError();
</del><ins>+                handleCurrentStatementError();
+                break;
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             // Otherwise, advance to the next statement
</span><span class="cx">             getNextStatement();
</span><span class="cx">         }
</span><del>-        nextState = runCurrentStatementAndGetNextState();
-    } while (nextState == SQLTransactionState::RunStatements);
</del><ins>+    } while (runCurrentStatement());
</ins><span class="cx"> 
</span><del>-    return nextState;
</del><ins>+    // If runCurrentStatement() returned false, that means either there was no current statement to run,
+    // or the current statement requires a callback to complete. In the later case, it also scheduled
+    // the callback or performed any other additional work so we can return.
+    if (!m_currentStatementBackend)
+        postflightAndCommit();
+
+    return SQLTransactionState::Idle;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SQLTransactionBackend::getNextStatement()
</span><span class="lines">@@ -667,11 +686,11 @@
</span><span class="cx">         m_currentStatementBackend = m_statementQueue.takeFirst();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLTransactionState SQLTransactionBackend::runCurrentStatementAndGetNextState()
</del><ins>+bool SQLTransactionBackend::runCurrentStatement()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_currentStatementBackend) {
</span><span class="cx">         // No more statements to run. So move on to the next state.
</span><del>-        return SQLTransactionState::PostflightAndCommit;
</del><ins>+        return false;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_database-&gt;resetAuthorizer();
</span><span class="lines">@@ -686,36 +705,55 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (m_currentStatementBackend-&gt;hasStatementCallback()) {
</span><del>-            return SQLTransactionState::DeliverStatementCallback;
</del><ins>+            m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverStatementCallback);
+            return false;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // If we get here, then the statement doesn't have a callback to invoke.
</span><span class="cx">         // We can move on to the next statement. Hence, stay in this state.
</span><del>-        return SQLTransactionState::RunStatements;
</del><ins>+        return true;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_currentStatementBackend-&gt;lastExecutionFailedDueToQuota()) {
</span><del>-        return SQLTransactionState::DeliverQuotaIncreaseCallback;
</del><ins>+        m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverQuotaIncreaseCallback);
+        return false;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return nextStateForCurrentStatementError();
</del><ins>+    handleCurrentStatementError();
+    return false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLTransactionState SQLTransactionBackend::nextStateForCurrentStatementError()
</del><ins>+void SQLTransactionBackend::handleCurrentStatementError()
</ins><span class="cx"> {
</span><span class="cx">     // Spec 4.3.2.6.6: error - Call the statement's error callback, but if there was no error callback,
</span><span class="cx">     // or the transaction was rolled back, jump to the transaction error callback
</span><del>-    if (m_currentStatementBackend-&gt;hasStatementErrorCallback() &amp;&amp; !m_sqliteTransaction-&gt;wasRolledBackBySqlite())
-        return SQLTransactionState::DeliverStatementCallback;
</del><ins>+    if (m_currentStatementBackend-&gt;hasStatementErrorCallback() &amp;&amp; !m_sqliteTransaction-&gt;wasRolledBackBySqlite()) {
+        m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverStatementCallback);
+        return;
+    }
</ins><span class="cx"> 
</span><span class="cx">     m_transactionError = m_currentStatementBackend-&gt;sqlError();
</span><span class="cx">     if (!m_transactionError)
</span><span class="cx">         m_transactionError = SQLError::create(SQLError::DATABASE_ERR, &quot;the statement failed to execute&quot;);
</span><del>-    return nextStateForTransactionError();
</del><ins>+
+    handleTransactionError();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLTransactionState SQLTransactionBackend::postflightAndCommit()
</del><ins>+void SQLTransactionBackend::handleTransactionError()
</ins><span class="cx"> {
</span><ins>+    ASSERT(m_transactionError);
+    if (m_hasErrorCallback) {
+        m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverTransactionErrorCallback);
+        return;
+    }
+
+    // No error callback, so fast-forward to the next state and rollback the
+    // transaction.
+    cleanupAfterTransactionErrorCallback();
+}
+
+void SQLTransactionBackend::postflightAndCommit()
+{
</ins><span class="cx">     ASSERT(m_lockAcquired);
</span><span class="cx"> 
</span><span class="cx">     // Spec 4.3.2.7: Perform postflight steps, jumping to the error callback if they fail.
</span><span class="lines">@@ -723,7 +761,9 @@
</span><span class="cx">         m_transactionError = m_wrapper-&gt;sqlError();
</span><span class="cx">         if (!m_transactionError)
</span><span class="cx">             m_transactionError = SQLError::create(SQLError::UNKNOWN_ERR, &quot;unknown error occurred during transaction postflight&quot;);
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Spec 4.3.2.7: Commit the transaction, jumping to the error callback if that fails.
</span><span class="lines">@@ -741,7 +781,9 @@
</span><span class="cx">             m_wrapper-&gt;handleCommitFailedAfterPostflight(this);
</span><span class="cx">         m_transactionError = SQLError::create(SQLError::DATABASE_ERR, &quot;unable to commit transaction&quot;,
</span><span class="cx">             m_database-&gt;sqliteDatabase().lastError(), m_database-&gt;sqliteDatabase().lastErrorMsg());
</span><del>-        return nextStateForTransactionError();
</del><ins>+
+        handleTransactionError();
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Vacuum the database if anything was deleted.
</span><span class="lines">@@ -753,7 +795,7 @@
</span><span class="cx">         m_database-&gt;transactionClient()-&gt;didCommitWriteTransaction(database());
</span><span class="cx"> 
</span><span class="cx">     // Spec 4.3.2.8: Deliver success callback, if there is one.
</span><del>-    return SQLTransactionState::DeliverSuccessCallback;
</del><ins>+    m_frontend-&gt;requestTransitToState(SQLTransactionState::DeliverSuccessCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SQLTransactionState SQLTransactionBackend::cleanupAndTerminate()
</span><span class="lines">@@ -770,17 +812,6 @@
</span><span class="cx">     return SQLTransactionState::End;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLTransactionState SQLTransactionBackend::nextStateForTransactionError()
-{
-    ASSERT(m_transactionError);
-    if (m_hasErrorCallback)
-        return SQLTransactionState::DeliverTransactionErrorCallback;
-
-    // No error callback, so fast-forward to the next state and rollback the
-    // transaction.
-    return SQLTransactionState::CleanupAfterTransactionErrorCallback;
-}
-
</del><span class="cx"> SQLTransactionState SQLTransactionBackend::cleanupAfterTransactionErrorCallback()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_lockAcquired);
</span><span class="lines">@@ -823,13 +854,6 @@
</span><span class="cx">     return SQLTransactionState::End;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLTransactionState SQLTransactionBackend::sendToFrontendState()
-{
-    ASSERT(m_nextState != SQLTransactionState::Idle);
-    m_frontend-&gt;requestTransitToState(m_nextState);
-    return SQLTransactionState::Idle;
-}
-
</del><span class="cx"> void SQLTransactionBackend::acquireOriginLock()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_originLock);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h (188174 => 188175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h        2015-08-07 23:31:36 UTC (rev 188174)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h        2015-08-07 23:39:53 UTC (rev 188175)
</span><span class="lines">@@ -95,18 +95,16 @@
</span><span class="cx">     SQLTransactionState acquireLock();
</span><span class="cx">     SQLTransactionState openTransactionAndPreflight();
</span><span class="cx">     SQLTransactionState runStatements();
</span><del>-    SQLTransactionState postflightAndCommit();
</del><span class="cx">     SQLTransactionState cleanupAndTerminate();
</span><span class="cx">     SQLTransactionState cleanupAfterTransactionErrorCallback();
</span><span class="cx"> 
</span><span class="cx">     SQLTransactionState unreachableState();
</span><del>-    SQLTransactionState sendToFrontendState();
</del><span class="cx"> 
</span><del>-    SQLTransactionState nextStateForCurrentStatementError();
-    SQLTransactionState nextStateForTransactionError();
-    SQLTransactionState runCurrentStatementAndGetNextState();
-
</del><span class="cx">     void getNextStatement();
</span><ins>+    bool runCurrentStatement();
+    void handleCurrentStatementError();
+    void handleTransactionError();
+    void postflightAndCommit();
</ins><span class="cx"> 
</span><span class="cx">     void acquireOriginLock();
</span><span class="cx">     void releaseOriginLockIfNeeded();
</span></span></pre>
</div>
</div>

</body>
</html>