feat(electron): add activateNow() plus fd and GC hardening - #6
Open
itsjithinv wants to merge 1 commit into
Open
Conversation
Adds restart-free activation and fixes the descriptor/GC problems that made in-session bundle swapping unsafe. - activateNow(): activates the staged update in the running process. Persists the incremented boot counter before returning, so crash accounting matches the restart path; rolls back instead of crash-looping when attempts are exhausted. Re-seats the boot snapshot that start() previously captured once, without which markHealthy() refuses to promote the newly booted update and the next launch rolls back a healthy release. - bundleUrlPredicate option: lets apps that load the staged bundle themselves (e.g. loadFile to keep a file:// origin so localStorage/IndexedDB survive) keep probation crash detection working. - Protocol handler reads files <= maxInMemoryBytes (8 MiB) instead of streaming and aborts large-file descriptors with the request, so Chromium cannot hold handles that make the bundle dir undeletable on Windows. bundleRoot may now be a function, so activation re-points it without re-registering the scheme. - GC protects every bundle served this process, retries EACCES on deletes, and logs failures instead of swallowing them. - Probation watchdog no longer stacks web-contents-created listeners. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Adds restart-free activation and fixes the descriptor/GC problems that made in-session bundle swapping unsafe.