summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-05-20 13:14:21 +0200
committerJoyee Cheung <joyeec9h3@gmail.com>2019-06-03 17:27:48 +0200
commita1a690e07c92d209cfecb2e7725ce649287edf26 (patch)
tree87dc42011acaab55a820ef378c0bd75cf1c20388 /src/env.h
parentbda7da34c6f8edabf45623acb21a410c76a33bff (diff)
downloadandroid-node-v8-a1a690e07c92d209cfecb2e7725ce649287edf26.tar.gz
android-node-v8-a1a690e07c92d209cfecb2e7725ce649287edf26.tar.bz2
android-node-v8-a1a690e07c92d209cfecb2e7725ce649287edf26.zip
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 <anna@addaleax.net>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h2
1 files changed, 2 insertions, 0 deletions
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();