summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stream_base-inl.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h
index 027b938d30..0209281f94 100644
--- a/src/stream_base-inl.h
+++ b/src/stream_base-inl.h
@@ -275,29 +275,28 @@ void StreamBase::AddMethods(Environment* env, Local<FunctionTemplate> t) {
Local<Signature> signature = Signature::New(env->isolate(), t);
- // TODO(TimothyGu): None of these should have ConstructorBehavior::kAllow.
Local<FunctionTemplate> get_fd_templ =
env->NewFunctionTemplate(GetFD<Base>,
signature,
- v8::ConstructorBehavior::kAllow,
+ v8::ConstructorBehavior::kThrow,
v8::SideEffectType::kHasNoSideEffect);
Local<FunctionTemplate> get_external_templ =
env->NewFunctionTemplate(GetExternal<Base>,
signature,
- v8::ConstructorBehavior::kAllow,
+ v8::ConstructorBehavior::kThrow,
v8::SideEffectType::kHasNoSideEffect);
Local<FunctionTemplate> get_bytes_read_templ =
env->NewFunctionTemplate(GetBytesRead<Base>,
signature,
- v8::ConstructorBehavior::kAllow,
+ v8::ConstructorBehavior::kThrow,
v8::SideEffectType::kHasNoSideEffect);
Local<FunctionTemplate> get_bytes_written_templ =
env->NewFunctionTemplate(GetBytesWritten<Base>,
signature,
- v8::ConstructorBehavior::kAllow,
+ v8::ConstructorBehavior::kThrow,
v8::SideEffectType::kHasNoSideEffect);
t->PrototypeTemplate()->SetAccessorProperty(env->fd_string(),