From 807b68b430ab0b742afba43167b32bb585e9d1a8 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sat, 21 Aug 2021 16:37:48 +0530 Subject: [PATCH] deps: V8: cherry-pick 00bb1a77c03e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [date] Fix Date#getMinutes() test failures After building V8 using Clang (./out/x64.release/v8_build_config.json says that "is_clang" is true), I could reproduce the referenced bug report locally. Replacing the getMinutes() calls with getUTCMinutes() calls fixed the test failure. Signed-off-by: Darshan Sen Bug: v8:11200 Change-Id: Ia36be481f2c8728380d550ead856ef8e51b1069c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093362 Reviewed-by: Toon Verwaest Commit-Queue: Toon Verwaest Cr-Commit-Position: refs/heads/main@{#76367} Refs: https://github.com/v8/v8/commit/00bb1a77c03ec951a5def21c64bee38cd855be7b Signed-off-by: Darshan Sen PR-URL: https://github.com/nodejs/node/pull/39829 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- common.gypi | 2 +- deps/v8/AUTHORS | 1 + deps/v8/test/mjsunit/regress/regress-crbug-422858.js | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common.gypi b/common.gypi index be3a2770852ac1..2e5c76e9b85561 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.7', + 'v8_embedder_string': '-node.8', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index d9eb05985c555c..ea786ddea4c085 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -86,6 +86,7 @@ Daniel Andersson Daniel Bevenius Daniel Dromboski Daniel James +Darshan Sen David Carlier David Manouchehri Deepak Mohan diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-422858.js b/deps/v8/test/mjsunit/regress/regress-crbug-422858.js index ba75fc01a439d4..bede64025e43cc 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-422858.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-422858.js @@ -3,21 +3,21 @@ // found in the LICENSE file. var date = new Date("2016/01/02 10:00 GMT-8") -assertEquals(0, date.getMinutes()); +assertEquals(0, date.getUTCMinutes()); assertEquals(18, date.getUTCHours()); date = new Date("2016/01/02 10:00 GMT-12") -assertEquals(0, date.getMinutes()); +assertEquals(0, date.getUTCMinutes()); assertEquals(22, date.getUTCHours()); date = new Date("2016/01/02 10:00 GMT-123") -assertEquals(23, date.getMinutes()); +assertEquals(23, date.getUTCMinutes()); assertEquals(11, date.getUTCHours()); date = new Date("2016/01/02 10:00 GMT-0856") -assertEquals(56, date.getMinutes()); +assertEquals(56, date.getUTCMinutes()); assertEquals(18, date.getUTCHours()); date = new Date("2016/01/02 10:00 GMT-08000") -assertEquals(NaN, date.getMinutes()); +assertEquals(NaN, date.getUTCMinutes()); assertEquals(NaN, date.getUTCHours());