Skip to content

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

Merged
codebytere merged 1 commit into
mainfrom
fix-loadurl-crash
Oct 10, 2023
Merged

codebytere merged 1 commit into
mainfrom
fix-loadurl-crash

Conversation

@codebytere

Copy link
Copy Markdown
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 recently label Oct 9, 2023
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Oct 10, 2023
@codebytere
codebytere merged commit 86df4db into main Oct 10, 2023
@codebytere
codebytere deleted the fix-loadurl-crash branch October 10, 2023 10:46
@release-clerk

release-clerk Bot commented Oct 10, 2023

Copy link
Copy Markdown

Release Notes Persisted

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

@trop

trop Bot commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

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

trop Bot commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

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/27-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 <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
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 <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
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