Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Conversation

@sergiou87
Copy link
Contributor

1.63 introduced a regression on the File -> Open… menu because Electron 10-11 changed how v8 snapshot files are named on macOS: they now have a x86_64 or arm64 suffix depending on the platform they're built for.

Due to that the getDefaultPath function in the main process doesn't have a valid value for the global atom variable, which is actually set from that snapshot.

It is not really necessary, since the main process cannot access any of the editor stuff, so that function could just remove undefined and that's it. However we wanted to make sure we used the snapshot file as it improves the launch time of the app.

Props to @niik for finding out the reason behind this obscure bug, I didn't even know Electron could do this v8 snapshot magic 😂 👏

@sergiou87 sergiou87 requested a review from niik November 22, 2022 16:01
@sergiou87 sergiou87 merged commit 1c3bd35 into master Nov 22, 2022
@sergiou87 sergiou87 deleted the fix-snapshot-result-macos branch November 22, 2022 16:12
sergiou87 added a commit that referenced this pull request Nov 22, 2022
Fix `File` -> `Open…` menu on macOS
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants