diff --git a/src/env-inl.h b/src/env-inl.h index 8107311ba70ca6..b27c5ec47b02bc 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -199,7 +199,7 @@ inline Environment::AsyncCallbackScope::~AsyncCallbackScope() { env_->makecallback_cntr_--; } -inline bool Environment::AsyncCallbackScope::in_makecallback() { +inline bool Environment::AsyncCallbackScope::in_makecallback() const { return env_->makecallback_cntr_ > 1; } diff --git a/src/env.h b/src/env.h index fa4b289f314e16..96bbd3ce5c9db1 100644 --- a/src/env.h +++ b/src/env.h @@ -439,7 +439,7 @@ class Environment { AsyncCallbackScope() = delete; explicit AsyncCallbackScope(Environment* env); ~AsyncCallbackScope(); - inline bool in_makecallback(); + inline bool in_makecallback() const; private: Environment* env_;