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

fix(lazy): avoid crash on using mocked instance after real one loaded #606

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Aug 11, 2023

When using lazy: true, It was possible for someone to hold a reference to a mocked Sentry object after the real Sentry has loaded and call a method on the mocked instance which caused a crash. Make this case not crash by updating mocked methods to redirect to the real instance.

@tomlewis0

@github-actions
Copy link

github-actions bot commented Aug 11, 2023

size-limit report 📦

Path Size
fixture: base 372.55 KB (0%)
fixture: lazy 377.14 KB (+0.04% 🔺)
fixture: tracing 391.9 KB (0%)
fixture: lazy+tracing 396.48 KB (+0.04% 🔺)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant