Fix ViewTarget is garbage collected during actions tracking#2608
Merged
Conversation
ambushwork
force-pushed
the
yl/fix-action-tracking-flaky
branch
4 times, most recently
from
April 18, 2025 09:18
6d435ac to
0168d7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2608 +/- ##
===========================================
+ Coverage 69.98% 70.04% +0.06%
===========================================
Files 819 819
Lines 30559 30566 +7
Branches 5120 5128 +8
===========================================
+ Hits 21386 21409 +23
+ Misses 7731 7725 -6
+ Partials 1442 1432 -10
🚀 New features to boost your workflow:
|
ambushwork
marked this pull request as ready for review
April 18, 2025 09:56
satween
reviewed
Apr 21, 2025
satween
reviewed
Apr 21, 2025
mariusc83
requested changes
Apr 22, 2025
ambushwork
force-pushed
the
yl/fix-action-tracking-flaky
branch
from
April 22, 2025 11:14
0168d7d to
03eb126
Compare
jonathanmos
previously approved these changes
Apr 22, 2025
mariusc83
previously approved these changes
Apr 22, 2025
ambushwork
force-pushed
the
yl/fix-action-tracking-flaky
branch
from
April 23, 2025 08:39
03eb126 to
cd47cfd
Compare
0xnm
approved these changes
Apr 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Prior to this PR, we were using
WeakReferenceonViewTarget, sinceViewTargetis a local variable only in the scope offindTargetfunction, after execution, there will be zero reference of it, and if GC occurs, the object inWeakReferencewill be cleaned.The correct way is that we should use strong reference of
ViewTarget, but insideViewTargetwe hold weakReference ofView.Also a dedicated GC unit test is added to cover this case.
Review checklist (to be filled by reviewers)