Re: [whatwg/streams] Invoking methods should not call .apply() (#613)

I noticed that the Chrome implementations had this bug. I considered adding Chrome-specific tests for it, but I concluded that if other browsers implemented streams in Javascript they might have the same issue.[1]

Having added a web platform test I then needed to make the reference implementation pass it. I can modify the commit message to emphasize the added tests and just mention that the reference implementation passes.

I think for polyfills it's expected that you can tweak their behaviour by replacing the implementation of Promise, etc., and the same applies to the reference implementation.

The place where I personally draw the line is that the reference implementation should be robust against bad input but not against poisoning the global scope.

[1] Although I just checked Firefox's in-progress implementation and they don't have this bug. Actually, they appear to have a check in their parser to prevent this whole class of bugs: https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/Parser.cpp#8475

-- 
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/613#issuecomment-260853080

Received on Wednesday, 16 November 2016 04:46:33 UTC