Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b93ad5a

Browse filesBrowse files
Julien Gillirvagg
authored andcommitted
deps: backport 357e6b9 from V8's upstream
Backport 357e6b99ee3927cc075dd8d27c99b89d858f9dd5 from V8's upstream. Original commit message: Add ScopeInfo constants to post-mortem metadata mdb_v8, a post-mortem debugging tool for Node.js, allows users to inspect ScopeInfo structures in order to get more information about closures. Currently, it hardcodes the metadata it uses to find this information. This change allows it to get this metadata from the node binary itself, and thus to adapt to future changes made to the layout of the ScopeInfo data structure. BUG= R=bmeurer@chromium.org PR: #2974 PR-URL: #2974 Reviewed-By: Rod Vagg <r@va.gg> Reviewed-By: Ben Noordhuis <ben@strongloop.com>
1 parent 9c59d2f commit b93ad5a
Copy full SHA for b93ad5a

File tree

Expand file treeCollapse file tree

2 files changed

+10
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-1
lines changed
Open diff view settings
Collapse file

‎deps/v8/src/objects.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/objects.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4086,7 +4086,6 @@ class ScopeInfo : public FixedArray {
40864086
FOR_EACH_NUMERIC_FIELD(FIELD_ACCESSORS)
40874087
#undef FIELD_ACCESSORS
40884088

4089-
private:
40904089
enum {
40914090
#define DECL_INDEX(name) k##name,
40924091
FOR_EACH_NUMERIC_FIELD(DECL_INDEX)
@@ -4095,6 +4094,7 @@ class ScopeInfo : public FixedArray {
40954094
kVariablePartIndex
40964095
};
40974096

4097+
private:
40984098
// The layout of the variable part of a ScopeInfo is as follows:
40994099
// 1. ParameterEntries:
41004100
// This part stores the names of the parameters for function scopes. One
Collapse file

‎deps/v8/tools/gen-postmortem-metadata.py‎

Copy file name to clipboardExpand all lines: deps/v8/tools/gen-postmortem-metadata.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@
132132
'value': 'JavaScriptFrameConstants::kFunctionOffset' },
133133
{ 'name': 'off_fp_args',
134134
'value': 'JavaScriptFrameConstants::kLastParameterOffset' },
135+
136+
{ 'name': 'scopeinfo_idx_nparams',
137+
'value': 'ScopeInfo::kParameterCount' },
138+
{ 'name': 'scopeinfo_idx_nstacklocals',
139+
'value': 'ScopeInfo::kStackLocalCount' },
140+
{ 'name': 'scopeinfo_idx_ncontextlocals',
141+
'value': 'ScopeInfo::kContextLocalCount' },
142+
{ 'name': 'scopeinfo_idx_first_vars',
143+
'value': 'ScopeInfo::kVariablePartIndex' },
135144
];
136145

137146
#

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.