[api] Add V8::GetWasmMemoryReservationSizeInBytes() [v8/v8 : main]

0 views
Skip to first unread message

Joyee Cheung (Gerrit)

unread,
Mar 6, 2026, 9:52:42 AMMar 6
to Clemens Backes, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
Attention needed from Clemens Backes

Joyee Cheung added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Joyee Cheung . resolved

PTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
Gerrit-Change-Number: 7638233
Gerrit-PatchSet: 2
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Mar 2026 14:52:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Joyee Cheung (Gerrit)

unread,
Mar 9, 2026, 11:29:59 AMMar 9
to Clemens Backes, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
Attention needed from Clemens Backes

Joyee Cheung added 1 comment

Patchset-level comments
Joyee Cheung . resolved

PTAL, thanks!

Joyee Cheung

For reference, this is the Node.js integration PR for this API to address the bug for vscode https://github.com/nodejs/node/pull/62132

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
Gerrit-Change-Number: 7638233
Gerrit-PatchSet: 4
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Mon, 09 Mar 2026 15:29:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joyee Cheung <jo...@igalia.com>
unsatisfied_requirement
open
diffy

Clemens Backes (Gerrit)

unread,
Mar 9, 2026, 1:48:59 PMMar 9
to Joyee Cheung, Michael Lippautz, Jakob Kummerow, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
Attention needed from Joyee Cheung and Michael Lippautz

Clemens Backes added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Clemens Backes . resolved

Exposing this via an API is fine with me.
+Jakob who might have an (other?) opinion on this.
+Michael for include/ ownership.

Open in Gerrit

Related details

Attention is currently required from:
  • Joyee Cheung
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
Gerrit-Change-Number: 7638233
Gerrit-PatchSet: 4
Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 17:48:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
Mar 10, 2026, 5:51:24 AMMar 10
to Joyee Cheung, Jakob Kummerow, Michael Lippautz, Clemens Backes, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
Attention needed from Joyee Cheung and Michael Lippautz

Jakob Kummerow voted and added 1 comment

Votes added by Jakob Kummerow

Code-Review+1

1 comment

Patchset-level comments
Jakob Kummerow . resolved

No objections.

It can't be ruled out that this API might require rethinking (or removing) at some point in the future, if we ever come up with a scheme for handling Wasm memories that doesn't make their reservation size predictable in this way; but that doesn't seem very likely currently.

Open in Gerrit

Related details

Attention is currently required from:
  • Joyee Cheung
  • Michael Lippautz
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
    Gerrit-Change-Number: 7638233
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 09:51:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Clemens Backes (Gerrit)

    unread,
    Mar 10, 2026, 5:52:25 AMMar 10
    to Joyee Cheung, Jakob Kummerow, Michael Lippautz, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Joyee Cheung and Michael Lippautz

    Clemens Backes voted Code-Review+1

    Code-Review+1
    Gerrit-Comment-Date: Tue, 10 Mar 2026 09:52:21 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Mar 10, 2026, 6:29:00 AMMar 10
    to Joyee Cheung, Clemens Backes, Jakob Kummerow, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Joyee Cheung

    Michael Lippautz voted and added 1 comment

    Votes added by Michael Lippautz

    Code-Review+1

    1 comment

    Patchset-level comments
    Michael Lippautz . resolved

    API lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joyee Cheung
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
    Gerrit-Change-Number: 7638233
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Joyee Cheung <jo...@igalia.com>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 10:28:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Joyee Cheung (Gerrit)

    unread,
    Mar 10, 2026, 8:30:01 AMMar 10
    to Michael Lippautz, Clemens Backes, Jakob Kummerow, V8 LUCI CQ, cbruni...@chromium.org, v8-re...@googlegroups.com

    Joyee Cheung voted and added 1 comment

    Votes added by Joyee Cheung

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Joyee Cheung . resolved

    Thanks!

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
    Gerrit-Change-Number: 7638233
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 12:29:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    V8 LUCI CQ (Gerrit)

    unread,
    Mar 10, 2026, 9:09:04 AMMar 10
    to Joyee Cheung, Michael Lippautz, Clemens Backes, Jakob Kummerow, cbruni...@chromium.org, v8-re...@googlegroups.com

    V8 LUCI CQ submitted the change

    Change information

    Commit message:
    [api] Add V8::GetWasmMemoryReservationSizeInBytes()

    When the system does not have enough virtual memory for the wasm
    cage, installing the trap handler would cause any code allocating
    wasm memory to throw. Therefore it's useful for the embedder to
    know when the system doesn't have enough virtual address space
    to allocate enough wasm cages and in that case, skip the
    trap handler installation so that wasm code can at least work
    (even not at the maximal performance).

    Node.js previously has a command line option
    --disable-wasm-trap-handler to fully disable trap-based bound checks,
    this new API would allow it to adapt automatically while keeping the
    optimization in the happy path, since it's not always possible for
    end users to opt-into disabling trap-based bound checks (for example,
    when a VS Code Server is loaded in a remote server for debugging).
    Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
    Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Commit-Queue: Joyee Cheung <jo...@igalia.com>
    Reviewed-by: Clemens Backes <clem...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105702}
    Files:
    • M include/v8-initialization.h
    • M src/api/api.cc
    • M src/objects/backing-store.cc
    • M src/objects/backing-store.h
    • M test/unittests/api/api-wasm-unittest.cc
    Change size: M
    Delta: 5 files changed, 93 insertions(+), 20 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Jakob Kummerow, +1 by Clemens Backes, +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
    Gerrit-Change-Number: 7638233
    Gerrit-PatchSet: 5
    Gerrit-Owner: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Joyee Cheung <jo...@igalia.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages