src: add node's internals constants #204
Merged
Conversation
|
Split from #122 as I think it will be easier to review these changes in separate PRs. |
|
Generally LGTM with some suggestions |
src/node-constants.cc
Outdated
|
|
||
| llv8()->Load(target_); | ||
|
|
||
| SBStream desc; |
joyeecheung
Jun 14, 2018
Member
Are desc and selected_frame used anywhere?
Are desc and selected_frame used anywhere?
src/node-constants.cc
Outdated
| } | ||
| visited_contexts.insert(val.raw()); | ||
| v8::Context context(val); | ||
| v8::Value native = context.Native(v8_err); |
joyeecheung
Jun 14, 2018
Member
It would be cleaner if we put this into a Context::IsNativeConext()
It would be cleaner if we put this into a Context::IsNativeConext()
src/node-constants.cc
Outdated
| v8::Context context(val); | ||
| v8::Value native = context.Native(v8_err); | ||
| if (v8_err.Success()) { | ||
| if (native.raw() == context.raw()) { |
joyeecheung
Jun 14, 2018
Member
This works, but V8 seems to prefer comparing the map with kNativeContextMapRootIndex (not yet available in the post-mortem constants, it seems)
This works, but V8 seems to prefer comparing the map with kNativeContextMapRootIndex (not yet available in the post-mortem constants, it seems)
src/node-constants.cc
Outdated
| llv8()->Load(target_); | ||
|
|
||
| v8::FixedArray contextArray = v8::FixedArray(context); | ||
| v8::FixedArray embed = contextArray.Get<v8::FixedArray>( |
joyeecheung
Jun 14, 2018
Member
It may be cleaner if we wrap this into a Context::GetEmbedderData(index)
It may be cleaner if we wrap this into a Context::GetEmbedderData(index)
|
If there are no objections I'd like to land this by the end of the week. |
This commit refactors llv8-constants to make it easier to introduce Node's internals constants. Common code for llv8 and node constants is now on src/constants.h. Also moved the Error class to its own file, removing the dependency on src/llv8.h to use Errors. PR-URL: #204 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
b58b51d
to
3c3fb94
|
Landed in 3c3fb94 |
kisg
pushed a commit
to paul99/v8mips
that referenced
this pull request
Jul 16, 2018
* JS_ERROR_TYPE is required for postmortem tools to inspect JSError
objects (see nodejs/llnode#215 for a usage
example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
mmarchini
added a commit
to mmarchini/node
that referenced
this pull request
Jul 23, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect JSError
objects (see nodejs/llnode#215 for a usage
example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
mmarchini
added a commit
to nodejs/node
that referenced
this pull request
Jul 25, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
targos
added a commit
to targos/node
that referenced
this pull request
Jul 25, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: nodejs#21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
targos
added a commit
to targos/node
that referenced
this pull request
Jul 26, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: nodejs#21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
targos
added a commit
to nodejs/node
that referenced
this pull request
Jul 26, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
targos
added a commit
to targos/node
that referenced
this pull request
Jul 26, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: nodejs#21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
mmarchini
added a commit
to mmarchini/node
that referenced
this pull request
Aug 7, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
PR-URL: nodejs#21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
MylesBorins
added a commit
to nodejs/node
that referenced
this pull request
Aug 7, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
Backport-PR-URL: #22177
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
MylesBorins
added a commit
to nodejs/node
that referenced
this pull request
Aug 7, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
Backport-PR-URL: #22177
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
MylesBorins
added a commit
to nodejs/node
that referenced
this pull request
Aug 9, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
Backport-PR-URL: #22177
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
MylesBorins
added a commit
to nodejs/node
that referenced
this pull request
Aug 10, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
Backport-PR-URL: #21668
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
MylesBorins
added a commit
to nodejs/node
that referenced
this pull request
Aug 16, 2018
Original commit message:
[postmortem] add JS_ERROR_TYPE and context embedder index
* JS_ERROR_TYPE is required for postmortem tools to inspect
JSError objects (see nodejs/llnode#215
for a usage example)
* The context embedder index is required for postmortem tools to
access embedder data stored in the context (see
nodejs/llnode#204 for a usage example)
R=bmeurer@google.com, yangguo@google.com
Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
Reviewed-on: https://chromium-review.googlesource.com/1138493
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54475}
Refs: v8/v8@804a693
Backport-PR-URL: #22177
PR-URL: #21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
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.
This commit refactors llv8-constants to make it easier to introduce
Node's internals constants. Common code for llv8 and node constants is
now on src/constants.h. Also moved the Error class to its own file,
removing the dependency on src/llv8.h to use Errors.