<?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>21427</bug_id>
          
          <creation_ts>2013-03-28 18:00:06 +0000</creation_ts>
          <short_desc>Futures: use thenable</short_desc>
          <delta_ts>2013-03-28 18:56:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</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="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>d</cc>
    
    <cc>mike</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85114</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-03-28 18:00:06 +0000</bug_when>
    <thetext>In http://dom.spec.whatwg.org/#concept-resolver-resolve add this for when the branding check fails:

* Let /then/ be null.
* If /value/ is a JavaScript object, set /then/ to the result of invoking /value/&apos;s [[Get]] internal method for &quot;then&quot;.
* If that throws an exception, invoke resolver&apos;s reject with the thrown exception and terminate steps.
* If [[IsCallable]] /then/, run substeps: ... setup callbacks and invoke /then/.

Now because this change resolver&apos;s resolvers can be invoked several times. So http://dom.spec.whatwg.org/#concept-resolver needs to account for that by checking and setting the resolved flag.

(Now we could see if there&apos;s some additional refactoring possible and we could even do away with the branding check altogether, but changing that would complicate the definition of then().)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85116</commentid>
    <comment_count>1</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2013-03-28 18:31:46 +0000</bug_when>
    <thetext>&gt; Now because this change resolver&apos;s resolvers can be invoked several times.

This is already true, I think, because of future initialization. E.g.

  new Future(({ resolve, reject }) =&gt; {
    resolve(1);
    throw 2;
  });</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85118</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-03-28 18:56:01 +0000</bug_when>
    <thetext>https://github.com/whatwg/dom/commit/77c556982412383cf27653bbbeb41c620aee62ee

Thanks, sorry about raising stress levels. Just doing my best ;-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>