forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug2230916.js
More file actions
43 lines (39 loc) · 1.1 KB
/
bug2230916.js
File metadata and controls
43 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
var isPassed1 = false;
var isPassed2 = false;
function test1() {
try {
for (var ubwtog in Object(Math.imul(1073741824, Object(Symbol())))) { }
}
catch (ex) {
if (ex instanceof TypeError) {
if (ex.message === 'Number expected') {
isPassed1 = true;
}
}
}
}
function test2() {
ejdmhf_0 = new Uint8Array();
try
{
ejdmhf_0[50341] = Symbol();
}
catch(ex)
{
if(ex instanceof TypeError) {
if(ex.message === 'Number expected') {
isPassed2 = true;
}
}
}
}
test1();
test2();
test2();
test2();
WScript.Echo(isPassed1 ? 'PASS' : 'FAIL');
WScript.Echo(isPassed2 ? 'PASS' : 'FAIL');