diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-04-08 18:14:00 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-06-14 15:53:38 +0300 |
commit | 8a7201b25fa2e5342b5d737742586bcd5ea1da5e (patch) | |
tree | 57382552b4b50d471b91ab41d19df3eeab0b67d4 /src/node_serdes.cc | |
parent | c17d2f99018ae48ed82a90a9eccc570ed1ae83c6 (diff) |
src: introduce BaseObject base FunctionTemplate
PR-URL: https://github.com/nodejs/node/pull/33772
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'src/node_serdes.cc')
-rw-r--r-- | src/node_serdes.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_serdes.cc b/src/node_serdes.cc index c7877215911..28844f1858f 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -451,6 +451,7 @@ void Initialize(Local<Object> target, ser->InstanceTemplate()->SetInternalFieldCount( SerializerContext::kInternalFieldCount); + ser->Inherit(BaseObject::GetConstructorTemplate(env)); env->SetProtoMethod(ser, "writeHeader", SerializerContext::WriteHeader); env->SetProtoMethod(ser, "writeValue", SerializerContext::WriteValue); @@ -478,6 +479,7 @@ void Initialize(Local<Object> target, des->InstanceTemplate()->SetInternalFieldCount( DeserializerContext::kInternalFieldCount); + des->Inherit(BaseObject::GetConstructorTemplate(env)); env->SetProtoMethod(des, "readHeader", DeserializerContext::ReadHeader); env->SetProtoMethod(des, "readValue", DeserializerContext::ReadValue); |