Skip to content

Commit

Permalink
deps: V8: cherry-pick 00bb1a77c03e
Browse files Browse the repository at this point in the history
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 <[email protected]>
    Bug: v8:11200
    Change-Id: Ia36be481f2c8728380d550ead856ef8e51b1069c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093362
    Reviewed-by: Toon Verwaest <[email protected]>
    Commit-Queue: Toon Verwaest <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#76367}

Refs: v8/v8@00bb1a7
Signed-off-by: Darshan Sen <[email protected]>

PR-URL: #39829
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
RaisinTen authored and targos committed Oct 4, 2021
1 parent be01694 commit 807b68b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Daniel Andersson <[email protected]>
Daniel Bevenius <[email protected]>
Daniel Dromboski <[email protected]>
Daniel James <[email protected]>
Darshan Sen <[email protected]>
David Carlier <[email protected]>
David Manouchehri <[email protected]>
Deepak Mohan <[email protected]>
Expand Down
10 changes: 5 additions & 5 deletions deps/v8/test/mjsunit/regress/regress-crbug-422858.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

0 comments on commit 807b68b

Please sign in to comment.