Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove unused guards around node-api reference #38334

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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