Skip to content
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

fix: crash when calling non-reentrant function in loadURL #40143

Merged
merged 1 commit into from Oct 10, 2023

Conversation

codebytere
Copy link
Member

Description of Change

Closes #19847.
Refs http://crbug.com/347742.

Handles an issue where calling loadURL during some webContents url loading events could crash.

There are a few possible ways to handle this, as outlined in #19847 (comment) - I decided to take the path of simply failing to load if we're currently in a non-reentrant loadURL function.

This crash was happening because it's not safe to start a new navigation or otherwise discard the current one while the call that started it is still on the stack. When this happens, we can see use-after-frees, which Chrome preemptively handles with CHECKs.

Checklist

Release Notes

Notes: Fixed an issue where calling loadURL during some webContents url loading events could crash.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/24-x-y PR should also be added to the "24-x-y" branch. target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. labels Oct 9, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 9, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 10, 2023
@codebytere codebytere merged commit 86df4db into main Oct 10, 2023
18 checks passed
@codebytere codebytere deleted the fix-loadurl-crash branch October 10, 2023 10:46
@release-clerk
Copy link

release-clerk bot commented Oct 10, 2023

Release Notes Persisted

Fixed an issue where calling loadURL during some webContents url loading events could crash.

@trop
Copy link
Contributor

trop bot commented Oct 10, 2023

I have automatically backported this PR to "24-x-y", please check out #40160

@trop trop bot added in-flight/24-x-y and removed target/24-x-y PR should also be added to the "24-x-y" branch. labels Oct 10, 2023
@trop
Copy link
Contributor

trop bot commented Oct 10, 2023

I have automatically backported this PR to "25-x-y", please check out #40161

@trop
Copy link
Contributor

trop bot commented Oct 10, 2023

I have automatically backported this PR to "27-x-y", please check out #40162

@trop
Copy link
Contributor

trop bot commented Oct 10, 2023

I have automatically backported this PR to "26-x-y", please check out #40163

@trop trop bot added in-flight/27-x-y and removed target/25-x-y PR should also be added to the "25-x-y" branch. labels Oct 10, 2023
@trop trop bot added in-flight/26-x-y merged/24-x-y PR was merged to the "24-x-y" branch merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/25-x-y PR was merged to the "25-x-y" branch. and removed target/27-x-y PR should also be added to the "27-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. in-flight/24-x-y in-flight/26-x-y in-flight/27-x-y in-flight/25-x-y labels Oct 10, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
sfoster1 added a commit to Opentrons/opentrons that referenced this pull request Jan 31, 2024
…omponents,labware-designer): update Electron version to v27.0.0 (#14314)

Update Electron version 27.0.0
https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline

This is the latest version of electron that does not include electron/electron#40143 which breaks the ability of the ODD to load content.

This PR also includes Nodejs update because of Electron v27's requirement.

The more recent nodejs requires some new options; specifically, webpack dev servers must serve on ipv6 wildcards, and internally in the shell we need to prefer v4 dns. We also need to use old openssl.

---------

Co-authored-by: Brent Hagen <brent.hagen@opentrons.com>
Co-authored-by: Seth Foster <seth@opentrons.com>
ncdiehl11 pushed a commit to Opentrons/opentrons that referenced this pull request Feb 1, 2024
…omponents,labware-designer): update Electron version to v27.0.0 (#14314)

Update Electron version 27.0.0
https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline

This is the latest version of electron that does not include electron/electron#40143 which breaks the ability of the ODD to load content.

This PR also includes Nodejs update because of Electron v27's requirement.

The more recent nodejs requires some new options; specifically, webpack dev servers must serve on ipv6 wildcards, and internally in the shell we need to prefer v4 dns. We also need to use old openssl.

---------

Co-authored-by: Brent Hagen <brent.hagen@opentrons.com>
Co-authored-by: Seth Foster <seth@opentrons.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/24-x-y PR was merged to the "24-x-y" branch merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: loadURL after did-start-loading crashes electron
2 participants