[EME] Bug 26457 - Update the algorithms to not resolve the void promises with "undefined".
authorDavid Dorwin <ddorwin@google.com>
Mon, 11 Aug 2014 17:51:50 -0700
changeset 387 673780061087
parent 386 142569561850
child 388 856c321c7a6b
[EME] Bug 26457 - Update the algorithms to not resolve the void promises with "undefined".
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Mon Aug 11 17:16:16 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Mon Aug 11 17:51:50 2014 -0700
@@ -398,7 +398,7 @@
     <p>The <dfn id="dom-setmediakeys"><code>setMediaKeys(mediaKeys</code></dfn>) method provides the <code><a href="#dom-mediakeys">MediaKeys</a></code> to use when decrypting media data during playback. It must run the following steps:</p>
     
     <ol>
-      <li><p>If <var>mediaKeys</var> and the <code><a href="#dom-attrmediakeys">mediaKeys</a></code> attribute are the same object, return a promise resolved with <code>undefined</code>.</p></li>
+      <li><p>If <var>mediaKeys</var> and the <code><a href="#dom-attrmediakeys">mediaKeys</a></code> attribute are the same object, return a resolved promise.</p></li>
       <li><p>Let <var>promise</var> be a new promise.</p></li>
       <li>
 <p>Run the following steps asynchronously:</p>
@@ -431,7 +431,7 @@
             </ol>
           </li>
           <li><p>Set the <code><a href="#dom-attrmediakeys">mediaKeys</a></code> attribute to <var>mediaKeys</var>.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -602,7 +602,7 @@
           <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in <code><a href="#dom-create">create()</a></code>.</p></li>
           <li><p>Use the <var title="true">cdm</var> to process <var>certificate</var>.</p></li>
           <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><a href="http://www.w3.org/TR/dom/#exception-domexception">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -766,7 +766,7 @@
           </li>
           <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><a href="http://www.w3.org/TR/dom/#exception-domexception">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
           <li><p>If <var title="true">request</var> is not null, run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <var title="true">session</var>, providing <var title="true">request</var> and <var title="true">destination URL</var>.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -777,7 +777,7 @@
     It must run the following steps:</p>
 
     <ol>
-      <li><p>If the <a href="#algorithms-session-close">Session Close</a> algorithm has been run on this object, return a promise fulfilled with <code>undefined</code>.</p></li>
+      <li><p>If the <a href="#algorithms-session-close">Session Close</a> algorithm has been run on this object, return a resolved promise.</p></li>
       <li><p>Let <var>promise</var> be a new promise.</p></li>
       <li>
 <p>Run the following steps asynchronously:</p>
@@ -793,7 +793,7 @@
               <li><p>If the previous step caused the session to be closed, run the <a href="#algorithms-session-close">Session Close</a> algorithm on this object.</p></li>
             </ol>
           </li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -827,7 +827,7 @@
             <ol>
               <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><a href="http://www.w3.org/TR/dom/#exception-domexception">DOMException</a></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
               <li><p>Run the <a href="#algorithms-session-close">Session Close</a> algorithm on this object.</p></li>
-              <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+              <li><p>Resolve <var>promise</var>.</p></li>
             </ol>
           </li>
         </ol>
@@ -1265,7 +1265,7 @@
       <li><p>Let the <var title="true">session</var> be the associated <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object.</p></li>
       <li><p>Remove the entry for the value of the <var title="true">session</var>'s <code><a href="#dom-sessionid">sessionId</a></code> attribute from the <var title="true">list of active session IDs</var> for the MediaKeys object that created the <var title="true">session</var>.</p></li>
       <li><p>Let <var>promise</var> be the <code><a href="#dom-closed">closed</a></code> attribute of the <var title="true">session</var>.</p></li>
-      <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+      <li><p>Resolve <var>promise</var>.</p></li>
     </ol>
 
     <h3 id="algorithms-queue-waiting">4.8. Queue a "waiting" Event</h3>
