Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Side by Side Diff: test/mjsunit/regress/regress-4640.js

Issue 1545883003: Fix 'illegal access' in Date constructor edge case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch back to the original JS limit, which is now vindicated, with additional tests Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/date.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Some surrounding cases which already worked, for good measure
6 assertTrue(new Date('275760-10-14') == 'Invalid Date');
7 assertTrue(new Date('275760-09-23') == 'Invalid Date');
8 assertTrue(new Date('+275760-09-24') == 'Invalid Date');
9 assertTrue(new Date('+275760-10-13') == 'Invalid Date');
10
11 // The following cases used to throw "illegal access"
12 assertTrue(new Date('275760-09-24') == 'Invalid Date');
13 assertTrue(new Date('275760-10-13') == 'Invalid Date');
14 assertTrue(new Date('+275760-10-13 ') == 'Invalid Date');
15
16 // However, dates within the range or valid
17 assertTrue(new Date('100000-10-13') != 'Invalid Date');
18 assertTrue(new Date('+100000-10-13') != 'Invalid Date');
19 assertTrue(new Date('+100000-10-13 ') != 'Invalid Date');
OLDNEW
« no previous file with comments | « src/date.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698