Commit 97a3f7b
deps: V8: backport fb26d0bb1835
Original commit message:
[objects] Compact and shrink script_list
So far creating scripts always grew the script_list without ever
reusing cleared slots or shrinking. While this is probably not a
problem with script_list in practice, this is still a memory leak.
Fix this leak by using WeakArrayList::Append instead of AddToEnd.
Append adds to the end of the array, but potentially compacts and
shrinks the list as well. Other WeakArrayLists can use this method as
well, as long as they are not using indices into this array.
Bug: v8:10031
Change-Id: If743c4cc3f8d67ab735522f0ded038b2fb43e437
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1967385
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65640}
Refs: v8/v8@fb26d0b
PR-URL: #33573
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>1 parent 136d8ea commit 97a3f7bCopy full SHA for 97a3f7b
File tree
Expand file treeCollapse file tree
7 files changed
+215
-16
lines changedOpen diff view settings
Filter options
- deps/v8
- src
- heap
- objects
- test/unittests
- objects
Expand file treeCollapse file tree
7 files changed
+215
-16
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
|
Collapse file
deps/v8/src/heap/factory.cc
Copy file name to clipboardExpand all lines: deps/v8/src/heap/factory.cc+55-12Lines changed: 55 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1677 | 1677 | |
1678 | 1678 | |
1679 | 1679 | |
1680 | | - |
1681 | | - |
| 1680 | + |
| 1681 | + |
1682 | 1682 | |
1683 | 1683 | |
1684 | 1684 | |
| ||
2112 | 2112 | |
2113 | 2113 | |
2114 | 2114 | |
| 2115 | + |
| 2116 | + |
| 2117 | + |
| 2118 | + |
| 2119 | + |
| 2120 | + |
| 2121 | + |
| 2122 | + |
| 2123 | + |
| 2124 | + |
| 2125 | + |
| 2126 | + |
| 2127 | + |
| 2128 | + |
| 2129 | + |
| 2130 | + |
| 2131 | + |
| 2132 | + |
| 2133 | + |
| 2134 | + |
| 2135 | + |
| 2136 | + |
| 2137 | + |
2115 | 2138 | |
2116 | 2139 | |
2117 | 2140 | |
| ||
2123 | 2146 | |
2124 | 2147 | |
2125 | 2148 | |
2126 | | - |
2127 | | - |
2128 | | - |
2129 | | - |
| 2149 | + |
| 2150 | + |
2130 | 2151 | |
2131 | | - |
2132 | | - |
| 2152 | + |
2133 | 2153 | |
2134 | 2154 | |
2135 | 2155 | |
2136 | | - |
2137 | | - |
2138 | | - |
| 2156 | + |
| 2157 | + |
| 2158 | + |
2139 | 2159 | |
2140 | 2160 | |
2141 | | - |
| 2161 | + |
| 2162 | + |
| 2163 | + |
| 2164 | + |
| 2165 | + |
| 2166 | + |
| 2167 | + |
| 2168 | + |
| 2169 | + |
| 2170 | + |
| 2171 | + |
| 2172 | + |
| 2173 | + |
| 2174 | + |
| 2175 | + |
| 2176 | + |
| 2177 | + |
| 2178 | + |
| 2179 | + |
| 2180 | + |
| 2181 | + |
| 2182 | + |
| 2183 | + |
| 2184 | + |
2142 | 2185 | |
2143 | 2186 | |
2144 | 2187 | |
|
Collapse file
+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
524 | 524 | |
525 | 525 | |
526 | 526 | |
| 527 | + |
| 528 | + |
| 529 | + |
527 | 530 | |
528 | 531 | |
529 | 532 | |
| ||
549 | 552 | |
550 | 553 | |
551 | 554 | |
| 555 | + |
| 556 | + |
| 557 | + |
| 558 | + |
552 | 559 | |
553 | 560 | |
554 | 561 | |
| ||
1111 | 1118 | |
1112 | 1119 | |
1113 | 1120 | |
| 1121 | + |
| 1122 | + |
| 1123 | + |
| 1124 | + |
1114 | 1125 | |
1115 | 1126 | |
1116 | 1127 | |
|
Collapse file
deps/v8/src/objects/fixed-array.h
Copy file name to clipboardExpand all lines: deps/v8/src/objects/fixed-array.h+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
339 | 339 | |
340 | 340 | |
341 | 341 | |
| 342 | + |
| 343 | + |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
342 | 353 | |
343 | 354 | |
344 | 355 | |
| ||
352 | 363 | |
353 | 364 | |
354 | 365 | |
| 366 | + |
| 367 | + |
| 368 | + |
| 369 | + |
355 | 370 | |
356 | 371 | |
357 | 372 | |
| ||
383 | 398 | |
384 | 399 | |
385 | 400 | |
| 401 | + |
| 402 | + |
| 403 | + |
386 | 404 | |
387 | 405 | |
388 | 406 | |
|
Collapse file
deps/v8/src/objects/objects.cc
Copy file name to clipboardExpand all lines: deps/v8/src/objects/objects.cc+70-3Lines changed: 70 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3952 | 3952 | |
3953 | 3953 | |
3954 | 3954 | |
| 3955 | + |
| 3956 | + |
| 3957 | + |
| 3958 | + |
| 3959 | + |
| 3960 | + |
| 3961 | + |
| 3962 | + |
| 3963 | + |
| 3964 | + |
| 3965 | + |
| 3966 | + |
| 3967 | + |
| 3968 | + |
| 3969 | + |
| 3970 | + |
| 3971 | + |
| 3972 | + |
| 3973 | + |
| 3974 | + |
| 3975 | + |
| 3976 | + |
| 3977 | + |
| 3978 | + |
| 3979 | + |
| 3980 | + |
| 3981 | + |
| 3982 | + |
| 3983 | + |
| 3984 | + |
| 3985 | + |
| 3986 | + |
| 3987 | + |
| 3988 | + |
| 3989 | + |
| 3990 | + |
| 3991 | + |
| 3992 | + |
| 3993 | + |
| 3994 | + |
| 3995 | + |
| 3996 | + |
| 3997 | + |
| 3998 | + |
| 3999 | + |
| 4000 | + |
| 4001 | + |
| 4002 | + |
| 4003 | + |
| 4004 | + |
| 4005 | + |
| 4006 | + |
| 4007 | + |
| 4008 | + |
| 4009 | + |
| 4010 | + |
| 4011 | + |
| 4012 | + |
| 4013 | + |
3955 | 4014 | |
3956 | 4015 | |
3957 | 4016 | |
| ||
3961 | 4020 | |
3962 | 4021 | |
3963 | 4022 | |
3964 | | - |
3965 | | - |
3966 | | - |
| 4023 | + |
3967 | 4024 | |
3968 | 4025 | |
3969 | 4026 | |
| ||
3980 | 4037 | |
3981 | 4038 | |
3982 | 4039 | |
| 4040 | + |
| 4041 | + |
| 4042 | + |
| 4043 | + |
| 4044 | + |
| 4045 | + |
| 4046 | + |
| 4047 | + |
| 4048 | + |
| 4049 | + |
3983 | 4050 | |
3984 | 4051 | |
3985 | 4052 | |
|
Collapse file
deps/v8/test/unittests/BUILD.gn
Copy file name to clipboardExpand all lines: deps/v8/test/unittests/BUILD.gn+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
190 | 190 | |
191 | 191 | |
192 | 192 | |
| 193 | + |
193 | 194 | |
194 | 195 | |
195 | 196 | |
|
Collapse file
deps/v8/test/unittests/objects/weakarraylist-unittest.cc
Copy file name to clipboard+59Lines changed: 59 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 | + |
0 commit comments