Re: [whatwg/streams] Fix queue total size tracking logic (#661)

ricea commented on this pull request.



> @@ -859,7 +859,10 @@ class ReadableStreamDefaultController {
 
     this._underlyingSource = underlyingSource;
 
-    this._queue = [];
+    // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.
+    this._queue = this._queueTotalSize = undefined;

Optional: I'd prefer not to use chained assignment. As far as I can tell the rest of the reference implementation sticks to one assignment per statement.

-- 
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/661#pullrequestreview-21672326

Received on Tuesday, 14 February 2017 03:50:28 UTC