Unverified Commit 97a3f7b7 authored by Matheus Marchini's avatar Matheus Marchini Committed by Beth Griggs
Browse files

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: default avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#65640}

Refs: https://github.com/v8/v8/commit/fb26d0bb1835dd18d175128fcb18590bee4ec218

PR-URL: https://github.com/nodejs/node/pull/33573


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarShelley Vohr <codebytere@gmail.com>
Reviewed-By: default avatarBeth Griggs <Bethany.Griggs@uk.ibm.com>
parent 136d8ea0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment