Skip to content

[0.63] Fix native modules not being re-initialized on reload (#6159) #6176

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

Merged
1 commit merged into from
Oct 7, 2020

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Oct 2, 2020

When calling ReactNativeHost::ReloadInstance(), ReactPackageProviders are not reiterated and thus not calling
AddAttributedModules(). As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.

Microsoft Reviewers: Open in CodeFlow

@tido64 tido64 requested a review from a team as a code owner October 2, 2020 21:05
@tido64
Copy link
Member Author

tido64 commented Oct 2, 2020

cc @vmoroz, @acoates-ms

@tido64 tido64 force-pushed the backport-native-module-reinit-fix branch 2 times, most recently from 9a08fd3 to 811a5d6 Compare October 2, 2020 21:14
@dannyvv
Copy link
Member

dannyvv commented Oct 5, 2020

Looks like this code is already in master and this is the port to 0.63. Adding the appropriate tag for triage.

@dannyvv dannyvv requested a review from NickGerleman October 5, 2020 15:29
@acoates-ms acoates-ms changed the title Fix native modules not being re-initialized on reload (#6159) [0.63] Fix native modules not being re-initialized on reload (#6159) Oct 5, 2020
@tido64 tido64 force-pushed the backport-native-module-reinit-fix branch from 586fa80 to 073f378 Compare October 6, 2020 18:29
When calling `ReactNativeHost::ReloadInstance()`,
`ReactPackageProvider`s are not reiterated and thus not calling
`AddAttributedModules()`. As a consequence, the native modules that were
loaded the first time the app was loaded, no longer "exist" after
a reload.
@tido64 tido64 force-pushed the backport-native-module-reinit-fix branch from 073f378 to e7b9341 Compare October 7, 2020 15:35
@tido64
Copy link
Member Author

tido64 commented Oct 7, 2020

@acoates-ms, @NickGerleman, @vmoroz: Could you please take another look? Finally got all the checks to pass.

@NickGerleman
Copy link
Contributor

@acoates-ms you were of the opinion this one was severe enough to be backported, right?

@chrisglein @asklar @kmelmon @Khalef1 any concerns backporting this?

@Khalef1
Copy link
Contributor

Khalef1 commented Oct 7, 2020

@acoates-ms you were of the opinion this one was severe enough to be backported, right?

@chrisglein @asklar @kmelmon @Khalef1 any concerns backporting this?

No concerns on my side for backporting

@acoates-ms
Copy link
Contributor

Yes we should take this.

@NickGerleman NickGerleman added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Oct 7, 2020
@ghost
Copy link

ghost commented Oct 7, 2020

Hello @NickGerleman!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit cefc50b into microsoft:0.63-stable Oct 7, 2020
@tido64 tido64 deleted the backport-native-module-reinit-fix branch October 7, 2020 20:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants