Re: [whatwg/streams] Do not allow abort to happen when a close is about to happen (#634)

ricea commented on this pull request.

I've thought about the behaviour changes now and I like them, except for the last one I noted.

Sorry for the delay.

>        resolveClose();
-      return abortPromise.then(() => assert_false(abort_called, 'abort should not be called after close completes'));
+      return abortPromise.then(() => {
+        assert_array_equals(ws.events, ['close'], 'abort should not be called while close is pending');

close is no longer pending here. Perhaps go back to 'after close completes' wording?

>    });
-}, 'writer close() promise should resolve before abort() promise');
+}, 'writer abort() promise should fulfill before close() promise (since it bails early)');

I'm not keen on this behaviour. Usually we can rely on abort() to tell us whether the stream was cleaned up or not, but in this case we can't.

-- 
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/634#pullrequestreview-16100663

Received on Wednesday, 11 January 2017 09:58:06 UTC