-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer: don't abort on prototype getters #3302
Conversation
Accessing prototype properties directly on a typed array will throw. So do an extra check in Buffer's own getters to verify it is being called on an instance. Fixes: nodejs#3297
LGTM |
1 similar comment
LGTM |
Thanks. Landed on e97dae5 |
Isn't this a major change? Behaviour is not backward compatible, right? Earlier we used to throw and we don't now. |
@thefourtheye This was a bug from the change to using typed arrays. |
If you take notice of the change, we didn't remove an exception. It was throwing because of bad access to a typed array property. |
@trevnorris ... should this land in v4.x? ... nm... looking at it, there's no reason why not :-) |
landed in v4.x in 5479562 |
Ah, fine then. Thanks for clarifying :-) |
Accessing prototype properties directly on a typed array will throw. So
do an extra check in Buffer's own getters to verify it is being called
on an instance.
Fixes: #3297
R=@Fishrock123 ?
CI: https://ci.nodejs.org/job/node-test-pull-request/468/