Uh oh!
There was an error while loading. Please reload this page.
tls_wrap: inherit from the AsyncWrap first - #4268
Closed
indutny wants to merge 1 commit into
Closed
Conversation
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: nodejs#4250
indutny
commented
Dec 14, 2015
MemberAuthor
indutny
commented
Dec 14, 2015
MemberAuthor
I'm not exactly sure how to test it, perhaps @bnoordhuis has some suggestions? R=@trevnorris or @bnoordhuis |
paddybyers
commented
Dec 14, 2015
Contributor
@indutny Thanks |
indutny
commented
Dec 14, 2015
MemberAuthor
CI is green |
jasnell
commented
Dec 14, 2015
Member
LGTM I am curious tho, could changing the order here potentially break anything? |
indutny
commented
Dec 14, 2015
MemberAuthor
@jasnell I don't think so. From user perspective this class is not exposed, from the core perspective all casts seems to be proper on C++ side. |
indutny
commented
Dec 14, 2015
MemberAuthor
Landed in e0bb118, thank you! |
indutny added a commit
that referenced
this pull request
Dec 14, 2015
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: #4250 PR-URL: #4268 Reviewed-By: James M Snell <jasnell@gmail.com>
paddybyers
commented
Dec 14, 2015
Contributor
Presumably it's a simple check that there's no static cast elsewhere to a |
indutny added a commit
that referenced
this pull request
Dec 15, 2015
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: #4250 PR-URL: #4268 Reviewed-By: James M Snell <jasnell@gmail.com>
Closed
indutny added a commit
that referenced
this pull request
Dec 30, 2015
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: #4250 PR-URL: #4268 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit
that referenced
this pull request
Jan 19, 2016
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: #4250 PR-URL: #4268 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
scovetta pushed a commit
to scovetta/node
that referenced
this pull request
Apr 2, 2016
`WrapperInfo` casts pointer in JS object's internal field to `AsyncWrap`. This approach fails miserably for `TLSWrap` because it was inhereted from the `StreamBase` first, creating different kind of `vtable` for the whole class. Reorder parent classes to put `AsyncWrap` first. Fix: nodejs#4250 PR-URL: nodejs#4268 Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WrapperInfocasts pointer in JS object's internal field toAsyncWrap. This approach fails miserably forTLSWrapbecause it wasinhereted from the
StreamBasefirst, creating different kind ofvtablefor the whole class.Reorder parent classes to put
AsyncWrapfirst.Fix: #4250