domain: avoid circular memory references · nodejs/node@60c5099 · GitHub
Skip to content

Commit 60c5099

Browse files
committed
domain: avoid circular memory references
Avoid circular references that the JS engine cannot see through because it involves an `async id` ⇒ `domain` link. Using weak references is not a great solution, because it increases the domain module’s dependency on internals and the added calls into C++ may affect performance, but it seems like the least bad one. PR-URL: #25993 Fixes: #23862 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 731c273 commit 60c5099

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

lib/domain.js

Lines changed: 10 additions & 3 deletions
Lines changed: 36 additions & 0 deletions

0 commit comments

Comments
 (0)