tls_wrap: inherit from the AsyncWrap first#4268
Closed
indutny wants to merge 1 commit intonodejs:masterfrom
Closed
tls_wrap: inherit from the AsyncWrap first#4268indutny wants to merge 1 commit intonodejs:masterfrom
AsyncWrap first#4268indutny wants to merge 1 commit intonodejs:masterfrom
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
Member
Author
Member
Author
|
I'm not exactly sure how to test it, perhaps @bnoordhuis has some suggestions? R=@trevnorris or @bnoordhuis |
Contributor
|
@indutny Thanks |
Member
Author
|
CI is green |
Member
|
LGTM I am curious tho, could changing the order here potentially break anything? |
Member
Author
|
@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. |
Member
Author
|
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>
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 free
to 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