tls_wrap: inherit from the `AsyncWrap` first
authorFedor Indutny <fedor@indutny.com>
Mon, 14 Dec 2015 05:58:37 +0000 (00:58 -0500)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:24 +0000 (11:52 -0800)
commit5b695d0343d12ef70e5d629601140213efb43d39
treec341bf64910a0e75c1d757e43f679ac5f2c7aafc
parent03e9495cc270d3167a9ecc83c3516b45ab825239
tls_wrap: inherit from the `AsyncWrap` first

`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: https://github.com/nodejs/node/issues/4250
PR-URL: https://github.com/nodejs/node/pull/4268
Reviewed-By: James M Snell <jasnell@gmail.com>
src/tls_wrap.cc
src/tls_wrap.h