Skip to content

Commit

Permalink
src: remove unused guards around node-api reference
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Apr 21, 2021
1 parent 053aa6d commit e3eb194
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/js_native_api_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ class Reference : public RefBase {

protected:
inline void Finalize(bool is_env_teardown = false) override {
if (is_env_teardown) env_teardown_finalize_started_ = true;
if (!is_env_teardown && env_teardown_finalize_started_) return;

// During env teardown, `~napi_env()` alone is responsible for finalizing.
// Thus, we don't want any stray gc passes to trigger a second call to
// `RefBase::Finalize()`. ClearWeak will ensure that even if the
Expand Down Expand Up @@ -471,7 +468,6 @@ class Reference : public RefBase {
reference->Finalize();
}

bool env_teardown_finalize_started_ = false;
v8impl::Persistent<v8::Value> _persistent;
SecondPassCallParameterRef* _secondPassParameter;
};
Expand Down

0 comments on commit e3eb194

Please sign in to comment.