(vee-eight-4.9) contextify: update deprecated SetWeak usage#5392
Closed
ofrobots wants to merge 4 commits intonodejs:vee-eight-4.9from
Closed
(vee-eight-4.9) contextify: update deprecated SetWeak usage#5392ofrobots wants to merge 4 commits intonodejs:vee-eight-4.9from
ofrobots wants to merge 4 commits intonodejs:vee-eight-4.9from
Conversation
3 tasks
src/node_contextify.cc
Outdated
Member
There was a problem hiding this comment.
You can drop the explicit keyword and put everything on one line.
1d60f7a to
7d7aed8
Compare
Cleanup how node_contextify keeps weak references in order to prepare for new style phantom weakness API. We didn't need to keep a weak reference to the context's global proxy, as the context holds it.
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.
7d7aed8 to
fd21188
Compare
Contributor
Author
|
CI: https://ci.nodejs.org/job/node-test-pull-request/1749/. This is ready for review. |
Member
|
LGTM |
ofrobots
added a commit
that referenced
this pull request
Feb 26, 2016
Cleanup how node_contextify keeps weak references in order to prepare for new style phantom weakness API. We didn't need to keep a weak reference to the context's global proxy, as the context holds it. PR-URL: #5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
ofrobots
added a commit
that referenced
this pull request
Feb 26, 2016
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: #5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
ofrobots
added a commit
that referenced
this pull request
Feb 26, 2016
PR-URL: #5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
ofrobots
added a commit
that referenced
this pull request
Feb 26, 2016
PR-URL: #5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Contributor
Author
|
Thanks. Landed on |
4 tasks
ofrobots
added a commit
to ofrobots/node
that referenced
this pull request
Mar 1, 2016
Cleanup how node_contextify keeps weak references in order to prepare for new style phantom weakness API. We didn't need to keep a weak reference to the context's global proxy, as the context holds it. PR-URL: nodejs#5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
ofrobots
added a commit
to ofrobots/node
that referenced
this pull request
Mar 1, 2016
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: nodejs#5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
ofrobots
added a commit
to ofrobots/node
that referenced
this pull request
Mar 1, 2016
PR-URL: nodejs#5392 Reviewed-By: Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Contributor
|
A fix for the regression in v5.9.0 has just landed and will be included in v5.9.1 Let's wait some more to see if this ends up working as expected |
Contributor
Author
|
I would also be good to wait for more feedback on #3113 before backporting to LTS. |
Contributor
Contributor
Author
|
Sure thing. I will put together a PR for |
rvagg
pushed a commit
to rvagg/io.js
that referenced
this pull request
May 20, 2016
Cleanup how node_contextify keeps weak references in order to prepare for new style phantom weakness API. We didn't need to keep a weak reference to the context's global proxy, as the context holds it. PR-URL: nodejs#5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg
pushed a commit
to rvagg/io.js
that referenced
this pull request
May 20, 2016
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: nodejs#5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg
pushed a commit
to rvagg/io.js
that referenced
this pull request
May 20, 2016
PR-URL: nodejs#5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg
pushed a commit
to rvagg/io.js
that referenced
this pull request
May 20, 2016
PR-URL: nodejs#5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins
pushed a commit
that referenced
this pull request
May 20, 2016
Cleanup how node_contextify keeps weak references in order to prepare for new style phantom weakness API. We didn't need to keep a weak reference to the context's global proxy, as the context holds it. PR-URL: #5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins
pushed a commit
that referenced
this pull request
May 20, 2016
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: #5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins
pushed a commit
that referenced
this pull request
May 20, 2016
PR-URL: #5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins
pushed a commit
that referenced
this pull request
May 20, 2016
PR-URL: #5392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
Follow on from #5204 (which is pending landing once the CI resumes).
This PR cleans up the complexity with how weakness was being used in node_contextify and updates to the new style Phantom weakness API.
Pull Request check-list
Please make sure to review and check all of these items:
make -j8 test(UNIX) orvcbuild test nosign(Windows) pass withthis change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
NOTE: these things are not required to open a PR and can be done afterwards /
while the PR is open.
Affected core subsystem(s)
contextify
R=@bnoordhuis, @indutny
/cc @nodejs/v8