<?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>24023</bug_id>
          
          <creation_ts>2013-12-06 18:12:43 +0000</creation_ts>
          <short_desc>[Streams API] Returned promise of write() should be fulfilled with current available space size rather than how many bytes were written</short_desc>
          <delta_ts>2014-01-30 05:12:43 +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>Streams API</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="Takeshi Yoshino">tyoshino</reporter>
          <assigned_to name="Takeshi Yoshino">tyoshino</assigned_to>
          <cc>feras.moussa</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97257</commentid>
    <comment_count>0</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-12-06 18:12:43 +0000</bug_when>
    <thetext>The returned value is not useful. I made this return the number of bytes actually written so that the writer can know how many bytes were written, but what the writer is interested in is how many bytes are writable now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97261</commentid>
    <comment_count>1</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-12-06 18:31:38 +0000</bug_when>
    <thetext>What we really should do is
- consult dataSink (application specific logic) to determine how large (size, cost) a certain object is.

dataSink (possibly asynchronously) computes the cost of a certain object written to it. pendingWriteQueue is built based on that cost.

Non real application, generic consumer such as ByteStream introduced in the spec doesn&apos;t know how to compute cost for given object. So, it needs to be educated via e.g. write()&apos;s second argument as I proposed in https://www.w3.org/Bugs/Public/show_bug.cgi?id=23977 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99466</commentid>
    <comment_count>2</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2014-01-30 04:28:01 +0000</bug_when>
    <thetext>(In reply to Takeshi Yoshino from comment #1)
&gt; What we really should do is
&gt; - consult dataSink (application specific logic) to determine how large
&gt; (size, cost) a certain object is.
&gt; 
&gt; dataSink (possibly asynchronously) computes the cost of a certain object
&gt; written to it. pendingWriteQueue is built based on that cost.
&gt; 
&gt; Non real application, generic consumer such as ByteStream introduced in the
&gt; spec doesn&apos;t know how to compute cost for given object. So, it needs to be
&gt; educated via e.g. write()&apos;s second argument as I proposed in
&gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=23977 .

Pasted wrong bug. This is the right one.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24445</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99467</commentid>
    <comment_count>3</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2014-01-30 05:12:43 +0000</bug_when>
    <thetext>(In reply to Takeshi Yoshino from comment #2)
&gt; (In reply to Takeshi Yoshino from comment #1)
&gt; &gt; What we really should do is
&gt; &gt; - consult dataSink (application specific logic) to determine how large
&gt; &gt; (size, cost) a certain object is.
&gt; &gt; 
&gt; &gt; dataSink (possibly asynchronously) computes the cost of a certain object
&gt; &gt; written to it. pendingWriteQueue is built based on that cost.
&gt; &gt; 
&gt; &gt; Non real application, generic consumer such as ByteStream introduced in the
&gt; &gt; spec doesn&apos;t know how to compute cost for given object. So, it needs to be
&gt; &gt; educated via e.g. write()&apos;s second argument as I proposed in
&gt; &gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=23977 .
&gt; 
&gt; Pasted wrong bug. This is the right one.
&gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=24445

This comment is just a mistake. Please ignore.

Anyway, as https://www.w3.org/Bugs/Public/show_bug.cgi?id=24445 is changing the role of the Promise returned by the write() method, this bug is obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>