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

Always use persistent handles when passing dart objects as userdata to callbacks #1491

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Jan 25, 2024

Fixes: #1492

Copy link

coveralls-official bot commented Jan 25, 2024

Pull Request Test Coverage Report for Build 7660137927

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on kn/rid-us-of-weak-handles at 87.374%

Totals Coverage Status
Change from base Build 7654644143: 87.4%
Covered Lines: 3723
Relevant Lines: 4261

💛 - Coveralls

@nielsenko
Copy link
Contributor Author

nielsenko commented Jan 25, 2024

I have not added new unit tests for this, as it needs to run fairly long in order to provoke it, and in most cases it will hang the notifications instead of crashing the process. But the re-production code is in the issue #1492.

@nielsenko nielsenko marked this pull request as ready for review January 25, 2024 20:16
Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good - is there a way to run a test to see if we leak any resources with this change? (I don't think we should but it's the kind of change that carries this risk)

@nielsenko
Copy link
Contributor Author

This looks good - is there a way to run a test to see if we leak any resources with this change? (I don't think we should but it's the kind of change that carries this risk)

We could look into using the vmService like I do here: https://gist.github.com/nielsenko/3f3cda354931d9179d1028e3df03340d.

Or perhaps better to use the fairly new leak_tracker package

I have created a separate issue for that #1494

@nielsenko nielsenko merged commit 9ab76b9 into main Jan 26, 2024
50 checks passed
@nielsenko nielsenko deleted the kn/rid-us-of-weak-handles branch January 26, 2024 12:08
nirinchev added a commit that referenced this pull request Jan 26, 2024
* main:
  Switch to integration tests (#1461)
  Always use persistent handles when passing dart objects as userdata to callbacks (#1491)

# Conflicts:
#	test/dynamic_realm_test.dart
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible crash in notification streams
2 participants