From 6f02f159216f4791e1d397aaddcbdb4dbcfd29d1 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sun, 21 Apr 2019 22:15:07 +0800 Subject: src: move Environment::context out of strong properties Rename `ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES` to `ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES`, and move `context` out of the list, so that the data can be iterated separately. PR-URL: https://github.com/nodejs/node/pull/27430 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: Refael Ackermann --- src/env-inl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/env-inl.h') diff --git a/src/env-inl.h b/src/env-inl.h index 36f8506baf..9e10cb2414 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -1106,10 +1106,13 @@ void AsyncRequest::set_stopped(bool flag) { inline void Environment::set_ ## PropertyName(v8::Local value) { \ PropertyName ## _.Reset(isolate(), value); \ } - ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) + ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V) ENVIRONMENT_STRONG_PERSISTENT_VALUES(V) #undef V + inline v8::Local Environment::context() const { + return PersistentToLocal::Strong(context_); + } } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -- cgit v1.2.3