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 a portal unmounting crash for renderers with distinct Instance and Container #13220

Merged
merged 4 commits into from Jul 17, 2018

Conversation

Titozzz
Copy link
Contributor

@Titozzz Titozzz commented Jul 16, 2018

CurrentParent will now be considered as a container node and other renderer than web won't crash when unmounting

this PR follows this one on the React-native repo facebook/react-native#20233

fixes facebook/react-native#19084

Before that change, currentParent is not set as a container even if it should so it break on react-native and probably other custom renderers
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon gaearon changed the title Fix Portal unmount Fix a portal unmounting crash for renderers with distinct Instance and Container Jul 17, 2018
@gaearon
Copy link
Collaborator

gaearon commented Jul 17, 2018

Thanks. This looks good. I pushed some regression tests that would have caught it.

@pull-bot
Copy link

pull-bot commented Jul 17, 2018

Details of bundled changes.

Comparing: fd410f4...bbf2931

react-noop-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-noop-renderer.development.js +12.1% +4.5% 20.69 KB 23.2 KB 5.09 KB 5.32 KB NODE_DEV
react-noop-renderer.production.min.js 🔺+11.8% 🔺+4.3% 7.76 KB 8.67 KB 2.88 KB 3 KB NODE_PROD
react-noop-renderer-persistent.development.js +12.1% +4.5% 20.81 KB 23.32 KB 5.1 KB 5.33 KB NODE_DEV
react-noop-renderer-persistent.production.min.js 🔺+11.8% 🔺+4.4% 7.78 KB 8.7 KB 2.89 KB 3.01 KB NODE_PROD

Generated by 🚫 dangerJS

@gaearon gaearon merged commit 21ac62c into facebook:master Jul 17, 2018
@gaearon
Copy link
Collaborator

gaearon commented Jul 17, 2018

Thanks! Can't exactly say when this will land in RN, but you can probably expect it to appear in the next stable release (or the one after that).

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

Successfully merging this pull request may close these issues.

(undocumented) RN.createPortal works but leaves fiber tree in weird state
4 participants