Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix indentation
  • Loading branch information
jure committed Dec 14, 2017
commit ebbe147f8b787c7d75d8c4513fc8f3665a970470
41 changes: 20 additions & 21 deletions src/stream_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,25 @@ void StreamBase::AddMethods(Environment* env,
static_cast<PropertyAttribute>(
v8::ReadOnly | v8::DontDelete | v8::DontEnum);

Local<Signature> signature =
Signature::New(env->isolate(), t);

Local<FunctionTemplate> get_fd_templ = FunctionTemplate::New(
env->isolate(),
GetFD<Base>,
Local<Value>(),
signature);

Local<FunctionTemplate> get_external_templ = FunctionTemplate::New(
env->isolate(),
GetExternal<Base>,
Local<Value>(),
signature);

Local<FunctionTemplate> get_bytes_read = FunctionTemplate::New(
env->isolate(),
GetBytesRead<Base>,
Local<Value>(),
signature);
Local<Signature> signature = Signature::New(env->isolate(), t);

Local<FunctionTemplate> get_fd_templ =
FunctionTemplate::New(env->isolate(),
GetFD<Base>,
Local<Value>(),
signature);

Local<FunctionTemplate> get_external_templ =
FunctionTemplate::New(env->isolate(),
GetExternal<Base>,
Local<Value>(),
signature);

Local<FunctionTemplate> get_bytes_read_templ =
FunctionTemplate::New(env->isolate(),
GetBytesRead<Base>,
Local<Value>(),
signature);

t->PrototypeTemplate()->SetAccessorProperty(env->fd_string(),
get_fd_templ,
Expand All @@ -67,7 +66,7 @@ void StreamBase::AddMethods(Environment* env,
attributes);

t->PrototypeTemplate()->SetAccessorProperty(env->bytes_read_string(),
get_bytes_read,
get_bytes_read_templ,
Local<FunctionTemplate>(),
attributes);

Expand Down