Debian Codegraph @

js/src/tests/non262/extensions/regress-446386.js

raw
1 /* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 446386;
8 var summary = 'Do not crash throwing error without compiler pseudo-frame';
9 var actual = '';
10 var expect = '';
11
12
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
16
17 function test()
18 {
19 printBugNumber(BUGNUMBER);
20 printStatus (summary);
21
22 if (typeof evalcx == 'undefined')
23 {
24 print(expect = actual = 'Test skipped. evalcx required.');
25 }
26 else {
27 try
28 {
29 try {
30 evalcx(".");
31 throw "must throw";
32 } catch (e) {
33 if (e.name != "SyntaxError")
34 throw e;
35 }
36 }
37 catch(ex)
38 {
39 actual = ex + '';
40 }
41 }
42
43 reportCompare(expect, actual, summary);
44 }