--- a/encrypted-media/encrypted-media.xml	Mon Aug 11 17:16:16 2014 -0700
+++ b/encrypted-media/encrypted-media.xml	Mon Aug 11 17:51:50 2014 -0700
@@ -388,7 +388,7 @@
     <p>The <methoddfn name="setMediaKeys">setMediaKeys(<var title="true">mediaKeys</var></methoddfn>) method provides the <coderef>MediaKeys</coderef> to use when decrypting media data during playback. It must run the following steps:</p>
     
     <ol>
-      <li><p>If <var>mediaKeys</var> and the <coderef prefix="attr">mediaKeys</coderef> attribute are the same object, return a promise resolved with <code>undefined</code>.</p></li>
+      <li><p>If <var>mediaKeys</var> and the <coderef prefix="attr">mediaKeys</coderef> attribute are the same object, return a resolved promise.</p></li>
       <li><p>Let <var>promise</var> be a new promise.</p></li>
       <li><p>Run the following steps asynchronously:</p>
         <ol>
@@ -416,7 +416,7 @@
             </ol>
           </li>
           <li><p>Set the <coderef prefix="attr">mediaKeys</coderef> attribute to <var>mediaKeys</var>.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -575,7 +575,7 @@
           <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in <methodref>create</methodref>.</p></li>
           <li><p>Use the <var title="true">cdm</var> to process <var>certificate</var>.</p></li>
           <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><dom4ref name="exception-domexception">DOMException</dom4ref></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -720,7 +720,7 @@
           </li>
           <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><dom4ref name="exception-domexception">DOMException</dom4ref></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
           <li><p>If <var title="true">request</var> is not null, run the <a href="#algorithms-queue-message">Queue a "message" Event</a> algorithm on the <var title="true">session</var>, providing <var title="true">request</var> and <var title="true">destination URL</var>.</p></li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -731,7 +731,7 @@
     It must run the following steps:</p>
 
     <ol>
-      <li><p>If the <a href="#algorithms-session-close">Session Close</a> algorithm has been run on this object, return a promise fulfilled with <code>undefined</code>.</p></li>
+      <li><p>If the <a href="#algorithms-session-close">Session Close</a> algorithm has been run on this object, return a resolved promise.</p></li>
       <li><p>Let <var>promise</var> be a new promise.</p></li>
       <li><p>Run the following steps asynchronously:</p>
         <ol>
@@ -745,7 +745,7 @@
               <li><p>If the previous step caused the session to be closed, run the <a href="#algorithms-session-close">Session Close</a> algorithm on this object.</p></li>
             </ol>
           </li>
-          <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+          <li><p>Resolve <var>promise</var>.</p></li>
         </ol>
       </li>
       <li><p>Return <var>promise</var>.</p></li>
@@ -776,7 +776,7 @@
             <ol>
               <li><p>If any of the preceding steps failed, reject <var>promise</var> with a new <code><dom4ref name="exception-domexception">DOMException</dom4ref></code> whose name is the appropriate <a href="#error-names">error name</a> and that has an appropriate message.</p></li>
               <li><p>Run the <a href="#algorithms-session-close">Session Close</a> algorithm on this object.</p></li>
-              <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+              <li><p>Resolve <var>promise</var>.</p></li>
             </ol>
           </li>
         </ol>
@@ -1245,7 +1245,7 @@
       <li><p>Let the <var title="true">session</var> be the associated <coderef>MediaKeySession</coderef> object.</p></li>
       <li><p>Remove the entry for the value of the <var title="true">session</var>'s <coderef>sessionId</coderef> attribute from the <var title="true">list of active session IDs</var> for the MediaKeys object that created the <var title="true">session</var>.</p></li>
       <li><p>Let <var>promise</var> be the <coderef>closed</coderef> attribute of the <var title="true">session</var>.</p></li>
-      <li><p>Resolve <var>promise</var> with <code>undefined</code>.</p></li>
+      <li><p>Resolve <var>promise</var>.</p></li>
     </ol>
 
     <h3 id="algorithms-queue-waiting">4.8. Queue a "waiting" Event</h3>