Browse Source

src: make in_makecallback() getter const

PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
canary-base
Anna Henningsen 7 years ago
parent
commit
be6d807bbf
No known key found for this signature in database GPG Key ID: 9C63F3A6CD2AD8F9
  1. 2
      src/env-inl.h
  2. 2
      src/env.h

2
src/env-inl.h

@ -223,7 +223,7 @@ inline Environment::AsyncCallbackScope::~AsyncCallbackScope() {
env_->makecallback_cntr_--; env_->makecallback_cntr_--;
} }
inline bool Environment::AsyncCallbackScope::in_makecallback() { inline bool Environment::AsyncCallbackScope::in_makecallback() const {
return env_->makecallback_cntr_ > 1; return env_->makecallback_cntr_ > 1;
} }

2
src/env.h

@ -463,7 +463,7 @@ class Environment {
AsyncCallbackScope() = delete; AsyncCallbackScope() = delete;
explicit AsyncCallbackScope(Environment* env); explicit AsyncCallbackScope(Environment* env);
~AsyncCallbackScope(); ~AsyncCallbackScope();
inline bool in_makecallback(); inline bool in_makecallback() const;
private: private:
Environment* env_; Environment* env_;

Loading…
Cancel
Save