Skip to content

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

Merged
NathanWalker merged 4 commits into
NativeScript:mainfrom
CatchABus:ios-page-parent-unset
Oct 23, 2023
Merged

NathanWalker merged 4 commits into
NativeScript:mainfrom
CatchABus:ios-page-parent-unset

Conversation

@CatchABus

@CatchABus CatchABus commented Oct 20, 2023 •

Copy link
Copy Markdown
Contributor

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