Skip to content

Conversation

Saadnajmi
Copy link
Collaborator

Backport of #2448 to 0.78-stable

… called (microsoft#2448)

## Summary:

We've had a recurring bug where `RCTDevLoadingView` stick around
blocking the whole app even after it's dismissed. As far as I can tell,
this is a race condition where we have multiple devloadingviews at once
(each setting and nilling the same `self->_window` property), which is
causing a race condition. Rather than figure out how to make this class
only ever show one window or race-safe, for now I will just make sure to
dismiss _all_ sheets when `hide` is called.

While we're at it, a couple of other changes:
1. Change the type from `NSPanel` to `NSWindow`. Panels don't release
when closed, which may be causing them to stick around longer than we
like
2. Move the iOS only variable `mainWindow` into the iOS ifdef, and
remove the diffs and diff tag around it.

## Test Plan:

Initial testing shows RNTester no longer getting blocked. It could still
happen (race conditions are hard), but I think the change is safe to add
regardless.
@Saadnajmi Saadnajmi requested a review from a team as a code owner April 9, 2025 00:00
@Saadnajmi Saadnajmi merged commit c695eb6 into microsoft:0.78-stable Apr 9, 2025
10 checks passed
@Saadnajmi Saadnajmi deleted the panels-78 branch April 9, 2025 00:52
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.

2 participants