contextify: cleanup weak ref for sandbox
Simplify how node_contextify was keeping a weak reference to the sandbox object in order to prepare for new style phantom weakness V8 API. It is simpler (and more robust) for the context to hold a reference to the sandbox in an embedder data field. Doing otherwise meant that the sandbox could become weak while the context was still alive. This wasn't a problem because we would make the reference strong at that point. Since the sandbox must live at least as long as the context, it would be better for the context to hold onto the sandbox. PR-URL: https://github.com/nodejs/node/pull/5392 Reviewed-By:Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
parent
93f60cdc
Please register or sign in to comment