[Bug 28798] Indicate BufferSource algorithms can throw

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28798

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu> ---
Handling the exceptional cases in the binding layer is not trivial.  Consider
this function signature:

  void foo(Uint8Array array, long something)

called like so:

  var arr = new Uint8Array(5);
  var obj = { valueOf: function() { /* detach arr here */ } };
  foo(arr, obj);

You have to check for detached arr after all things that might have
side-effects have happened, basically.  In practice, the right time is when you
actually want to use the data.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Thursday, 11 June 2015 18:08:43 UTC