diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-09-17 14:34:02 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-10-02 08:40:27 +0200 |
commit | 4f722915218862b108c90371503d26a3fe89f4c9 (patch) | |
tree | cd1577faff9acc20eb8e4a0e2d6ed1856bf308fd /deps/v8/src/builtins/typed-array-slice.tq | |
parent | 606bb521591a29df5401732bfbd19c1e31239ed9 (diff) | |
download | node-new-4f722915218862b108c90371503d26a3fe89f4c9.tar.gz |
deps: update V8 to 9.4.146.18
PR-URL: https://github.com/nodejs/node/pull/39945
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps/v8/src/builtins/typed-array-slice.tq')
-rw-r--r-- | deps/v8/src/builtins/typed-array-slice.tq | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/builtins/typed-array-slice.tq b/deps/v8/src/builtins/typed-array-slice.tq index 60604c548f..2a18433f93 100644 --- a/deps/v8/src/builtins/typed-array-slice.tq +++ b/deps/v8/src/builtins/typed-array-slice.tq @@ -36,7 +36,12 @@ macro FastCopy( assert(countBytes <= dest.byte_length); assert(countBytes <= src.byte_length - startOffset); - typed_array::CallCMemmove(dest.data_ptr, srcPtr, countBytes); + if (IsSharedArrayBuffer(src.buffer)) { + // SABs need a relaxed memmove to preserve atomicity. + typed_array::CallCRelaxedMemmove(dest.data_ptr, srcPtr, countBytes); + } else { + typed_array::CallCMemmove(dest.data_ptr, srcPtr, countBytes); + } } macro SlowCopy(implicit context: Context)( |