Rename Futures to Promises, per the TC39/DOM discussions
authorRyan Sleevi <sleevi@google.com>
Wed, 12 Jun 2013 19:32:23 -0700
changeset 50 c32294bc59e2
parent 49 a535c724d33e
child 51 ab98b450a090
Rename Futures to Promises, per the TC39/DOM discussions
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Wed Jun 12 19:30:02 2013 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Wed Jun 12 19:32:23 2013 -0700
@@ -508,10 +508,9 @@
             <p>
               A <a href="#dfn-conforming-implementation">conforming user agent</a> MUST support at
               least the subset of the functionality defined in DOM4 that this specification relies
-              upon; in particular, it MUST support <code>Futures</code> and <code>EventTarget</code>.
+              upon; in particular, it MUST support <code>Promises</code>.
               [<a href="#DOM4">DOM4</a>]
             </p>
-            <div class="ednote">The dependency on <code>EventTarget</code> is in progress of being removed.</div>
           </dd>
           <dt>HTML</dt>
           <dd>
@@ -796,7 +795,7 @@
       <div id="cryptooperation-interface" class="section">
         <h2>CryptoOperation interface</h2>
         <x:codeblock language="idl">
-interface <dfn id="dfn-CryptoOperation">CryptoOperation</dfn> : Future {
+interface <dfn id="dfn-CryptoOperation">CryptoOperation</dfn> : Promise {
   CryptoOperation <a href="#dfn-CryptoOperation-method-process">process</a>(ArrayBufferView buffer);
   CryptoOperation <a href="#dfn-CryptoOperation-method-finish">finish</a>();
   CryptoOperation <a href="#dfn-CryptoOperation-method-abort">abort</a>();
@@ -888,7 +887,7 @@
                   associated algorithm.
                   <div class="ednote">
                     This section is a feature at risk, in light of ongoing discussions related
-                    to Streams, ProgressFuture, and idiomatic progressive outputting.
+                    to Streams, ProgressPromise, and idiomatic progressive outputting.
                   </div>
                 </dt>
                 <dd>
@@ -951,7 +950,7 @@
                         Append <var>output</var> to the <var>result</var> field.
                       </p>
                       <div class="ednote">
-                        The intent of this section is to permit the use of <code>ProgressFuture</code>, allowing the
+                        The intent of this section is to permit the use of <code>ProgressPromise</code>, allowing the
                         CryptoOperation to progressively notify of progress being made.
                       </div>
                     </li>
@@ -1161,29 +1160,29 @@
                          optional ArrayBufferView? buffer = null);
 
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/36">ISSUE-36</a></span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                           bool extractable = false,
                           <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                         <a href="#dfn-Key">Key</a> baseKey,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
                         bool extractable = false,
                         <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
   
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                         ArrayBufferView keyData,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
                         bool extractable = false,
                         <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
 
   <span class="comment">// Note: wrap and unwrap remain "Features at Risk"</span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                       <a href="#dfn-Key">Key</a> key,
                       <a href="#dfn-Key">Key</a> wrappingKey,
                       <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                         ArrayBufferView wrappedKey,
                         <a href="#dfn-Key">Key</a> unwrappingKey,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
@@ -1734,12 +1733,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -1799,12 +1798,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -1880,12 +1879,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -2003,12 +2002,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -3820,7 +3819,7 @@
              <dd>
                <cite><a href="http://dom.spec.whatwg.org/">DOM (Living Standard)</a></cite>,
                A. Gregor, A. van Kesteren, Ms2ger. WHATWG.
-               <div class="ednote">This will be updated to W3C DOM4 once Futures/Promises are incorporated.</div>
+               <div class="ednote">This will be updated to W3C DOM4 once Promises are incorporated.</div>
              </dd>
              <dt id="ECMA-262">ECMAScript</dt>
              <dd>
--- a/spec/Overview.html	Wed Jun 12 19:30:02 2013 -0700
+++ b/spec/Overview.html	Wed Jun 12 19:32:23 2013 -0700
@@ -49,7 +49,7 @@
 communications.
       </p>
   
-      <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 20 further editorial notes in the document.</p></div>
+      <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 19 further editorial notes in the document.</p></div>
     </div>
 
     <div class="section">
@@ -517,10 +517,9 @@
             <p>
               A <a href="#dfn-conforming-implementation">conforming user agent</a> MUST support at
               least the subset of the functionality defined in DOM4 that this specification relies
-              upon; in particular, it MUST support <code>Futures</code> and <code>EventTarget</code>.
+              upon; in particular, it MUST support <code>Promises</code>.
               [<a href="#DOM4">DOM4</a>]
             </p>
-            <div class="ednote"><div class="ednoteHeader">Editorial note</div>The dependency on <code>EventTarget</code> is in progress of being removed.</div>
           </dd>
           <dt>HTML</dt>
           <dd>
@@ -805,7 +804,7 @@
       <div id="cryptooperation-interface" class="section">
         <h2>12. CryptoOperation interface</h2>
         <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
-interface <dfn id="dfn-CryptoOperation">CryptoOperation</dfn> : Future {
+interface <dfn id="dfn-CryptoOperation">CryptoOperation</dfn> : Promise {
   CryptoOperation <a href="#dfn-CryptoOperation-method-process">process</a>(ArrayBufferView buffer);
   CryptoOperation <a href="#dfn-CryptoOperation-method-finish">finish</a>();
   CryptoOperation <a href="#dfn-CryptoOperation-method-abort">abort</a>();
@@ -897,7 +896,7 @@
                   associated algorithm.
                   <div class="ednote"><div class="ednoteHeader">Editorial note</div>
                     This section is a feature at risk, in light of ongoing discussions related
-                    to Streams, ProgressFuture, and idiomatic progressive outputting.
+                    to Streams, ProgressPromise, and idiomatic progressive outputting.
                   </div>
                 </dt>
                 <dd>
@@ -960,7 +959,7 @@
                         Append <var>output</var> to the <var>result</var> field.
                       </p>
                       <div class="ednote"><div class="ednoteHeader">Editorial note</div>
-                        The intent of this section is to permit the use of <code>ProgressFuture</code>, allowing the
+                        The intent of this section is to permit the use of <code>ProgressPromise</code>, allowing the
                         CryptoOperation to progressively notify of progress being made.
                       </div>
                     </li>
@@ -1170,29 +1169,29 @@
                          optional ArrayBufferView? buffer = null);
 
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/36">ISSUE-36</a></span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                           bool extractable = false,
                           <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
                         <a href="#dfn-Key">Key</a> baseKey,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
                         bool extractable = false,
                         <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
   
   <span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                         ArrayBufferView keyData,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
                         bool extractable = false,
                         <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
 
   <span class="comment">// Note: wrap and unwrap remain "Features at Risk"</span>
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                       <a href="#dfn-Key">Key</a> key,
                       <a href="#dfn-Key">Key</a> wrappingKey,
                       <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
-  Future&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+  Promise&lt;any&gt; <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
                         ArrayBufferView wrappedKey,
                         <a href="#dfn-Key">Key</a> unwrappingKey,
                         <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
@@ -1743,12 +1742,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -1808,12 +1807,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -1889,12 +1888,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -2012,12 +2011,12 @@
               </li>
               <li>
                 <p>
-                  Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
+                  Let <var>promise</var> be a new <code>Promise</code> object and <var>resolver</var> its associated resolver.
                 </p>
               </li>
               <li>
                 <p>
-                  Return <var>future</var> and continue executing the remaining steps asynchronously.
+                  Return <var>promise</var> and continue executing the remaining steps asynchronously.
                 </p>
               </li>
               <li>
@@ -3829,7 +3828,7 @@
              <dd>
                <cite><a href="http://dom.spec.whatwg.org/">DOM (Living Standard)</a></cite>,
                A. Gregor, A. van Kesteren, Ms2ger. WHATWG.
-               <div class="ednote"><div class="ednoteHeader">Editorial note</div>This will be updated to W3C DOM4 once Futures/Promises are incorporated.</div>
+               <div class="ednote"><div class="ednoteHeader">Editorial note</div>This will be updated to W3C DOM4 once Promises are incorporated.</div>
              </dd>
              <dt id="ECMA-262">ECMAScript</dt>
              <dd>