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 committed Jul 14, 2021
1 parent 7de8ec5 commit c6a2077
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 c6a2077

Please sign in to comment.