<!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>[190580] 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/190580">190580</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-10-05 14:29:13 -0700 (Mon, 05 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modernize IDBRequest::ReadyState into an enum class.
https://bugs.webkit.org/show_bug.cgi?id=149817

Reviewed by Alex Christensen.

No new tests (Refactor, no behavior change).

* Modules/indexeddb/IDBRequest.h:

* Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
(WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):

* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::LegacyRequest):
(WebCore::LegacyRequest::result):
(WebCore::LegacyRequest::error):
(WebCore::LegacyRequest::errorCode):
(WebCore::LegacyRequest::readyState):
(WebCore::LegacyRequest::markEarlyDeath):
(WebCore::LegacyRequest::abort):
(WebCore::LegacyRequest::setCursorDetails):
(WebCore::LegacyRequest::setPendingCursor):
(WebCore::LegacyRequest::setResultCursor):
(WebCore::LegacyRequest::finishCursor):
(WebCore::LegacyRequest::shouldEnqueueEvent):
(WebCore::LegacyRequest::stop):
(WebCore::LegacyRequest::dispatchEvent):
(WebCore::LegacyRequest::transactionDidFinishAndDispatch):
(WebCore::LegacyRequest::enqueueEvent):
* Modules/indexeddb/legacy/LegacyRequest.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp</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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190579 => 190580)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-05 21:21:18 UTC (rev 190579)
+++ trunk/Source/WebCore/ChangeLog        2015-10-05 21:29:13 UTC (rev 190580)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-10-05  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modernize IDBRequest::ReadyState into an enum class.
+        https://bugs.webkit.org/show_bug.cgi?id=149817
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Refactor, no behavior change).
+
+        * Modules/indexeddb/IDBRequest.h:
+        
+        * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
+        (WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):
+        
+        * Modules/indexeddb/legacy/LegacyRequest.cpp:
+        (WebCore::LegacyRequest::LegacyRequest):
+        (WebCore::LegacyRequest::result):
+        (WebCore::LegacyRequest::error):
+        (WebCore::LegacyRequest::errorCode):
+        (WebCore::LegacyRequest::readyState):
+        (WebCore::LegacyRequest::markEarlyDeath):
+        (WebCore::LegacyRequest::abort):
+        (WebCore::LegacyRequest::setCursorDetails):
+        (WebCore::LegacyRequest::setPendingCursor):
+        (WebCore::LegacyRequest::setResultCursor):
+        (WebCore::LegacyRequest::finishCursor):
+        (WebCore::LegacyRequest::shouldEnqueueEvent):
+        (WebCore::LegacyRequest::stop):
+        (WebCore::LegacyRequest::dispatchEvent):
+        (WebCore::LegacyRequest::transactionDidFinishAndDispatch):
+        (WebCore::LegacyRequest::enqueueEvent):
+        * Modules/indexeddb/legacy/LegacyRequest.h:
+
</ins><span class="cx"> 2015-10-05  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Cleaning up after revision 190339
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (190579 => 190580)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-10-05 21:21:18 UTC (rev 190579)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2015-10-05 21:29:13 UTC (rev 190580)
</span><span class="lines">@@ -44,6 +44,13 @@
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><ins>+// Defined in the IDL
+enum class IDBRequestReadyState {
+    Pending = 1,
+    Done = 2,
+    DeprecatedEarlyDeath = 3, // FIXME: https://bugs.webkit.org/show_bug.cgi?id=149117 - Remove this when removing LegacyIDB
+};
+
</ins><span class="cx"> class IDBRequest : public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~IDBRequest() { }
</span><span class="lines">@@ -54,13 +61,6 @@
</span><span class="cx">     virtual RefPtr&lt;IDBAny&gt; source() const = 0;
</span><span class="cx">     virtual RefPtr&lt;IDBTransaction&gt; transaction() const = 0;
</span><span class="cx"> 
</span><del>-    // Defined in the IDL
-    enum ReadyState {
-        PENDING = 1,
-        DONE = 2,
-        EarlyDeath = 3
-    };
-
</del><span class="cx">     virtual const String&amp; readyState() const = 0;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyOpenDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp (190579 => 190580)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp        2015-10-05 21:21:18 UTC (rev 190579)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp        2015-10-05 21:29:13 UTC (rev 190580)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_contextStopped || !scriptExecutionContext())
</span><span class="cx">         return false;
</span><del>-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx">     if (m_requestAborted)
</span><span class="cx">         return false;
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp (190579 => 190580)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp        2015-10-05 21:21:18 UTC (rev 190579)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp        2015-10-05 21:29:13 UTC (rev 190580)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     , m_errorCode(0)
</span><span class="cx">     , m_contextStopped(false)
</span><span class="cx">     , m_transaction(transaction)
</span><del>-    , m_readyState(PENDING)
</del><ins>+    , m_readyState(IDBRequestReadyState::Pending)
</ins><span class="cx">     , m_requestAborted(false)
</span><span class="cx">     , m_source(source)
</span><span class="cx">     , m_taskType(taskType)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBAny&gt; LegacyRequest::result(ExceptionCode&amp; ec) const
</span><span class="cx"> {
</span><del>-    if (m_readyState != DONE) {
</del><ins>+    if (m_readyState != IDBRequestReadyState::Done) {
</ins><span class="cx">         ec = IDBDatabaseException::InvalidStateError;
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;DOMError&gt; LegacyRequest::error(ExceptionCode&amp; ec) const
</span><span class="cx"> {
</span><del>-    if (m_readyState != DONE) {
</del><ins>+    if (m_readyState != IDBRequestReadyState::Done) {
</ins><span class="cx">         ec = IDBDatabaseException::InvalidStateError;
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned short LegacyRequest::errorCode(ExceptionCode&amp; ec) const
</span><span class="cx"> {
</span><del>-    if (m_readyState != DONE) {
</del><ins>+    if (m_readyState != IDBRequestReadyState::Done) {
</ins><span class="cx">         ec = IDBDatabaseException::InvalidStateError;
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="lines">@@ -134,11 +134,11 @@
</span><span class="cx"> 
</span><span class="cx"> const String&amp; LegacyRequest::readyState() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pending, (&quot;pending&quot;, AtomicString::ConstructFromLiteral));
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, done, (&quot;done&quot;, AtomicString::ConstructFromLiteral));
</span><span class="cx"> 
</span><del>-    if (m_readyState == PENDING)
</del><ins>+    if (m_readyState == IDBRequestReadyState::Pending)
</ins><span class="cx">         return pending;
</span><span class="cx"> 
</span><span class="cx">     return done;
</span><span class="lines">@@ -146,8 +146,8 @@
</span><span class="cx"> 
</span><span class="cx"> void LegacyRequest::markEarlyDeath()
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == PENDING);
-    m_readyState = EarlyDeath;
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending);
+    m_readyState = IDBRequestReadyState::DeprecatedEarlyDeath;
</ins><span class="cx">     if (m_transaction)
</span><span class="cx">         m_transaction-&gt;unregisterRequest(this);
</span><span class="cx"> }
</span><span class="lines">@@ -157,8 +157,8 @@
</span><span class="cx">     ASSERT(!m_requestAborted);
</span><span class="cx">     if (m_contextStopped || !scriptExecutionContext())
</span><span class="cx">         return;
</span><del>-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
-    if (m_readyState == DONE)
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
+    if (m_readyState == IDBRequestReadyState::Done)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Enqueued events may be the only reference to this object.
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> 
</span><span class="cx"> void LegacyRequest::setCursorDetails(IndexedDB::CursorType cursorType, IndexedDB::CursorDirection direction)
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == PENDING);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending);
</ins><span class="cx">     ASSERT(!m_pendingCursor);
</span><span class="cx">     m_cursorType = cursorType;
</span><span class="cx">     m_cursorDirection = direction;
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> 
</span><span class="cx"> void LegacyRequest::setPendingCursor(PassRefPtr&lt;LegacyCursor&gt; cursor)
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx">     ASSERT(scriptExecutionContext());
</span><span class="cx">     ASSERT(m_transaction);
</span><span class="cx">     ASSERT(!m_pendingCursor);
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_pendingCursor = cursor;
</span><span class="cx">     m_result = nullptr;
</span><del>-    m_readyState = PENDING;
</del><ins>+    m_readyState = IDBRequestReadyState::Pending;
</ins><span class="cx">     m_errorCode = 0;
</span><span class="cx">     m_error = nullptr;
</span><span class="cx">     m_errorMessage = String();
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> 
</span><span class="cx"> void LegacyRequest::setResultCursor(PassRefPtr&lt;LegacyCursor&gt; cursor, PassRefPtr&lt;IDBKey&gt; key, PassRefPtr&lt;IDBKey&gt; primaryKey, const Deprecated::ScriptValue&amp; value)
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == PENDING);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending);
</ins><span class="cx">     m_cursorKey = key;
</span><span class="cx">     m_cursorPrimaryKey = primaryKey;
</span><span class="cx">     m_cursorValue = value;
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> void LegacyRequest::finishCursor()
</span><span class="cx"> {
</span><span class="cx">     m_cursorFinished = true;
</span><del>-    if (m_readyState != PENDING)
</del><ins>+    if (m_readyState != IDBRequestReadyState::Pending)
</ins><span class="cx">         m_hasPendingActivity = false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -241,10 +241,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_contextStopped || !scriptExecutionContext())
</span><span class="cx">         return false;
</span><del>-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx">     if (m_requestAborted)
</span><span class="cx">         return false;
</span><del>-    ASSERT(m_readyState == PENDING);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending);
</ins><span class="cx">     ASSERT(!m_errorCode &amp;&amp; m_errorMessage.isNull() &amp;&amp; !m_error &amp;&amp; !m_result);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -447,7 +447,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_contextStopped = true;
</span><span class="cx">     m_requestState.clear();
</span><del>-    if (m_readyState == PENDING)
</del><ins>+    if (m_readyState == IDBRequestReadyState::Pending)
</ins><span class="cx">         markEarlyDeath();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -469,18 +469,18 @@
</span><span class="cx"> bool LegacyRequest::dispatchEvent(PassRefPtr&lt;Event&gt; event)
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;LegacyRequest::dispatchEvent&quot;);
</span><del>-    ASSERT(m_readyState == PENDING);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending);
</ins><span class="cx">     ASSERT(!m_contextStopped);
</span><span class="cx">     ASSERT(m_hasPendingActivity);
</span><span class="cx">     ASSERT(m_enqueuedEvents.size());
</span><span class="cx">     ASSERT(scriptExecutionContext());
</span><span class="cx">     ASSERT(event-&gt;target() == this);
</span><del>-    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);
</del><ins>+    ASSERT_WITH_MESSAGE(m_readyState &lt; IDBRequestReadyState::Done, &quot;When dispatching event %s, m_readyState &lt; DONE(%d), was %d&quot;, event-&gt;type().string().utf8().data(), IDBRequestReadyState::Done, m_readyState);
</ins><span class="cx"> 
</span><span class="cx">     DOMRequestState::Scope scope(m_requestState);
</span><span class="cx"> 
</span><span class="cx">     if (event-&gt;type() != eventNames().blockedEvent)
</span><del>-        m_readyState = DONE;
</del><ins>+        m_readyState = IDBRequestReadyState::Done;
</ins><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
</span><span class="cx">         if (m_enqueuedEvents[i].get() == event.get())
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx">     bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets);
</span><span class="cx"> 
</span><span class="cx">     if (m_transaction) {
</span><del>-        if (m_readyState == DONE)
</del><ins>+        if (m_readyState == IDBRequestReadyState::Done)
</ins><span class="cx">             m_transaction-&gt;unregisterRequest(this);
</span><span class="cx"> 
</span><span class="cx">         // Possibly abort the transaction. This must occur after unregistering (so this request
</span><span class="lines">@@ -541,7 +541,7 @@
</span><span class="cx">     if (cursorToNotify)
</span><span class="cx">         cursorToNotify-&gt;postSuccessHandlerCallback();
</span><span class="cx"> 
</span><del>-    if (m_readyState == DONE &amp;&amp; (!cursorToNotify || m_cursorFinished) &amp;&amp; event-&gt;type() != eventNames().upgradeneededEvent)
</del><ins>+    if (m_readyState == IDBRequestReadyState::Done &amp;&amp; (!cursorToNotify || m_cursorFinished) &amp;&amp; event-&gt;type() != eventNames().upgradeneededEvent)
</ins><span class="cx">         m_hasPendingActivity = false;
</span><span class="cx"> 
</span><span class="cx">     return dontPreventDefault;
</span><span class="lines">@@ -559,20 +559,20 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_transaction);
</span><span class="cx">     ASSERT(m_transaction-&gt;isVersionChange());
</span><del>-    ASSERT(m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx">     ASSERT(scriptExecutionContext());
</span><span class="cx">     m_transaction = nullptr;
</span><del>-    m_readyState = PENDING;
</del><ins>+    m_readyState = IDBRequestReadyState::Pending;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void LegacyRequest::enqueueEvent(PassRefPtr&lt;Event&gt; event)
</span><span class="cx"> {
</span><del>-    ASSERT(m_readyState == PENDING || m_readyState == DONE);
</del><ins>+    ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
</ins><span class="cx"> 
</span><span class="cx">     if (m_contextStopped || !scriptExecutionContext())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    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);
</del><ins>+    ASSERT_WITH_MESSAGE(m_readyState == IDBRequestReadyState::Pending || m_didFireUpgradeNeededEvent, &quot;When queueing event %s, m_readyState was %d&quot;, event-&gt;type().string().utf8().data(), m_readyState);
</ins><span class="cx"> 
</span><span class="cx">     event-&gt;setTarget(this);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyLegacyRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h (190579 => 190580)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h        2015-10-05 21:21:18 UTC (rev 190579)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.h        2015-10-05 21:29:13 UTC (rev 190580)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">     RefPtr&lt;DOMError&gt; m_error;
</span><span class="cx">     bool m_contextStopped;
</span><span class="cx">     RefPtr&lt;LegacyTransaction&gt; m_transaction;
</span><del>-    ReadyState m_readyState;
</del><ins>+    IDBRequestReadyState m_readyState;
</ins><span class="cx">     bool m_requestAborted; // May be aborted by transaction then receive async onsuccess; ignore vs. assert.
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre>
</div>
</div>

</body>
</html>