diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-04-08 17:14:00 +0200 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2020-06-30 09:34:19 -0700 |
commit | f50febc73c9c978c23178fd123d58d1b08e66979 (patch) | |
tree | d1e23e873b195b3f0f8b785fc673ed295c002a66 /src/node_serdes.cc | |
parent | 7fdb507ec156b03e41be498d3b5eba314cba369f (diff) | |
download | node-new-f50febc73c9c978c23178fd123d58d1b08e66979.tar.gz |
src: introduce BaseObject base FunctionTemplate
PR-URL: https://github.com/nodejs/node/pull/33772
Backport-PR-URL: https://github.com/nodejs/node/pull/33965
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 c787721591..28844f1858 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); |