}
inline Environment::IsolateData::IsolateData(v8::Isolate* isolate)
- : event_loop_(uv_default_loop())
- , isolate_(isolate)
+ : event_loop_(uv_default_loop()),
+ isolate_(isolate),
#define V(PropertyName, StringValue) \
- , PropertyName ## _index_( \
- FIXED_ONE_BYTE_STRING(isolate, StringValue).Eternalize(isolate))
+ PropertyName ## _index_( \
+ FIXED_ONE_BYTE_STRING(isolate, StringValue).Eternalize(isolate)),
PER_ISOLATE_STRING_PROPERTIES(V)
#undef V
- , ref_count_(0) {
+ ref_count_(0) {
}
inline uv_loop_t* Environment::IsolateData::event_loop() const {
}
inline Environment::Environment(v8::Local<v8::Context> context)
- : isolate_(context->GetIsolate())
- , isolate_data_(IsolateData::GetOrCreate(context->GetIsolate()))
- , using_smalloc_alloc_cb_(false)
- , using_domains_(false)
- , context_(context->GetIsolate(), context) {
+ : isolate_(context->GetIsolate()),
+ isolate_data_(IsolateData::GetOrCreate(context->GetIsolate())),
+ using_smalloc_alloc_cb_(false),
+ using_domains_(false),
+ context_(context->GetIsolate(), context) {
// We'll be creating new objects so make sure we've entered the context.
v8::Context::Scope context_scope(context);
v8::HandleScope handle_scope(isolate());
HandleWrap::HandleWrap(Environment* env,
Handle<Object> object,
uv_handle_t* handle)
- : env_(env)
- , flags_(0)
- , handle__(handle) {
+ : env_(env),
+ flags_(0),
+ handle__(handle) {
handle__->data = this;
HandleScope scope(node_isolate);
persistent().Reset(node_isolate, object);
public:
explicit ContextifyContext(Environment* env, Local<Object> sandbox)
- : env_(env)
- , sandbox_(env->isolate(), sandbox)
- , context_(env->isolate(), CreateV8Context(env))
- , proxy_global_(env->isolate(), context()->Global())
+ : env_(env),
+ sandbox_(env->isolate(), sandbox),
+ context_(env->isolate(), CreateV8Context(env)),
+ proxy_global_(env->isolate(), context()->Global()),
// Wait for sandbox_, proxy_global_, and context_ to die
- , references_(3) {
+ references_(3) {
sandbox_.MakeWeak(this, WeakCallback);
sandbox_.MarkIndependent();
context_.MakeWeak(this, WeakCallback);
static void SetTicketKeys(const v8::FunctionCallbackInfo<v8::Value>& args);
SecureContext(Environment* env, v8::Local<v8::Object> wrap)
- : WeakObject(env->isolate(), wrap)
- , ca_store_(NULL)
- , ctx_(NULL)
- , env_(env) {
+ : WeakObject(env->isolate(), wrap),
+ ca_store_(NULL),
+ ctx_(NULL),
+ env_(env) {
}
void FreeCTXMem() {
};
SSLWrap(Environment* env, SecureContext* sc, Kind kind)
- : env_(env)
- , kind_(kind)
- , next_sess_(NULL)
- , session_callbacks_(false) {
+ : env_(env),
+ kind_(kind),
+ next_sess_(NULL),
+ session_callbacks_(false) {
ssl_ = SSL_new(sc->ctx_);
assert(ssl_ != NULL);
}
v8::Local<v8::Object> wrap,
SecureContext* sc,
SSLWrap<Connection>::Kind kind)
- : SSLWrap<Connection>(env, sc, kind)
- , WeakObject(env->isolate(), wrap)
- , bio_read_(NULL)
- , bio_write_(NULL)
- , hello_offset_(0) {
+ : SSLWrap<Connection>(env, sc, kind),
+ WeakObject(env->isolate(), wrap),
+ bio_read_(NULL),
+ bio_write_(NULL),
+ hello_offset_(0) {
hello_parser_.Start(SSLWrap<Connection>::OnClientHello,
OnClientHelloParseEnd,
this);
CipherBase(v8::Isolate* isolate,
v8::Local<v8::Object> wrap,
CipherKind kind)
- : WeakObject(isolate, wrap)
- , cipher_(NULL)
- , initialised_(false)
- , kind_(kind) {
+ : WeakObject(isolate, wrap),
+ cipher_(NULL),
+ initialised_(false),
+ kind_(kind) {
}
~CipherBase() {
static void HmacDigest(const v8::FunctionCallbackInfo<v8::Value>& args);
Hmac(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
- : WeakObject(isolate, wrap)
- , md_(NULL)
- , initialised_(false) {
+ : WeakObject(isolate, wrap),
+ md_(NULL),
+ initialised_(false) {
}
~Hmac() {
static void HashDigest(const v8::FunctionCallbackInfo<v8::Value>& args);
Hash(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
- : WeakObject(isolate, wrap)
- , md_(NULL)
- , initialised_(false) {
+ : WeakObject(isolate, wrap),
+ md_(NULL),
+ initialised_(false) {
}
~Hash() {
static void SignFinal(const v8::FunctionCallbackInfo<v8::Value>& args);
Sign(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
- : WeakObject(isolate, wrap)
- , md_(NULL)
- , initialised_(false) {
+ : WeakObject(isolate, wrap),
+ md_(NULL),
+ initialised_(false) {
}
~Sign() {
static void VerifyFinal(const v8::FunctionCallbackInfo<v8::Value>& args);
Verify(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
- : WeakObject(isolate, wrap)
- , md_(NULL)
- , initialised_(false) {
+ : WeakObject(isolate, wrap),
+ md_(NULL),
+ initialised_(false) {
}
~Verify() {
static void SetPrivateKey(const v8::FunctionCallbackInfo<v8::Value>& args);
DiffieHellman(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
- : WeakObject(isolate, wrap)
- , initialised_(false)
- , dh(NULL) {
+ : WeakObject(isolate, wrap),
+ initialised_(false),
+ dh(NULL) {
}
~DiffieHellman() {
class FSReqWrap: public ReqWrap<uv_fs_t> {
public:
FSReqWrap(Environment* env, const char* syscall, char* data = NULL)
- : ReqWrap<uv_fs_t>(env)
- , syscall_(syscall)
- , data_(data) {
+ : ReqWrap<uv_fs_t>(env),
+ syscall_(syscall),
+ data_(data) {
}
void ReleaseEarly() {
class Parser : public WeakObject {
public:
Parser(Environment* env, Local<Object> wrap, enum http_parser_type type)
- : WeakObject(env->isolate(), wrap)
- , env_(env)
- , current_buffer_len_(0)
- , current_buffer_data_(NULL) {
+ : WeakObject(env->isolate(), wrap),
+ env_(env),
+ current_buffer_len_(0),
+ current_buffer_data_(NULL) {
Init(type);
}
StatWatcher::StatWatcher(Environment* env, Local<Object> wrap)
- : WeakObject(env->isolate(), wrap)
- , watcher_(new uv_fs_poll_t)
- , env_(env) {
+ : WeakObject(env->isolate(), wrap),
+ watcher_(new uv_fs_poll_t),
+ env_(env) {
uv_fs_poll_init(env->event_loop(), watcher_);
watcher_->data = static_cast<void*>(this);
}
public:
ZCtx(Environment* env, Local<Object> wrap, node_zlib_mode mode)
- : WeakObject(env->isolate(), wrap)
- , chunk_size_(0)
- , dictionary_(NULL)
- , dictionary_len_(0)
- , env_(env)
- , err_(0)
- , flush_(0)
- , init_done_(false)
- , level_(0)
- , memLevel_(0)
- , mode_(mode)
- , strategy_(0)
- , windowBits_(0)
- , write_in_progress_(false)
- , refs_(0) {
+ : WeakObject(env->isolate(), wrap),
+ chunk_size_(0),
+ dictionary_(NULL),
+ dictionary_len_(0),
+ env_(env),
+ err_(0),
+ flush_(0),
+ init_done_(false),
+ level_(0),
+ memLevel_(0),
+ mode_(mode),
+ strategy_(0),
+ windowBits_(0),
+ write_in_progress_(false),
+ refs_(0) {
}
StreamWrap::StreamWrap(Environment* env,
Local<Object> object,
uv_stream_t* stream)
- : HandleWrap(env, object, reinterpret_cast<uv_handle_t*>(stream))
- , stream_(stream)
- , default_callbacks_(this)
- , callbacks_(&default_callbacks_) {
+ : HandleWrap(env, object, reinterpret_cast<uv_handle_t*>(stream)),
+ stream_(stream),
+ default_callbacks_(this),
+ callbacks_(&default_callbacks_) {
}
class WriteWrap: public ReqWrap<uv_write_t> {
public:
WriteWrap(Environment* env, v8::Local<v8::Object> obj, StreamWrap* wrap)
- : ReqWrap<uv_write_t>(env, obj)
- , wrap_(wrap) {
+ : ReqWrap<uv_write_t>(env, obj),
+ wrap_(wrap) {
}
void* operator new(size_t size, char* storage) { return storage; }
SendWrap::SendWrap(Environment* env,
Local<Object> req_wrap_obj,
bool have_callback)
- : ReqWrap<uv_udp_send_t>(env, req_wrap_obj)
- , have_callback_(have_callback) {
+ : ReqWrap<uv_udp_send_t>(env, req_wrap_obj),
+ have_callback_(have_callback) {
}
'the base class list in a class definition, the colon should '
'be on the following line.')
+ if len(line) > initial_spaces and line[initial_spaces] == ',':
+ error(filename, linenum, 'whitespace/commafirst', 4,
+ 'Comma-first style is not allowed')
# Check if the line is a header guard.
is_header_guard = False