contextify: tie lifetimes of context & sandbox · nodejs/node@c5d8369 · GitHub
Skip to content

Commit c5d8369

Browse files
ofrobotsMyles Borins
authored andcommitted
contextify: tie lifetimes of context & sandbox
When the previous set of changes (bfff07b) it was possible to have the context get garbage collected while sandbox was still live. We need to tie the lifetime of the context to the lifetime of the sandbox. This is a backport of #5786 to v5.x. Ref: #5786 PR-URL: #5800 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 0cac777 commit c5d8369

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/node_contextify.cc

Lines changed: 10 additions & 0 deletions

test/parallel/test-vm-create-and-run-in-context.js

Lines changed: 9 additions & 0 deletions

0 commit comments

Comments
 (0)