<?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>22432</bug_id>
          
          <creation_ts>2013-06-24 02:27:58 +0000</creation_ts>
          <short_desc>Allow SourceBuffer.appendBuffer to take ownership of the ArrayBuffer</short_desc>
          <delta_ts>2013-10-11 22:33:27 +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>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>LC</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matthew Gregan [:kinetik]">kinetik</reporter>
          <assigned_to name="Aaron Colwell">acolwell</assigned_to>
          <cc>acolwell</cc>
    
    <cc>kbr</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>89739</commentid>
    <comment_count>0</comment_count>
    <who name="Matthew Gregan [:kinetik]">kinetik</who>
    <bug_when>2013-06-24 02:27:58 +0000</bug_when>
    <thetext>Require the &quot;data&quot; ArrayBuffer to be neutered during the append to allow the implementation for avoid copying the data internally and prevent races where script modifies the ArrayBuffer while it&apos;s being used internally.

Suggestion: add wording similar to that added to Web Audio&apos;s decodeAudioBuffer method: https://dvcs.w3.org/hg/audio/rev/ef43ae5230bf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94334</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2013-10-04 21:08:44 +0000</bug_when>
    <thetext>Aside from WebAudio there doesn&apos;t appear to be any other precedent for &quot;unneutering&quot; a buffer. I talked to Kenneth Russell, one of the Typed Array spec editors, last week about this request and he did not seem very supportive of adding the &quot;unneutering&quot; concept. I&apos;m happy to add text to the MSE spec explicitly pointing out that modifying the buffer while an appendBuffer() operation is pending will lead to undefined behavior. I don&apos;t think we should &quot;neuter&quot; and then &quot;unneuter&quot; during the append though since this would make all ArrayBufferViews unavailable for reading during the append.

Here is the link to the brief discussion we had on the MediaTF telecon call two weeks ago. (http://www.w3.org/2013/09/24-html-media-minutes.html#item06)

FWIW it doesn&apos;t appear like Microsoft is going to modify their implementation and at this point I don&apos;t see a large enough benefit to modify the Chromium implementation. Also Chromium doesn&apos;t currently have the ability to &quot;unneuter&quot; ArrayBuffers so it is unlikely that there is interop on this point even in the WebAudio case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94455</commentid>
    <comment_count>2</comment_count>
    <who name="Matthew Gregan [:kinetik]">kinetik</who>
    <bug_when>2013-10-08 10:22:03 +0000</bug_when>
    <thetext>My original comment was incorrect: there&apos;s no possible race because &quot;data&quot; is copied to the internal input buffer synchronously at step 3 of appendBuffer before appendBuffer reaches the asynchronous step 6, so there&apos;s no opportunity for the ArrayBuffer to mutate in parallel.

I&apos;m happy for this to be closed as invalid.  Sorry for wasting your time!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>