diff --git a/src/histogram.cc b/src/histogram.cc index 112a8911cfb4af..7e2fe102736b6e 100644 --- a/src/histogram.cc +++ b/src/histogram.cc @@ -346,7 +346,8 @@ void HistogramBase::Initialize(IsolateData* isolate_data, SetConstructorFunction(isolate_data->isolate(), target, "Histogram", - GetConstructorTemplate(isolate_data)); + GetConstructorTemplate(isolate_data), + SetConstructorFunctionFlag::NONE); } BaseObjectPtr HistogramBase::HistogramTransferData::Deserialize( @@ -372,6 +373,7 @@ Local IntervalHistogram::GetConstructorTemplate( Isolate* isolate = env->isolate(); tmpl = NewFunctionTemplate(isolate, nullptr); tmpl->Inherit(HandleWrap::GetConstructorTemplate(env)); + tmpl->SetClassName(OneByteString(isolate, "Histogram")); tmpl->InstanceTemplate()->SetInternalFieldCount( HistogramBase::kInternalFieldCount); SetProtoMethodNoSideEffect(isolate, tmpl, "count", GetCount); diff --git a/src/node_messaging.cc b/src/node_messaging.cc index ae9720a3359ced..29a48bcd5c0105 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -1495,13 +1495,16 @@ static void InitMessaging(Local target, t->Inherit(BaseObject::GetConstructorTemplate(env)); t->InstanceTemplate()->SetInternalFieldCount( JSTransferable::kInternalFieldCount); - SetConstructorFunction(context, target, "JSTransferable", t); + t->SetClassName(OneByteString(isolate, "JSTransferable")); + SetConstructorFunction( + context, target, "JSTransferable", t, SetConstructorFunctionFlag::NONE); } SetConstructorFunction(context, target, env->message_port_constructor_string(), - GetMessagePortConstructorTemplate(env)); + GetMessagePortConstructorTemplate(env), + SetConstructorFunctionFlag::NONE); // These are not methods on the MessagePort prototype, because // the browser equivalents do not provide them.