Commit 87d7845
bootstrap: fixup Error.stackTraceLimit for user-land snapshot
It's difficult for V8 to handle Error.stackTraceLimit in the snapshot,
so delete it from the Error constructor if it's present before
snapshot serialization, and re-install it after deserialization.
In addition try not to touch it from our internals during snapshot
building in the first place by updating
isErrorStackTraceLimitWritable().
PR-URL: #44203
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 40b817c commit 87d7845Copy full SHA for 87d7845
File tree
Expand file treeCollapse file tree
6 files changed
+46
-16
lines changedOpen diff view settings
Filter options
- lib/internal
- main
- v8
- test/parallel
Expand file treeCollapse file tree
6 files changed
+46
-16
lines changedOpen diff view settings
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
191 | 191 | |
192 | 192 | |
193 | 193 | |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
194 | 200 | |
195 | 201 | |
196 | 202 | |
|
Collapse file
lib/internal/main/mksnapshot.js
Copy file name to clipboardExpand all lines: lib/internal/main/mksnapshot.js+32-2Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
5 | 9 | |
6 | | - |
7 | 10 | |
8 | 11 | |
9 | 12 | |
| ||
125 | 128 | |
126 | 129 | |
127 | 130 | |
128 | | - |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
129 | 146 | |
130 | 147 | |
131 | 148 | |
| ||
134 | 151 | |
135 | 152 | |
136 | 153 | |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
137 | 167 | |
138 | 168 | |
139 | 169 | |
Collapse file
lib/internal/v8/startup_snapshot.js
Copy file name to clipboardExpand all lines: lib/internal/v8/startup_snapshot.js-2Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
54 | 54 | |
55 | 55 | |
56 | 56 | |
57 | | - |
58 | | - |
59 | 57 | |
60 | 58 | |
61 | 59 | |
|
Collapse file
test/parallel/test-snapshot-api.js
Copy file name to clipboardExpand all lines: test/parallel/test-snapshot-api.js+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
13 | 19 | |
14 | 20 | |
15 | 21 | |
|
Collapse file
test/parallel/test-snapshot-typescript.js
Copy file name to clipboardExpand all lines: test/parallel/test-snapshot-typescript.js+1-6Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
| 5 | + |
11 | 6 | |
12 | 7 | |
13 | 8 | |
|
Collapse file
test/parallel/test-snapshot-warning.js
Copy file name to clipboardExpand all lines: test/parallel/test-snapshot-warning.js+1-6Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
| 7 | + |
13 | 8 | |
14 | 9 | |
15 | 10 | |
|
0 commit comments