Skip to content

Commit

Permalink
Transaction-is-active test can be an assertion (noted in issue #192)
Browse files Browse the repository at this point in the history
  • Loading branch information
inexorabletash committed Apr 21, 2017
1 parent 05b2a7c commit f659e17
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5531,8 +5531,7 @@ created [=request=] belongs to is [=transaction/aborted=] using the steps to
1. Let |transaction| be the [=/transaction=] associated with
|source|.

2. If |transaction| is not [=transaction/active=], [=throw=] a
"{{TransactionInactiveError}}" {{DOMException}}.
2. Assert: |transaction| is [=transaction/active=].

3. If |request| was not given, let |request| be a new |request| with
[=request/source=] as |source|.
Expand Down Expand Up @@ -7149,6 +7148,14 @@ document's Revision History</a>.
<a abstract-op>StructuredDeserialize</a> hooks.
(<a href="https://github.com/w3c/IndexedDB/issues/170">bug #170</a>)

* Use [{{SameObject}}]/[{{NewObject}}] in IDL where appropriate.
(<a href="https://github.com/w3c/IndexedDB/issues/193">issue #193</a>,
<a href="https://github.com/w3c/IndexedDB/issues/194">issue #194</a>)

* Transaction-is-[=active=] test can be an assertion in
the [=asynchronously execute a request=] steps.
(<a href="https://github.com/w3c/IndexedDB/issues/192">issue #192</a>)


<!-- ============================================================ -->
<h2 id=acknowledgements>Acknowledgements</h2>
Expand Down
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5398,8 +5398,7 @@ <h3 class="heading settled" data-level="5.6" id="async-execute-request"><span cl
<li data-md="">
<p>Let <var>transaction</var> be the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept-76">transaction</a> associated with <var>source</var>.</p>
<li data-md="">
<p>If <var>transaction</var> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active-43">active</a>, <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a
"<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#transactioninactiveerror">TransactionInactiveError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException">DOMException</a></code>.</p>
<p class="assertion">Assert: <var>transaction</var> is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active-43">active</a>.</p>
<li data-md="">
<p>If <var>request</var> was not given, let <var>request</var> be a new <var>request</var> with <a data-link-type="dfn" href="#request-source" id="ref-for-request-source-4">source</a> as <var>source</var>.</p>
<li data-md="">
Expand Down Expand Up @@ -6680,6 +6679,13 @@ <h2 class="heading settled" data-level="10" id="revision-history"><span class="s
<li data-md="">
<p>Use <a data-link-type="biblio" href="#biblio-html">[HTML]</a>'s <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/infrastructure.html#structuredserialize">StructuredSerialize</a> and <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/infrastructure.html#structureddeserialize">StructuredDeserialize</a> hooks.
(<a href="https://github.com/w3c/IndexedDB/issues/170">bug #170</a>)</p>
<li data-md="">
<p>Use [<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#SameObject">SameObject</a></code>]/[<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#NewObject">NewObject</a></code>] in IDL where appropriate.
(<a href="https://github.com/w3c/IndexedDB/issues/193">issue #193</a>, <a href="https://github.com/w3c/IndexedDB/issues/194">issue #194</a>)</p>
<li data-md="">
<p>Transaction-is-<a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active-44">active</a> test can be an assertion in
the <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request-27">asynchronously execute a request</a> steps.
(<a href="https://github.com/w3c/IndexedDB/issues/192">issue #192</a>)</p>
</ul>
<h2 class="heading settled" data-level="11" id="acknowledgements"><span class="secno">11. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2>
<p>Special thanks to Nikunj Mehta, the original author of the first
Expand Down Expand Up @@ -8205,6 +8211,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
<li><a href="#ref-for-transaction-active-25">4.6. The IDBIndex interface</a> <a href="#ref-for-transaction-active-26">(2)</a> <a href="#ref-for-transaction-active-27">(3)</a> <a href="#ref-for-transaction-active-28">(4)</a> <a href="#ref-for-transaction-active-29">(5)</a> <a href="#ref-for-transaction-active-30">(6)</a> <a href="#ref-for-transaction-active-31">(7)</a> <a href="#ref-for-transaction-active-32">(8)</a> <a href="#ref-for-transaction-active-33">(9)</a> <a href="#ref-for-transaction-active-34">(10)</a>
<li><a href="#ref-for-transaction-active-35">4.8. The IDBCursor interface</a> <a href="#ref-for-transaction-active-36">(2)</a> <a href="#ref-for-transaction-active-37">(3)</a> <a href="#ref-for-transaction-active-38">(4)</a> <a href="#ref-for-transaction-active-39">(5)</a> <a href="#ref-for-transaction-active-40">(6)</a> <a href="#ref-for-transaction-active-41">(7)</a> <a href="#ref-for-transaction-active-42">(8)</a>
<li><a href="#ref-for-transaction-active-43">5.6. Asynchronously executing a request</a>
<li><a href="#ref-for-transaction-active-44">10. Revision History</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="transaction-cleanup-event-loop">
Expand Down Expand Up @@ -9503,6 +9510,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
<li><a href="#ref-for-asynchronously-execute-a-request-20">4.8. The IDBCursor interface</a> <a href="#ref-for-asynchronously-execute-a-request-21">(2)</a> <a href="#ref-for-asynchronously-execute-a-request-22">(3)</a> <a href="#ref-for-asynchronously-execute-a-request-23">(4)</a> <a href="#ref-for-asynchronously-execute-a-request-24">(5)</a>
<li><a href="#ref-for-asynchronously-execute-a-request-25">5.5. Aborting a transaction</a>
<li><a href="#ref-for-asynchronously-execute-a-request-26">6. Database operations</a>
<li><a href="#ref-for-asynchronously-execute-a-request-27">10. Revision History</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="run-an-upgrade-transaction">
Expand Down

0 comments on commit f659e17

Please sign in to comment.