Commit ce65d84
deps: backport a8f6869 from upstream V8
The upstream V8 commit a8f68691 was originally cherry-picked onto
nodejs/node master as commit bb35752, then backported to v10.x-staging
and released in Node.js v10.10.0 as 5e9ed6d. This commit cherry-picks
that commit back to the v8.x-staging branch.
Additionally this commit supports optional boolean argument to
DisableBreak constructor.
This allows a stack-allocated DisableBreak object to re-enable
breakpoints temporarily, rather than always disabling them.
This functionality anticipates an upstream change that will be
introduced in V8 6.7.176:
v8/v8@cc9736a
Original commit message:
[debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug.
I have a project that embeds V8 and uses a single `Isolate` from multiple
threads. The program runs just fine, but sometimes the inspector doesn't
stop on the correct line after stepping over a statement that switches
threads behind the scenes, even though the original thread is restored by
the time the next statement is executed.
After some digging, I discovered that the `Debug::ArchiveDebug` and
`Debug::RestoreDebug` methods, which should be responsible for
saving/restoring this `ThreadLocal` information when switching threads,
currently don't do anything.
This commit implements those methods using MemCopy, in the style of other
Archive/Restore methods in the V8 codebase.
Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8
R=yangguo@chromium.org,jgruber@chromium.org
CC=info@bnoordhuis.nl
Bug: v8:7230
Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943
Reviewed-on: https://chromium-review.googlesource.com/833260
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54902}
PR-URL: #22714
Refs: v8/v8@a8f6869
Refs: #22122
Refs: bb35752
Refs: 5e9ed6d
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>1 parent 7ab253f commit ce65d84Copy full SHA for ce65d84
File tree
Expand file treeCollapse file tree
7 files changed
+166
-11
lines changedOpen diff view settings
Filter options
- deps/v8
- include
- src
- debug
- test/cctest
Expand file treeCollapse file tree
7 files changed
+166
-11
lines changedOpen diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
30 | 30 | |
31 | 31 | |
32 | 32 | |
| 33 | + |
33 | 34 | |
34 | 35 | |
35 | 36 | |
| ||
44 | 45 | |
45 | 46 | |
46 | 47 | |
| 48 | + |
47 | 49 | |
48 | 50 | |
49 | 51 | |
|
Collapse file
deps/v8/include/v8-version.h
Copy file name to clipboardExpand all lines: deps/v8/include/v8-version.h+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
| 14 | + |
15 | 15 | |
16 | 16 | |
17 | 17 | |
|
Collapse file
+23-6Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
264 | 264 | |
265 | 265 | |
266 | 266 | |
267 | | - |
268 | | - |
| 267 | + |
| 268 | + |
269 | 269 | |
270 | 270 | |
271 | 271 | |
272 | | - |
273 | 272 | |
274 | | - |
275 | | - |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
276 | 293 | |
277 | 294 | |
278 | 295 | |
279 | | - |
| 296 | + |
280 | 297 | |
281 | 298 | |
282 | 299 | |
|
Collapse file
+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
309 | 309 | |
310 | 310 | |
311 | 311 | |
| 312 | + |
312 | 313 | |
313 | 314 | |
314 | 315 | |
| ||
690 | 691 | |
691 | 692 | |
692 | 693 | |
693 | | - |
| 694 | + |
694 | 695 | |
695 | | - |
| 696 | + |
696 | 697 | |
697 | 698 | |
698 | 699 | |
|
Collapse file
+6-2Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | | - |
| 48 | + |
49 | 49 | |
50 | 50 | |
51 | 51 | |
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
98 | 102 | |
99 | 103 | |
100 | 104 | |
| ||
127 | 131 | |
128 | 132 | |
129 | 133 | |
130 | | - |
| 134 | + |
131 | 135 | |
132 | 136 | |
133 | 137 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
67 | 67 | |
68 | 68 | |
69 | 69 | |
| 70 | + |
70 | 71 | |
71 | 72 | |
72 | 73 | |
|
Collapse file
deps/v8/test/cctest/test-debug.cc
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/test-debug.cc+130Lines changed: 130 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6207 | 6207 | |
6208 | 6208 | |
6209 | 6209 | |
| 6210 | + |
| 6211 | + |
| 6212 | + |
| 6213 | + |
| 6214 | + |
| 6215 | + |
| 6216 | + |
| 6217 | + |
| 6218 | + |
| 6219 | + |
| 6220 | + |
| 6221 | + |
| 6222 | + |
| 6223 | + |
| 6224 | + |
| 6225 | + |
| 6226 | + |
| 6227 | + |
| 6228 | + |
| 6229 | + |
| 6230 | + |
| 6231 | + |
| 6232 | + |
| 6233 | + |
| 6234 | + |
| 6235 | + |
| 6236 | + |
| 6237 | + |
| 6238 | + |
| 6239 | + |
| 6240 | + |
| 6241 | + |
| 6242 | + |
| 6243 | + |
| 6244 | + |
| 6245 | + |
| 6246 | + |
| 6247 | + |
| 6248 | + |
| 6249 | + |
| 6250 | + |
| 6251 | + |
| 6252 | + |
| 6253 | + |
| 6254 | + |
| 6255 | + |
| 6256 | + |
| 6257 | + |
| 6258 | + |
| 6259 | + |
| 6260 | + |
| 6261 | + |
| 6262 | + |
| 6263 | + |
| 6264 | + |
| 6265 | + |
| 6266 | + |
| 6267 | + |
| 6268 | + |
| 6269 | + |
| 6270 | + |
| 6271 | + |
| 6272 | + |
| 6273 | + |
| 6274 | + |
| 6275 | + |
| 6276 | + |
| 6277 | + |
| 6278 | + |
| 6279 | + |
| 6280 | + |
| 6281 | + |
| 6282 | + |
| 6283 | + |
| 6284 | + |
| 6285 | + |
| 6286 | + |
| 6287 | + |
| 6288 | + |
| 6289 | + |
| 6290 | + |
| 6291 | + |
| 6292 | + |
| 6293 | + |
| 6294 | + |
| 6295 | + |
| 6296 | + |
| 6297 | + |
| 6298 | + |
| 6299 | + |
| 6300 | + |
| 6301 | + |
| 6302 | + |
| 6303 | + |
| 6304 | + |
| 6305 | + |
| 6306 | + |
| 6307 | + |
| 6308 | + |
| 6309 | + |
| 6310 | + |
| 6311 | + |
| 6312 | + |
| 6313 | + |
| 6314 | + |
| 6315 | + |
| 6316 | + |
| 6317 | + |
| 6318 | + |
| 6319 | + |
| 6320 | + |
| 6321 | + |
| 6322 | + |
| 6323 | + |
| 6324 | + |
| 6325 | + |
| 6326 | + |
| 6327 | + |
| 6328 | + |
| 6329 | + |
| 6330 | + |
| 6331 | + |
| 6332 | + |
| 6333 | + |
| 6334 | + |
| 6335 | + |
| 6336 | + |
| 6337 | + |
| 6338 | + |
| 6339 | + |
6210 | 6340 | |
6211 | 6341 | |
6212 | 6342 | |
|
0 commit comments