<?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>25902</bug_id>
          
          <creation_ts>2014-05-28 04:29:55 +0000</creation_ts>
          <short_desc>[EME] Don&apos;t use Date for MediaKeySession.expiration</short_desc>
          <delta_ts>2014-06-24 21:39:07 +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>All</rep_platform>
          <op_sys>All</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>bzbarsky</cc>
    
    <cc>ddorwin</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
    
    <cc>watsonm</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>106882</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Pearce">cpearce</who>
    <bug_when>2014-05-28 04:29:55 +0000</bug_when>
    <thetext>Having MediaKeySession.expiration return a Date is a bad idea.

There&apos;s a big thread at https://www.w3.org/Bugs/Public/show_bug.cgi?id=22824 about why Date is bad, but the short of it is that if you have a Date-valued attribute it will return a new Date object every single time you do the get.  This means that you get things like:

  if (foo.expired == foo.expired) // Always tests false!

So how about making the expiration the number of milliseconds since the Unix epoch after which the license expires? This can then be passed into a JavaScript Date() constructor if desired.

NaN can be returned when the expiration is not known.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106923</commentid>
    <comment_count>1</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-05-28 17:26:21 +0000</bug_when>
    <thetext>Are you proposing to use UnrestrictedDouble?
UnsignedLongLong would also work (the Date() constructor takes an integer) but would not support NaN.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106925</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-05-28 17:43:09 +0000</bug_when>
    <thetext>&quot;unrestricted double&quot; would work here, yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108302</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-06-24 21:39:07 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/html-media/rev/78799a7b0a9d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>