Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-04-08 18:14:00 +0300
committerAnna Henningsen <anna@addaleax.net>2020-06-14 15:53:38 +0300
commit8a7201b25fa2e5342b5d737742586bcd5ea1da5e (patch)
tree57382552b4b50d471b91ab41d19df3eeab0b67d4 /src/node_process_methods.cc
parentc17d2f99018ae48ed82a90a9eccc570ed1ae83c6 (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_process_methods.cc')
-rw-r--r--src/node_process_methods.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index d580f74478c..800ce031364 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -426,7 +426,10 @@ static void ReallyExit(const FunctionCallbackInfo<Value>& args) {
class FastHrtime : public BaseObject {
public:
static Local<Object> New(Environment* env) {
- Local<v8::ObjectTemplate> otmpl = v8::ObjectTemplate::New(env->isolate());
+ Local<v8::FunctionTemplate> ctor =
+ v8::FunctionTemplate::New(env->isolate());
+ ctor->Inherit(BaseObject::GetConstructorTemplate(env));
+ Local<v8::ObjectTemplate> otmpl = ctor->InstanceTemplate();
otmpl->SetInternalFieldCount(FastHrtime::kInternalFieldCount);
auto create_func = [env](auto fast_func, auto slow_func) {