From a1a690e07c92d209cfecb2e7725ce649287edf26 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 20 May 2019 13:14:21 +0200 Subject: src: create Environment properties in Environment::CreateProperties() Move creation of `env->as_callback_data()`, `env->primordials()` and `env->process()` into `Environment::CreateProperties()` and call it in the `Environment` constructor - this can be replaced with deserialization when we snapshot the per-environment properties after the instantiation of `Environment`. PR-URL: https://github.com/nodejs/node/pull/27539 Reviewed-By: Anna Henningsen --- src/env.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/env.h') diff --git a/src/env.h b/src/env.h index d067d67e1c..778f0aa1e2 100644 --- a/src/env.h +++ b/src/env.h @@ -796,6 +796,8 @@ class Environment : public MemoryRetainer { bool IsRootNode() const override { return true; } void MemoryInfo(MemoryTracker* tracker) const override; + void CreateProperties(); + inline size_t async_callback_scope_depth() const; inline void PushAsyncCallbackScope(); inline void PopAsyncCallbackScope(); -- cgit v1.2.3