diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index 027b938d30df1c..0209281f942e1c 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -275,29 +275,28 @@ void StreamBase::AddMethods(Environment* env, Local t) { Local signature = Signature::New(env->isolate(), t); - // TODO(TimothyGu): None of these should have ConstructorBehavior::kAllow. Local get_fd_templ = env->NewFunctionTemplate(GetFD, signature, - v8::ConstructorBehavior::kAllow, + v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect); Local get_external_templ = env->NewFunctionTemplate(GetExternal, signature, - v8::ConstructorBehavior::kAllow, + v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect); Local get_bytes_read_templ = env->NewFunctionTemplate(GetBytesRead, signature, - v8::ConstructorBehavior::kAllow, + v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect); Local get_bytes_written_templ = env->NewFunctionTemplate(GetBytesWritten, signature, - v8::ConstructorBehavior::kAllow, + v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect); t->PrototypeTemplate()->SetAccessorProperty(env->fd_string(),