Skip to content

Commit

Permalink
squash! squash! src: move Environment::context out of strong properties
Browse files Browse the repository at this point in the history
s/TEMPLATE/TEMPLATES/
  • Loading branch information
joyeecheung committed May 1, 2019
1 parent 392c619 commit a4255cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1106,13 +1106,13 @@ void AsyncRequest::set_stopped(bool flag) {
inline void Environment::set_ ## PropertyName(v8::Local<TypeName> value) { \
PropertyName ## _.Reset(isolate(), value); \
}
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATE(V)
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V)
ENVIRONMENT_STRONG_PERSISTENT_VALUES(V)
#undef V

inline v8::Local<v8::Context> Environment::context() const {
return PersistentToLocal::Strong(context_);
}
inline v8::Local<v8::Context> Environment::context() const {
return PersistentToLocal::Strong(context_);
}
} // namespace node

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
Expand Down
6 changes: 3 additions & 3 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
V(x_forwarded_string, "x-forwarded-for") \
V(zero_return_string, "ZERO_RETURN")

#define ENVIRONMENT_STRONG_PERSISTENT_TEMPLATE(V) \
#define ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V) \
V(as_callback_data_template, v8::FunctionTemplate) \
V(async_wrap_ctor_template, v8::FunctionTemplate) \
V(async_wrap_object_ctor_template, v8::FunctionTemplate) \
Expand Down Expand Up @@ -1060,7 +1060,7 @@ class Environment : public MemoryRetainer {
inline v8::Local<TypeName> PropertyName() const; \
inline void set_ ## PropertyName(v8::Local<TypeName> value);
ENVIRONMENT_STRONG_PERSISTENT_VALUES(V)
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATE(V)
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V)
#undef V

inline v8::Local<v8::Context> context() const;
Expand Down Expand Up @@ -1295,7 +1295,7 @@ class Environment : public MemoryRetainer {

#define V(PropertyName, TypeName) v8::Global<TypeName> PropertyName ## _;
ENVIRONMENT_STRONG_PERSISTENT_VALUES(V)
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATE(V)
ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V)
#undef V

v8::Global<v8::Context> context_;
Expand Down

0 comments on commit a4255cc

Please sign in to comment.