Commit bfff07b4 authored by Ali Ijaz Sheikh's avatar Ali Ijaz Sheikh Committed by Rod Vagg
Browse files

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: default avatarReviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
parent 93f60cdc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment