<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26678</bug_id>
          
          <creation_ts>2014-08-26 22:46:15 +0000</creation_ts>
          <short_desc>MediaKeySession.generateRequest() should not fail if callable is false</short_desc>
          <delta_ts>2014-08-26 23:56:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Encrypted Media Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Pearce">cpearce</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>cpearce</cc>
    
    <cc>ddorwin</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110650</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Pearce">cpearce</who>
    <bug_when>2014-08-26 22:46:15 +0000</bug_when>
    <thetext>The spec for MediaKeySession.generateRequest() is:

&lt;quote&gt;

The generateRequest(initDataType, initData) method creates a new MediaKeySession object for the initData. It must run the following steps:

The contents of initData are container-specific Initialization Data. initDataType is the initialization data type that indicates how to interpret initData.

    If this object&apos;s callable value is false, return a promise rejected with a new DOMException whose name is &quot;InvalidStateError&quot;.

&lt;/quote&gt;

callable is set to true after the request is sent.

https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#dom-generaterequest

Since generateRequest() is the only thing that sets callable to true, and it aborts if callable is false, nothing else will ever set callable to true, so no function will be usable.

I think this must be a copy-paste error, and the &quot;If this object&apos;s callable value is false&quot; step should be removed from generateRequest().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110653</commentid>
    <comment_count>1</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-08-26 23:53:56 +0000</bug_when>
    <thetext>&quot;uninitialized&quot; was mistakenly replaced with &quot;callable&quot; when I as adding this step to the other methods. The line should be as follows, which matches load():
&apos;If this object&apos;s uninitialized value is false, return a promise rejected with a new DOMException whose name is &quot;InvalidStateError&quot;.&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110654</commentid>
    <comment_count>2</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-08-26 23:56:42 +0000</bug_when>
    <thetext>Fixed in https://dvcs.w3.org/hg/html-media/rev/c9a7c05b70c6. Thanks for catching that!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>