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

bugfix: multiple shadow threads rendered at the same time, small prob… #1

Merged
merged 1 commit into from
Aug 7, 2021

Conversation

chenmo187
Copy link
Owner

…ability crash.

Background:
on the Tab Page, every tab has a React Page. If the React page is not using the same ReactInstanceManager, multiple shadow threads will be generated.
A crash can occur when multiple pages are rendered at the same time.

Reasons of issue: PropSetter class VIEW_MGR_ARGS, VIEW_MGR_GROUP_ARGS, SHADOW_ARGS, SHADOW_GROUP_ARGS is static.
one shadow put data in static array, it was changed by another shadow thread before method invoke.

The solution:
use ThreadLocal instead of static array.

Summary

Changelog

[CATEGORY] [TYPE] - Message

Test Plan

…ability crash.

Background: 
on the Tab Page, every tab has a React Page. If the React page is not using the same ReactInstanceManager, multiple shadow threads will be generated.
A crash can occur when multiple pages are rendered at the same time.

Reasons of issue: PropSetter class VIEW_MGR_ARGS, VIEW_MGR_GROUP_ARGS, SHADOW_ARGS, SHADOW_GROUP_ARGS is static. 
one shadow put data in static array, it was changed by another shadow thread before method invoke.

The solution:
use ThreadLocal instead of static array.
@chenmo187 chenmo187 merged commit 1e2f888 into main Aug 7, 2021
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