Skip to content

Commit

Permalink
src: remove unused guards around node-api reference
Browse files Browse the repository at this point in the history
PR-URL: #38334
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and targos committed Sep 4, 2021
1 parent f39d93a commit 5c473bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/js_native_api_v8.cc
Expand Up @@ -627,9 +627,6 @@ v8::Local<v8::Value> Reference::Get() {
}

void Reference::Finalize(bool is_env_teardown) {
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
1 change: 0 additions & 1 deletion src/js_native_api_v8.h
Expand Up @@ -433,7 +433,6 @@ class Reference : public RefBase {
static void SecondPassCallback(
const v8::WeakCallbackInfo<SecondPassCallParameterRef>& data);

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

0 comments on commit 5c473bd

Please sign in to comment.