Commit 48158fb
src: stop leaking a CppHeap in CommonEnvironmentSetup
`CommonEnvironmentSetup` created a `CppHeap` for its `CreateParams`
before deciding how to create the isolate, but `NewIsolate()` ignores
`params->cpp_heap` and attaches a heap of its own (or the one from
`IsolateSettings`). The first heap was never attached or destroyed, so
every non-snapshotting setup leaked one `CppHeap`; cppgc's heap
registry keeps it reachable, which is why LSAN stays quiet about it.
Only create the heap on the snapshotting path, where the params go to
the `SnapshotCreator` directly.
Refs: #55337
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: #65792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>1 parent 75a9fa6 commit 48158fb
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
| |||
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments