Skip to content

Implement base::Lock for event targets. #6429

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yjzhang111
Copy link
Contributor

@yjzhang111 yjzhang111 commented Jul 15, 2025

Bug: 420931375

There are two theories around this crash, 1) there's a race condition between firing event listeners and adding/removing them. 2) it occurs during page teardown when event handlers are destroyed but UMA is still trying to fire the event handler and upload payloads.

This PR adds a lock implementation to tackle the race condition and checks for execution context in H5vcc metrics to prevent UMA metrics upload when during page teardown.

@yjzhang111 yjzhang111 marked this pull request as ready for review July 16, 2025 20:06
@yjzhang111 yjzhang111 requested a review from a team as a code owner July 16, 2025 20:06
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