diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-12-14 08:58:37 +0300 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-12-14 23:47:32 +0300 |
commit | e0bb118a1d5f8b6b1eb2405f2dc19b8118f8ec0e (patch) | |
tree | 8c273642c24490a640ef18b07cc2924472e84d9b /src/tls_wrap.h | |
parent | d3c498b1b7ab12d81b78a3b6ce71a508c3e1740c (diff) |
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>
Diffstat (limited to 'src/tls_wrap.h')
-rw-r--r-- | src/tls_wrap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tls_wrap.h b/src/tls_wrap.h index 47cbf27fe28..31d19523a62 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -21,9 +21,9 @@ namespace crypto { class SecureContext; } -class TLSWrap : public crypto::SSLWrap<TLSWrap>, - public StreamBase, - public AsyncWrap { +class TLSWrap : public AsyncWrap, + public crypto::SSLWrap<TLSWrap>, + public StreamBase { public: ~TLSWrap() override; |