Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: cherry-pick 00704f5a from V8 upstream #43921

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

kvakil
Copy link
Contributor

@kvakil kvakil commented Jul 21, 2022

Original commit message:

Add more efficient API for accesssing ArrayBuffer raw data

Raw data access is already possible via GetBackingStore()->GetData().
This API exposes a more efficient way for accessing
JSArrayBuffer::backing_store (which, despite the confusing name, is no
the BackingStore but its raw data pointer).

Bug: v8:10343
Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
Reviewed-by: Camillo Bruni <[email protected]>
Commit-Queue: Marja Hölttä <[email protected]>
Cr-Commit-Position: refs/heads/main@{#81745}

Refs: v8/v8@00704f5
Refs: #32226

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Jul 21, 2022
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This replaces many uses of `GetBackingStore()->Data()` with the newly
backported `Data()`.

I only replaced the "obvious" usages here, where I could easily convince
myself that the lifetime was safe. The less obvious changes will come in
a separate PR.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This replaces many uses of `GetBackingStore()->Data()` with the newly
backported `Data()`.

I only replaced the "obvious" usages here, where I could easily convince
myself that the lifetime was safe. The less obvious changes will come in
a separate PR.

Refs: nodejs#32226
Refs: nodejs#43921
@cjihrig
Copy link
Contributor

cjihrig commented Jul 21, 2022

I think this should increment v8_embedder_string in common.gypi.

kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore without `CODEOWNERS`. See the
linked issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in startup. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
@kvakil
Copy link
Contributor Author

kvakil commented Jul 21, 2022

I think this should increment v8_embedder_string in common.gypi.

Thanks, I missed that while skimming. I updated the docs in #43924 with a reminder.

kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore without `CODEOWNERS`. See the
linked issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
kvakil added a commit to kvakil/node that referenced this pull request Jul 21, 2022
This removes all usages of GetBackingStore in startup. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
@tniessen
Copy link
Member

@kvakil It looks like your git user.email is not associated with your GitHub account. This will not prevent this PR from being merged, however, we still encourage you to either re-commit the changes with an email address that is associated with your GitHub account, or that you add the email address you are using with git to your GitHub account.

@kvakil
Copy link
Contributor Author

kvakil commented Jul 21, 2022

@kvakil It looks like your git user.email is not associated with your GitHub account. This will not prevent this PR from being merged, however, we still encourage you to either re-commit the changes with an email address that is associated with your GitHub account, or that you add the email address you are using with git to your GitHub account.

Thanks for the flag! I added the email to Github; it appears to have linked back correctly.

Original commit message:

    Add more efficient API for accesssing ArrayBuffer raw data

    Raw data access is already possible via GetBackingStore()->GetData().
    This API exposes a more efficient way for accessing
    JSArrayBuffer::backing_store (which, despite the confusing name, is no
    the BackingStore but its raw data pointer).

    Bug: v8:10343
    Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
    Reviewed-by: Camillo Bruni <[email protected]>
    Commit-Queue: Marja Hölttä <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#81745}

Refs: v8/v8@00704f5
Refs: nodejs#32226
@F3n67u F3n67u added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Jul 25, 2022
nodejs-github-bot pushed a commit that referenced this pull request Aug 3, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44077
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Aug 3, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44076
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Aug 3, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44075
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Aug 3, 2022
This removes all usages of GetBackingStore without any entries in the
`CODEOWNERS` file. For the most part this is a pretty straightforward
review; except `SPREAD_BUFFER_ARG` and the changes to `CopyArrayBuffer`.

See the linked issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44080
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Aug 4, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: #32226
Refs: #43921
PR-URL: #44079
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
Original commit message:

    Add more efficient API for accesssing ArrayBuffer raw data

    Raw data access is already possible via GetBackingStore()->GetData().
    This API exposes a more efficient way for accessing
    JSArrayBuffer::backing_store (which, despite the confusing name, is no
    the BackingStore but its raw data pointer).

    Bug: v8:10343
    Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
    Reviewed-by: Camillo Bruni <[email protected]>
    Commit-Queue: Marja Hölttä <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#81745}

Refs: v8/v8@00704f5
Refs: #32226

PR-URL: #43921
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore in startup. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44078
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44077
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44076
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44075
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore without any entries in the
`CODEOWNERS` file. For the most part this is a pretty straightforward
review; except `SPREAD_BUFFER_ARG` and the changes to `CopyArrayBuffer`.

See the linked issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44080
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
danielleadams pushed a commit that referenced this pull request Aug 16, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: #32226
Refs: #43921
PR-URL: #44079
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
Original commit message:

    Add more efficient API for accesssing ArrayBuffer raw data

    Raw data access is already possible via GetBackingStore()->GetData().
    This API exposes a more efficient way for accessing
    JSArrayBuffer::backing_store (which, despite the confusing name, is no
    the BackingStore but its raw data pointer).

    Bug: v8:10343
    Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
    Reviewed-by: Camillo Bruni <[email protected]>
    Commit-Queue: Marja Hölttä <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#81745}

Refs: v8/v8@00704f5
Refs: #32226

PR-URL: #43921
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore in startup. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44078
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44077
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44076
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44075
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore without any entries in the
`CODEOWNERS` file. For the most part this is a pretty straightforward
review; except `SPREAD_BUFFER_ARG` and the changes to `CopyArrayBuffer`.

See the linked issue for an explanation.

Refs: #32226
Refs: #43921
PR-URL: #44080
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 23, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: #32226
Refs: #43921
PR-URL: #44079
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
Original commit message:

    Add more efficient API for accesssing ArrayBuffer raw data

    Raw data access is already possible via GetBackingStore()->GetData().
    This API exposes a more efficient way for accessing
    JSArrayBuffer::backing_store (which, despite the confusing name, is no
    the BackingStore but its raw data pointer).

    Bug: v8:10343
    Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
    Reviewed-by: Camillo Bruni <[email protected]>
    Commit-Queue: Marja Hölttä <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#81745}

Refs: v8/v8@00704f5
Refs: nodejs#32226

PR-URL: nodejs#43921
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore in startup. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44078
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore in WASI. See the linked issue
for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44077
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore in modules. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44076
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore in `node-api`. See the linked
issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44075
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore without any entries in the
`CODEOWNERS` file. For the most part this is a pretty straightforward
review; except `SPREAD_BUFFER_ARG` and the changes to `CopyArrayBuffer`.

See the linked issue for an explanation.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44080
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: nodejs#32226
Refs: nodejs#43921
PR-URL: nodejs#44079
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants