-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
util: fix deprecated class prototype #8105
Conversation
Ensure the wrapped class prototype is exactly the unwrapped class prototype, rather than an object whose prototype is the unwrapped class prototype. This ensures that instances of the unwrapped class are instances of the wrapped class. This is useful when both a wrapped class and a factory for the unwrapped class are both exposed. Ref: nodejs#8103
LGTM if CI is happy: https://ci.nodejs.org/job/node-test-commit/4570/ |
LGTM. Thoughts on whether this should land in v6? |
seems good for v6/v4 to me |
LGTM |
Ensure the wrapped class prototype is exactly the unwrapped class prototype, rather than an object whose prototype is the unwrapped class prototype. This ensures that instances of the unwrapped class are instances of the wrapped class. This is useful when both a wrapped class and a factory for the unwrapped class are both exposed. Ref: #8103 PR-URL: #8105 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 249bb8d |
Ensure the wrapped class prototype is exactly the unwrapped class prototype, rather than an object whose prototype is the unwrapped class prototype. This ensures that instances of the unwrapped class are instances of the wrapped class. This is useful when both a wrapped class and a factory for the unwrapped class are both exposed. Ref: #8103 PR-URL: #8105 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
@bengl would you be willing to backport to v4? |
Sure. That just means a new PR against Are there docs on backporting procedure? |
@bengl Yes, sounds about right to me. What I’m usually doing is branching off
I don’t think so but it might be helpful, yeah. |
A backporting doc is a really good idea. |
@thealphanerd this PR/commit depends on 320f433 which uses Unless there's a way of re-implementing 320f433 without using |
switching to don't land for now. Added note to other PR thread. Thanks @bengl |
@bengl @thealphanerd However, the If those are acceptable, I'll open a PR :) |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
util
Description of change
Ensure the wrapped class prototype is exactly the unwrapped class
prototype, rather than an object whose prototype is the unwrapped
class prototype.
This ensures that instances of the unwrapped class are instances
of the wrapped class. This is useful when both a wrapped class and
a factory for the unwrapped class are both exposed.
Ref: #8103