-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix updating DataView length when backing buffer is resized #990
Conversation
Somewhat surprised 262 didn't catch this. Am I being too naive or is this it? |
Yours might be the better fix but I took a different approach in #989 because the ECMA spec language is woolly enough that I'm not sure if what you're doing here is legal. And no, there are no test262 tests that cover this (or at least, I haven't been able to find them.) |
Interesting! If i'm reading this right, with your PR the |
Yeah, and updating is sensible behavior, but common sense never stopped TC39 before, so 🤷 Note how your change breaks a number of DataView tests, although maybe that's simply because they expect RangeErrors instead of a TypeErrors, or vice versa. |
What's your take? I don't have a strong opinion :-) If you think yours is the better fix I'm happy to close this. |
If you can get the tests to pass, your way is probably better. Aligning with what other engines do would be good. |
Alright, I'll give that a try! |
I think I got it. The problem is we need to differentiate between the We currently don't, and updating the length will be dependent on that. I'll try to get it fixed tonight. |
99ef20d
to
e78334c
Compare
@bnoordhuis Updated, PTAL! I also incorporated your test. |
e78334c
to
558c4ce
Compare
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: #988