From fac8a0ee466ad07d42f09baa55737cca5bedd8db Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 19 Jul 2023 19:07:07 +0200 Subject: [PATCH] deps: V8: cherry-pick 9f4b7699f68e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: Fix mistake in the skip branch of test/mjsunit/regress-1320641.js It was doing a `string.test(regex)` which was wrong. It's supposed to be `regex.test(string)`. It wasn't caught in the CI because the skip path is not normally taken in the V8 CI. Change-Id: Id1bdab5bbc41968bba8adc1cb3664e8f95fb5d72 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4697855 Commit-Queue: Joyee Cheung Reviewed-by: Nico Hartmann Cr-Commit-Position: refs/heads/main@{#89044} Refs: https://github.com/v8/v8/commit/9f4b7699f68edaed1de25ef0a1886c21d496032a PR-URL: https://github.com/nodejs/node/pull/48830 Refs: https://github.com/v8/v8/commit/c1a54d5ffcd1a3b769376be3b46b57b860b5aa9e Reviewed-By: Michaƫl Zasso Reviewed-By: Richard Lau Reviewed-By: Jiawen Geng Reviewed-By: Debadree Chatterjee --- common.gypi | 2 +- deps/v8/test/mjsunit/regress/regress-1320641.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index b68804ac668d32..87e9d4ebfc0ab2 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.12', + 'v8_embedder_string': '-node.13', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/test/mjsunit/regress/regress-1320641.js b/deps/v8/test/mjsunit/regress/regress-1320641.js index cc6a11be3d89db..6bd109421a94af 100644 --- a/deps/v8/test/mjsunit/regress/regress-1320641.js +++ b/deps/v8/test/mjsunit/regress/regress-1320641.js @@ -13,7 +13,7 @@ var skip = false; try { new Uint16Array(3775336418); } catch (e) { - if (e.message.test(/Array buffer allocation failed/)) { + if (/Array buffer allocation failed/.test(e.message)) { skip = true; // We don't have enough memory, just skip the test. } }