diff --git a/src/env-inl.h b/src/env-inl.h index 9d369d492c1cd1..da8ca222b3361f 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -186,20 +186,20 @@ inline void Environment::AsyncHooks::clear_async_id_stack() { inline Environment::AsyncHooks::DefaultTriggerAsyncIdScope ::DefaultTriggerAsyncIdScope(Environment* env, double default_trigger_async_id) - : async_id_fields_ref_(env->async_hooks()->async_id_fields()) { + : async_hooks_(env->async_hooks()) { if (env->async_hooks()->fields()[AsyncHooks::kCheck] > 0) { CHECK_GE(default_trigger_async_id, 0); } old_default_trigger_async_id_ = - async_id_fields_ref_[AsyncHooks::kDefaultTriggerAsyncId]; - async_id_fields_ref_[AsyncHooks::kDefaultTriggerAsyncId] = + async_hooks_->async_id_fields()[AsyncHooks::kDefaultTriggerAsyncId]; + async_hooks_->async_id_fields()[AsyncHooks::kDefaultTriggerAsyncId] = default_trigger_async_id; } inline Environment::AsyncHooks::DefaultTriggerAsyncIdScope ::~DefaultTriggerAsyncIdScope() { - async_id_fields_ref_[AsyncHooks::kDefaultTriggerAsyncId] = + async_hooks_->async_id_fields()[AsyncHooks::kDefaultTriggerAsyncId] = old_default_trigger_async_id_; } diff --git a/src/env.h b/src/env.h index a85058f895a4d8..e2aec13764b139 100644 --- a/src/env.h +++ b/src/env.h @@ -487,7 +487,7 @@ class Environment { ~DefaultTriggerAsyncIdScope(); private: - AliasedBuffer async_id_fields_ref_; + AsyncHooks* async_hooks_; double old_default_trigger_async_id_; DISALLOW_COPY_AND_ASSIGN(DefaultTriggerAsyncIdScope);