summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2016-04-16 03:07:25 -0600
committerTrevor Norris <trev.norris@gmail.com>2016-05-24 14:36:47 -0600
commitddc19be6de1ba263d9c175b2760696e7b9918b25 (patch)
tree4da6925cc2183cc62e4386d0ecca19b0bf0a984c /src
parente03c32696e1c429c524ccdafe47879196b3ed630 (diff)
downloadandroid-node-v8-ddc19be6de1ba263d9c175b2760696e7b9918b25.tar.gz
android-node-v8-ddc19be6de1ba263d9c175b2760696e7b9918b25.tar.bz2
android-node-v8-ddc19be6de1ba263d9c175b2760696e7b9918b25.zip
src: inherit first from AsyncWrap
To make sure casting a class of multiple inheritance from a void* to AsyncWrap succeeds make AsyncWrap the first inherited class. PR-URL: https://github.com/nodejs/node/pull/6184 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src')
-rw-r--r--src/js_stream.cc4
-rw-r--r--src/js_stream.h2
-rw-r--r--src/node_crypto.h6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/js_stream.cc b/src/js_stream.cc
index e81709a805..6ebdb5a356 100644
--- a/src/js_stream.cc
+++ b/src/js_stream.cc
@@ -22,8 +22,8 @@ using v8::Value;
JSStream::JSStream(Environment* env, Local<Object> obj, AsyncWrap* parent)
- : StreamBase(env),
- AsyncWrap(env, obj, AsyncWrap::PROVIDER_JSSTREAM, parent) {
+ : AsyncWrap(env, obj, AsyncWrap::PROVIDER_JSSTREAM, parent),
+ StreamBase(env) {
node::Wrap(obj, this);
MakeWeak<JSStream>(this);
}
diff --git a/src/js_stream.h b/src/js_stream.h
index 1a8902af46..08d1604ac5 100644
--- a/src/js_stream.h
+++ b/src/js_stream.h
@@ -8,7 +8,7 @@
namespace node {
-class JSStream : public StreamBase, public AsyncWrap {
+class JSStream : public AsyncWrap, public StreamBase {
public:
static void Initialize(v8::Local<v8::Object> target,
v8::Local<v8::Value> unused,
diff --git a/src/node_crypto.h b/src/node_crypto.h
index 01c16b39b5..28cee7a492 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -322,7 +322,7 @@ class SSLWrap {
// Connection inherits from AsyncWrap because SSLWrap makes calls to
// MakeCallback, but SSLWrap doesn't store the handle itself. Instead it
// assumes that any args.This() called will be the handle from Connection.
-class Connection : public SSLWrap<Connection>, public AsyncWrap {
+class Connection : public AsyncWrap, public SSLWrap<Connection> {
public:
~Connection() override {
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
@@ -387,8 +387,8 @@ class Connection : public SSLWrap<Connection>, public AsyncWrap {
v8::Local<v8::Object> wrap,
SecureContext* sc,
SSLWrap<Connection>::Kind kind)
- : SSLWrap<Connection>(env, sc, kind),
- AsyncWrap(env, wrap, AsyncWrap::PROVIDER_CRYPTO),
+ : AsyncWrap(env, wrap, AsyncWrap::PROVIDER_CRYPTO),
+ SSLWrap<Connection>(env, sc, kind),
bio_read_(nullptr),
bio_write_(nullptr),
hello_offset_(0) {