-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Change from crashed
to render-process-gone
#23132
Conversation
`crashed` is deprecated. https://github.com/electron/electron/blob/9-x-y/docs/api/web-contents.md Note: The previous code shows the error dialog on both the "killed" and "crashed" events. But now it's only "crashed"
@icecream17 Could you take a look at the lint failure on the CI? |
Lint error still exists, running |
Using the new, non-deprecated event name seems like a good idea. 👍 to the general intent of this PR. I think it might be worth reconsidering the "crashed" vs "killed" distinction, though, and run the "renderer process gone" handling regardless of the particular reason the renderer process is gone, just like this bit of code used to do. (Edit: I mean to suggest basically deleting the line (That's the short version above, long version below. You can skip the rest of this comment if you want... Sorry for the wall of text, but I tend to lean toward being more verbose and complete rather than leaving anything out.) Long version of comment, with more thoughts and details... click to expand.Despite the new name more accurately reflecting that the renderer process might be "gone" for many distinct reasons, by and large, The new event exposes more specific reasons separately, but we don't need to use that new information if we don't want to, and I have some concern we're being too eager to make use of that more granular information as of this PR. If I'm reading this new code correctly, it no-ops for all the following renderer process "goneness" reasons:
The new code only does anything on:
(Note: I don't think it's worth having the distinction and First of all, I'm not sure if no-oping and just not doing anything is safe to do in this situation? Continuing to run Atom with no renderer process? Isn't this a poorly defined app state that we should seek to quit from ASAP? Is there a point or advantage to not quitting (and not prompting the user to quit)? Have we thought it through, or is it just because the event no-longer specifically has the word And furthermore, if the process ran out of memory (reason: There might theoretically be some good, subtle uses of the various distinct |
The
crashed
event handler is deprecated, so this pr switches torender-process-gone
https://github.com/electron/electron/blob/9-x-y/docs/api/web-contents.md#event-crashed-deprecated
Note: The previous code shows the error dialog on both the "killed" and "crashed" events. But now it's only when "crashed"
Note 2: Diff without whitespace https://github.com/atom/atom/pull/23132/files?diff=split&w=1