Commit 7f2c810
src,tools: initialize cppgc
This patch:
- Initializes cppgc in InitializeOncePerProcess() when
kNoInitializeCppgc is not set
- Create a CppHeap and attach it to the Isolate when
there isn't one already during IsolateData initialization.
The CppHeap is detached and terminated when IsolateData
is freed.
- Publishes the cppgc headers in the tarball.
This allows C++ addons to start using cppgc to manage objects.
A helper node::SetCppgcReference() is also added to help addons
enable cppgc tracing in a user-defined object.
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Refs: #40786
PR-URL: #45704
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>1 parent 7bbcb29 commit 7f2c810Copy full SHA for 7f2c810
File tree
Expand file treeCollapse file tree
11 files changed
+290
-3
lines changedOpen diff view settings
Filter options
- src
- test/addons/cppgc-object
- tools
Expand file treeCollapse file tree
11 files changed
+290
-3
lines changedOpen diff view settings
Collapse file
+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
| 37 | + |
37 | 38 | |
38 | 39 | |
39 | 40 | |
| ||
61 | 62 | |
62 | 63 | |
63 | 64 | |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
64 | 90 | |
65 | 91 | |
66 | 92 | |
|
Collapse file
+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
37 | 37 | |
38 | 38 | |
39 | 39 | |
| 40 | + |
| 41 | + |
40 | 42 | |
41 | 43 | |
42 | 44 | |
| ||
61 | 63 | |
62 | 64 | |
63 | 65 | |
| 66 | + |
64 | 67 | |
65 | 68 | |
66 | 69 | |
| ||
538 | 541 | |
539 | 542 | |
540 | 543 | |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
541 | 552 | |
542 | 553 | |
543 | 554 | |
| ||
565 | 576 | |
566 | 577 | |
567 | 578 | |
| 579 | + |
| 580 | + |
| 581 | + |
| 582 | + |
| 583 | + |
| 584 | + |
| 585 | + |
| 586 | + |
| 587 | + |
| 588 | + |
| 589 | + |
| 590 | + |
| 591 | + |
| 592 | + |
| 593 | + |
568 | 594 | |
569 | 595 | |
570 | 596 | |
|
Collapse file
+10Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
62 | 62 | |
63 | 63 | |
64 | 64 | |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
65 | 69 | |
66 | 70 | |
67 | 71 | |
| ||
136 | 140 | |
137 | 141 | |
138 | 142 | |
| 143 | + |
139 | 144 | |
140 | 145 | |
141 | 146 | |
| ||
148 | 153 | |
149 | 154 | |
150 | 155 | |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
151 | 160 | |
152 | 161 | |
153 | 162 | |
| ||
229 | 238 | |
230 | 239 | |
231 | 240 | |
| 241 | + |
232 | 242 | |
233 | 243 | |
234 | 244 | |
|
Collapse file
+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
62 | 62 | |
63 | 63 | |
64 | 64 | |
| 65 | + |
| 66 | + |
65 | 67 | |
66 | 68 | |
67 | 69 | |
| ||
1096 | 1098 | |
1097 | 1099 | |
1098 | 1100 | |
| 1101 | + |
| 1102 | + |
| 1103 | + |
| 1104 | + |
| 1105 | + |
| 1106 | + |
| 1107 | + |
| 1108 | + |
1099 | 1109 | |
1100 | 1110 | |
1101 | 1111 | |
| ||
1115 | 1125 | |
1116 | 1126 | |
1117 | 1127 | |
| 1128 | + |
| 1129 | + |
| 1130 | + |
| 1131 | + |
1118 | 1132 | |
1119 | 1133 | |
1120 | 1134 | |
|
Collapse file
+24-1Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
261 | 261 | |
262 | 262 | |
263 | 263 | |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
264 | 268 | |
265 | 269 | |
266 | 270 | |
| ||
269 | 273 | |
270 | 274 | |
271 | 275 | |
272 | | - |
| 276 | + |
273 | 277 | |
274 | 278 | |
275 | 279 | |
| ||
1486 | 1490 | |
1487 | 1491 | |
1488 | 1492 | |
| 1493 | + |
| 1494 | + |
| 1495 | + |
| 1496 | + |
| 1497 | + |
| 1498 | + |
| 1499 | + |
| 1500 | + |
| 1501 | + |
| 1502 | + |
| 1503 | + |
| 1504 | + |
| 1505 | + |
| 1506 | + |
| 1507 | + |
| 1508 | + |
| 1509 | + |
| 1510 | + |
| 1511 | + |
1489 | 1512 | |
1490 | 1513 | |
1491 | 1514 | |
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
68 | 68 | |
69 | 69 | |
70 | 70 | |
| 71 | + |
| 72 | + |
71 | 73 | |
72 | 74 | |
73 | 75 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
| 14 | + |
14 | 15 | |
15 | 16 | |
16 | 17 | |
|
Collapse file
test/addons/cppgc-object/binding.cc
Copy file name to clipboard+78Lines changed: 78 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
Collapse file
test/addons/cppgc-object/binding.gyp
Copy file name to clipboard+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
Collapse file
test/addons/cppgc-object/test.js
Copy file name to clipboard+51Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
0 commit comments