| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
(Comment is at #7082 (comment)) Curious, does this buy us anything in reality? Just less management of environment? Seems fine to me, not going to sign-off though. (CI is green fwiw) |
Sorry, something went wrong.
It makes it obvious that the instance's lifetime is correctly scoped, something you don't have with heap-allocated instances. |
Sorry, something went wrong.
|
Seems like a good idea. Scanning through it the one thing that does come to mind is that it would be helpful to have additional code comments added as these kinds of changes are being made... comments that help explain the flow and intent more so that contributors who are less familiar with the code can grok things a bit easier. Beyond that nothing else comes to mind. LGTM given that CI is green. Would like @trevnorris to review also tho. |
Sorry, something went wrong.
Can you point out a few places where comments would help? In general I try to refrain from comments unless the code does something that's not the obviously correct thing to do but I don't think that's an issue here. |
Sorry, something went wrong.
|
I'm thinking in terms of general comments that would help someone who is new to node understand what is happening within the code. For instance, a quick one liner that explains what InitAdapter() does (https://github.com/nodejs/node/pull/7090/files#diff-883701a662f7ab4f6396a4d5fbb1149cR187). Obviously not a critical thing by any measure, I'm just thinking in terms of ways to make the code more accessible. |
Sorry, something went wrong.
|
We used to have such comments in src/node.cc and src/node.js but they have a habit of getting out of sync with the code. As to your particular example, that's existing code that this PR doesn't fundamentally change. I don't think this PR is the right place to start commenting it, that's mixing two different things. |
Sorry, something went wrong.
|
I don't disagree :-) I was just using it as an example. No worries :-) |
Sorry, something went wrong.
There was a problem hiding this comment.
Which header is it that includes SetupProcessObject()?
Sorry, something went wrong.
There was a problem hiding this comment.
node_internals.h, which is included by node.h, which is included by env-inl.h. It's a bit roundabout, I can include it directly.
Sorry, something went wrong.
There was a problem hiding this comment.
doesn't worry me. just couldn't see how the header was reaching here.
Sorry, something went wrong.
|
Like seeing code moved out of node.cc. LGTM. |
Sorry, something went wrong.
PR-URL: nodejs#7090 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Makes it easier to reason about the lifetime of the Environment object. PR-URL: nodejs#7090 Refs: nodejs#7082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
This is not landing cleanly, so holding off on including it in the next v6 release. |
Sorry, something went wrong.
|
Still conflicts to v6, with or without the inspector, and the inspector depends on it... Going to patch without; I think that conflict is easier to resolve. |
Sorry, something went wrong.
|
@bnoordhuis safe to assume dont land on v4.x as well? |
Sorry, something went wrong.
|
Correct. I've added the label. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Based on a comment @trevnorris made in #7082.
R=@jasnell?
CI: https://ci.nodejs.org/job/node-test-pull-request/2890/