From 7e7c0ded649ac7785529408539a45d63d8d3336f Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Fri, 18 Nov 2022 04:46:49 -0500 Subject: [PATCH] deps: V8: cherry-pick 9df5ef70ff18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: Add an `v8::ArrayBuffer::WasDetached` method to the C++ API V8's C++ API does not give a way to tell whether an ArrayBuffer has been detached from the `v8::ArrayBuffer` class. In fact, as far as can be told from the C++ API without running JS code, detached ArrayBuffers behave the same as zero-sized ArrayBuffers and there is no way to observe the difference. However, this difference can be observed in JS because constructing a TypedArray from a detached ArrayBuffer will throw. This change adds a `WasDetached` method to the `v8::ArrayBuffer` class to give embedders access to this information without having to run JS code. Bug: v8:13159 Change-Id: I2bb1e380cee1cecd31f6d48ec3d9f28c03a8a673 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810345 Commit-Queue: Toon Verwaest Reviewed-by: Toon Verwaest Cr-Commit-Position: refs/heads/main@{#83963} Refs: https://github.com/v8/v8/commit/9df5ef70ff18977b157028fc55ced5af4bcee535 PR-URL: https://github.com/nodejs/node/pull/45474 Reviewed-By: Michaƫl Zasso Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Daeyeon Jeong Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/45230 Reviewed-By: Yagiz Nizipli --- common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 5bc3d8666ab..9fcee7f066e 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.6', + 'v8_embedder_string': '-node.7', ##### V8 defaults for Node.js #####