v8/test/unittests/objects
Dominik Inführ fb26d0bb18 [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}
2020-01-08 17:48:32 +00:00
..
backing-store-unittest.cc Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
object-unittest.cc Introduce stack locals black list field on the ScopeInfo object 2019-12-09 10:25:27 +00:00
osr-optimized-code-cache-unittest.cc Reland "[compiler] Cache OSR optimized code" 2019-09-27 13:25:47 +00:00
value-serializer-unittest.cc [api] Deprecate [Shared]ArrayBuffer::Externalize/GetContents and constructors 2019-10-29 22:01:54 +00:00
weakarraylist-unittest.cc [objects] Compact and shrink script_list 2020-01-08 17:48:32 +00:00