Skip to content

fix(core): Page frame reference not unset on native view disposal #10417

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
merged 4 commits into from
Oct 23, 2023

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Oct 20, 2023

PR Checklist

What is the current behavior?

There is currently an issue on Svelte Native that's related to HMR removing page elements and throwing exception.
The reason is that even though _removeView unsets page parent, the page still keeps reference of parent using property _frame and parent Frame happens to check that property when trying to dispose entry views in Core.

What is the new behavior?

This change will ensure page won't keep any reference to parent after disposal. Doing so helps avoid calling _removeView multiple times.
More specifically, it ends up meddling with the following check:
https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/frame/frame-common.ts#L201

Fixes #10361 halfnelson/svelte-native#347

@cla-bot cla-bot bot added the cla: yes label Oct 20, 2023
@CatchABus CatchABus marked this pull request as draft October 21, 2023 00:18
@CatchABus CatchABus marked this pull request as ready for review October 21, 2023 01:31
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.

iOS Simulator Crash on HMR updates
2 participants