<?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>25240</bug_id>
          
          <creation_ts>2014-04-02 21:10:24 +0000</creation_ts>
          <short_desc>Blob.close() shouldn&apos;t throw when invoked more than once.</short_desc>
          <delta_ts>2014-05-07 15:06:59 +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>File API</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="Arun">arun</reporter>
          <assigned_to name="Arun">arun</assigned_to>
          <cc>glenn</cc>
    
    <cc>public-webapps</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103297</commentid>
    <comment_count>0</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2014-04-02 21:10:24 +0000</bug_when>
    <thetext>See Bug 24576 Comment 11.

Blob.close() should, if invoked more than once, be a no-op.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103303</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2014-04-02 23:58:33 +0000</bug_when>
    <thetext>For example,

var xhr = new XMLHttpRequest();
xhr.open(&quot;GET&quot;, &quot;/foo&quot;);
xhr.onloadend = function() { blob.close(); console.log(&quot;XHR finished&quot;); }
xhr.onload = function() { finishWorking(); }
xhr.onerror = function() { blob.close(); }
xhr.send(blob);

would result in onloadend throwing and not doing anything after blob.close() on the onerror path, since onerror already closed the blob, even though it&apos;s in exactly the state the developer wanted--the blob is closed.

(The above isn&apos;t the best way to do this, of course--you should just call blob.close() immediately after xhr.send--it&apos;s just an example of something harmless being turned into a bug.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105274</commentid>
    <comment_count>2</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2014-05-07 03:06:57 +0000</bug_when>
    <thetext>Blob.close() no longer throws when invoked more than once:

http://dev.w3.org/2006/webapi/FileAPI/#close-method</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105285</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-07 07:23:12 +0000</bug_when>
    <thetext>Can you remove &quot;do nothing, since context object is already closed, and &quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105307</commentid>
    <comment_count>4</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2014-05-07 15:06:46 +0000</bug_when>
    <thetext>Done: http://dev.w3.org/2006/webapi/FileAPI/#dfn-close</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>