@@ -275,29 +275,28 @@ void StreamBase::AddMethods(Environment* env, Local<FunctionTemplate> t) {
275
275
276
276
Local<Signature> signature = Signature::New (env->isolate (), t);
277
277
278
- // TODO(TimothyGu): None of these should have ConstructorBehavior::kAllow.
279
278
Local<FunctionTemplate> get_fd_templ =
280
279
env->NewFunctionTemplate (GetFD<Base>,
281
280
signature,
282
- v8::ConstructorBehavior::kAllow ,
281
+ v8::ConstructorBehavior::kThrow ,
283
282
v8::SideEffectType::kHasNoSideEffect );
284
283
285
284
Local<FunctionTemplate> get_external_templ =
286
285
env->NewFunctionTemplate (GetExternal<Base>,
287
286
signature,
288
- v8::ConstructorBehavior::kAllow ,
287
+ v8::ConstructorBehavior::kThrow ,
289
288
v8::SideEffectType::kHasNoSideEffect );
290
289
291
290
Local<FunctionTemplate> get_bytes_read_templ =
292
291
env->NewFunctionTemplate (GetBytesRead<Base>,
293
292
signature,
294
- v8::ConstructorBehavior::kAllow ,
293
+ v8::ConstructorBehavior::kThrow ,
295
294
v8::SideEffectType::kHasNoSideEffect );
296
295
297
296
Local<FunctionTemplate> get_bytes_written_templ =
298
297
env->NewFunctionTemplate (GetBytesWritten<Base>,
299
298
signature,
300
- v8::ConstructorBehavior::kAllow ,
299
+ v8::ConstructorBehavior::kThrow ,
301
300
v8::SideEffectType::kHasNoSideEffect );
302
301
303
302
t->PrototypeTemplate ()->SetAccessorProperty (env->fd_string (),
0 commit comments