Re: [whatwg/streams] Always transfer given ArrayBuffer in ReadableByteStreamControllerPullInto (#753)

domenic commented on this pull request.



> @@ -101,7 +101,19 @@ exports.PromiseInvokeOrPerformFallback = (O, P, args, F, argsF) => {
 };
 
 // Not implemented correctly
-exports.TransferArrayBuffer = O => O.slice();
+exports.TransferArrayBuffer = O => {
+  const transferredIshVersion = O.slice();
+
+  // This is specifically to fool tests that test "is transferred" by taking a non-zero-length
+  // ArrayBuffer and checking if its byteLength starts returning 0.
+  Object.defineProperty(O, "byteLength", {
+    get() {
+      return 0;
+    }
+  });

Wait until you see what I'm going to tack onto this PR for solving #751...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/753#discussion_r139110880

Received on Friday, 15 September 2017 10:05:43 UTC