Skip to content

Commit fc13837

Browse files
legendecasBethGriggs
authored andcommitted
src: remove unused guards around node-api reference
PR-URL: #38334 Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 39e6536 commit fc13837

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/js_native_api_v8.cc

-3
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,6 @@ v8::Local<v8::Value> Reference::Get() {
627627
}
628628

629629
void Reference::Finalize(bool is_env_teardown) {
630-
if (is_env_teardown) env_teardown_finalize_started_ = true;
631-
if (!is_env_teardown && env_teardown_finalize_started_) return;
632-
633630
// During env teardown, `~napi_env()` alone is responsible for finalizing.
634631
// Thus, we don't want any stray gc passes to trigger a second call to
635632
// `RefBase::Finalize()`. ClearWeak will ensure that even if the

src/js_native_api_v8.h

-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ class Reference : public RefBase {
433433
static void SecondPassCallback(
434434
const v8::WeakCallbackInfo<SecondPassCallParameterRef>& data);
435435

436-
bool env_teardown_finalize_started_ = false;
437436
v8impl::Persistent<v8::Value> _persistent;
438437
SecondPassCallParameterRef* _secondPassParameter;
439438
bool _secondPassScheduled;

0 commit comments

Comments
 (0)