Re: [whatwg/streams] add @@asyncIterator to ReadableStreamDefaultReader (#950)

TimothyGu commented on this pull request.



> +    if (typeof O !== 'object') {
+      throw new TypeError();
+    }
+    const reader = O._reader;
+    const read = reader.read;
+    return read.call(reader);
+  },
+  return() {
+    const O = this;
+    if (typeof O !== 'object') {
+      throw new TypeError();
+    }
+    if (O._cancel === true) {
+      const reader = O._reader;
+      const cancel = reader.cancel;
+      cancel.call(reader);

This does not implement [GetMethod](https://tc39.github.io/ecma262/#sec-getmethod) fully. Additionally I'd prefer using `Reflect.apply()`.

-- 
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/950#pullrequestreview-148201192

Received on Tuesday, 21 August 2018 18:53:15 UTC