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

WECA-1218: wait for empty JS call stack before calling view command #110

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RyanCommits
Copy link
Contributor

Currently there is an existing bug within React Native that causes a race condition in iOS where the view command is executed before their views are mounted, causing view commands to fail.

We seek to minimize this issue by wrapping view command execution with a setTimeout that will wait until the JS call stack is empty before executing the view command, which serves to give view mounting a chance to finish before view commands are called.

There is a possibility of privacy leakage since it's possible that our view scan may read masked values after the view is mounted, but before the view command is called. However, doing a stress test with a scenario where we create 1000 views with each button tap did not result in accidental text value capture in the flatbuffer. (session)

Under normal usage, we hope that this workaround will be robust enough to support code-first privacy rules while React Native works the solution.

  • This PR also extracts the native command logic into a separate file.

@RyanCommits RyanCommits marked this pull request as draft December 3, 2024 17:44
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.

3 participants