Repository navigation
refactor: webContents managed by cppgc - #53757
Merged
deepak1556 merged 12 commits intoSep 21, 2026
Merged
Conversation
deepak1556
force-pushed
the
robo/cppgc_web_contents
branch
from
September 9, 2026 13:51
3fb63fe to
bb905e2
Compare
MarshallOfSound
left a comment
Member
There was a problem hiding this comment.
Two crashes inline, both reproduced on this branch: will-destroy / destroyed listeners at quit now run after Session has torn down, and a collected Debugger can still receive CDP messages before its finalizer detaches it. The destroyed / WeakPtr crash from #53755 is also still reachable here.
deepak1556
force-pushed
the
robo/cppgc_web_contents
branch
from
September 18, 2026 07:58
6e990ce to
8c67f1c
Compare
deepak1556
marked this pull request as ready for review
September 18, 2026 22:19
ckerr
force-pushed
the
robo/cppgc_web_contents
branch
from
September 18, 2026 23:01
c462f13 to
c4b30c7
Compare
6 tasks done
ckerr
reviewed
Sep 19, 2026
Move api::WebContents onto the cppgc managed gin::Wrappable, so the wrapper participates in unified heap tracing instead of being pinned and deleted by hand. NativeLifecycle now holds a weak link into the GC heap, registers a dispose observer to drain native resources before isolate shutdown, and is deleted in a follow up task so native teardown never runs during sweeping.
Retain the Debugger until native target teardown so the detach event remains observable, without capturing the WebContents in the listener closure. Avoid polling WeakRefs during forced collection because deref() keeps the target alive until the end of the current V8 job.
Register setEventEmitterPrototype as a direct method instead of converting a base callback through TranslatorHolder. The linked binding can remain reachable until isolate shutdown, where V8 does not guarantee weak callback execution, leaving the native holder allocated.
Route DevToolsAgentHost callbacks through a native proxy that holds a weak cppgc reference to the debugger wrapper.
Store guest embedders as weak cppgc references so attached guests do not retain their embedders and native resources indefinitely. Guard later embedder access and keep the guest delegate's native embedder reference weak. Handle a cleared WebContents WeakCell when queued printToPDF jobs start after the WebContents has been destroyed, rejecting instead of dereferencing null.
deepak1556
force-pushed
the
robo/cppgc_web_contents
branch
from
September 20, 2026 17:57
c4b30c7 to
fb72590
Compare
4 of 6 tasks
MarshallOfSound
approved these changes
Sep 21, 2026
|
No Release Notes |
3 tasks done
1 of 3 tasks
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.
Description of Change
Refs #47922
Release Notes
Notes: none