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: crashed events deprecation #40090

Merged
merged 1 commit into from Oct 5, 2023
Merged

fix: crashed events deprecation #40090

merged 1 commit into from Oct 5, 2023

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Oct 4, 2023

Description of Change

Regressed by https://github.com/electron/electron/pull/33557/files#diff-ee83fd1a162a48cfe0ee8849a859f6d6700ceb6aa2bdee23b875d8941620c7c6

renderer-process-crashed event

app.on('renderer-process-crashed', (event, wc, killed) => {
  console.log('app: renderer-process-crashed', wc.id, killed)
})

app.on('render-process-gone', (event, wc, details) => {
  console.log('app: render-process-gone', wc.id, details)
})

mainWindow.webContents.on('crashed', (event, killed) => {
  console.log('webContents: crashed', killed)
})

mainWindow.webContents.on('render-process-gone', (event, details) => {
  console.log('webContents: render-process-gone', details)
})

before:

app: renderer-process-crashed 1 true
webContents: crashed true
app: renderer-process-crashed 1 { reason: 'killed', exitCode: 2 }
app: render-process-gone 1 { reason: 'killed', exitCode: 2 }
(electron) 'renderer-process-crashed event' is deprecated and will be removed. Please use 'render-process-gone event' instead.
webContents: render-process-gone { reason: 'killed', exitCode: 2 }

after:

(electron) 'crashed event' is deprecated and will be removed. Please use 'render-process-gone event' instead.
webContents: crashed true
(electron) 'renderer-process-crashed event' is deprecated and will be removed. Please use 'render-process-gone event' instead.
app: renderer-process-crashed 1 true
app: render-process-gone 1 { reason: 'killed', exitCode: 2 }
webContents: render-process-gone { reason: 'killed', exitCode: 2 }

gpu-process-crashed event

app.on('gpu-process-crashed', (event, killed) => {
  console.log('app: gpu-process-crashed', killed)
})

app.on('child-process-gone', (event, details) => {
  console.log('app: child-process-gone', details)
})

before:

(electron) 'gpu-process-crashed event' is deprecated and will be removed. Please use 'child-process-gone event' instead.
app: gpu-process-crashed { type: 'GPU', reason: 'killed', exitCode: 9, serviceName: 'GPU' }
app: child-process-gone { type: 'GPU', reason: 'killed', exitCode: 9, serviceName: 'GPU' }
app: gpu-process-crashed true

after:

(electron) 'gpu-process-crashed event' is deprecated and will be removed. Please use 'child-process-gone event' instead.
app: child-process-gone { type: 'GPU', reason: 'killed', exitCode: 9, serviceName: 'GPU' }
app: gpu-process-crashed true

Checklist

Release Notes

Notes: Fixed deprecated gpu-process-crashed / renderer-process-crashed events being emitted twice and with incorrect arguments.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 4, 2023
@miniak miniak self-assigned this Oct 4, 2023
@miniak miniak 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 4, 2023
@miniak miniak force-pushed the miniak/fix-crashed-warnings branch from e511820 to bb4e45a Compare October 4, 2023 16:20
@miniak miniak marked this pull request as ready for review October 4, 2023 16:20
@miniak miniak force-pushed the miniak/fix-crashed-warnings branch from bb4e45a to 8a483e8 Compare October 4, 2023 16:38
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 5, 2023
@jkleinsc jkleinsc merged commit 83a928f into main Oct 5, 2023
18 checks passed
@jkleinsc jkleinsc deleted the miniak/fix-crashed-warnings branch October 5, 2023 23:57
@release-clerk
Copy link

release-clerk bot commented Oct 5, 2023

Release Notes Persisted

Fixed deprecated gpu-process-crashed / renderer-process-crashed events being emitted twice and with incorrect arguments.

@trop
Copy link
Contributor

trop bot commented Oct 5, 2023

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

@trop
Copy link
Contributor

trop bot commented Oct 5, 2023

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

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

trop bot commented Oct 5, 2023

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

@trop
Copy link
Contributor

trop bot commented Oct 5, 2023

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

@trop trop bot added in-flight/26-x-y in-flight/25-x-y 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. target/25-x-y PR should also be added to the "25-x-y" branch. labels Oct 5, 2023
@miniak
Copy link
Contributor Author

miniak commented Oct 6, 2023

/trop run backport-to 22-x-y

@trop
Copy link
Contributor

trop bot commented Oct 6, 2023

The backport process for this PR has been manually initiated - sending your PR to 22-x-y!

@trop trop bot mentioned this pull request Oct 6, 2023
@trop
Copy link
Contributor

trop bot commented Oct 6, 2023

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

@trop trop bot added the in-flight/22-x-y label Oct 6, 2023
@trop trop bot added merged/22-x-y PR was merged to the "22-x-y" branch. merged/25-x-y PR was merged to the "25-x-y" branch. 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. and removed in-flight/22-x-y in-flight/25-x-y in-flight/26-x-y in-flight/27-x-y labels Oct 6, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/22-x-y PR was merged to the "22-x-y" branch. 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.

None yet

4 participants