Repository navigation
fix: crash in gin::PerIsolateData::NotifyDisposed when a session is created during quit - #52924
Merged
Conversation
…reated during quit (#52836) * fix: unregister isolate dispose observers in their destructors Session, GlobalShortcut and AutoUpdater add themselves as gin::PerIsolateData::DisposeObserver on construction but only removed themselves from inside OnBeforeMicrotasksRunnerDispose. An instance created after that notification has run (for example from a webContents 'destroyed' handler that fires during exit cleanup) stayed in the observer list, was finalized together with the cppgc heap inside v8::Isolate::Dispose(), and the NotifyDisposed() pass that follows then walked a freed CheckedObserver and hit its CHECK. Remove the observer in the destructor instead, which covers both the notified and the late-created case, and make Session::Dispose() key on browser_context_ rather than keep_alive_ (persistents are already cleared when finalizers run at heap teardown) so a late session also drops its DownloadManager observer before the browser context goes away. * fix: notify isolate dispose observers after CleanedUpAtExit cleanup Send OnBeforeMicrotasksRunnerDispose from JavascriptEnvironment::DestroyMicrotasksRunner() once DoCleanup() has run, instead of from gin's WillDestroyMicrotasksRunner() before it, so that observers created by JS running during cleanup are notified and unregister themselves like the rest. This replaces unregistering Session, GlobalShortcut and AutoUpdater in their destructors. Co-authored-by: Shelley Vohr <[email protected]>
Merged
4 tasks done
MarshallOfSound
enabled auto-merge (squash)
August 18, 2026 00:03
MarshallOfSound
approved these changes
Aug 18, 2026
MarshallOfSound
deleted the
trop/44-x-y-bp-fix-crash-in-gin-perisolatedata-notifydisposed-when-a-session-is-created-during-quit-1787002947542
branch
August 18, 2026 00:03
|
Release Notes Persisted
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #52836
See that PR for details.
Notes: Fixed a possible main process crash at quit when a session was created from JavaScript that runs during shutdown.