Debian Codegraph @

rhino/testsrc/tests/js1_5/Exceptions/regress-342359.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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 var gTestfile = 'regress-342359.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 342359;
9 var summary = 'Overriding ReferenceError should stick';
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 // work around bug 376957
17 var SavedReferenceError = ReferenceError;
18
19 try
20 {
21 ReferenceError = 5;
22 }
23 catch(ex)
24 {
25 }
26
27 try
28 {
29 foo.blitz;
30 }
31 catch(ex)
32 {
33 print(ex + '');
34 }
35
36 if (SavedReferenceError == ReferenceError)
37 {
38 actual = expect = 'Test ignored due to bug 376957';
39 }
40 else
41 {
42 expect = 5;
43 actual = ReferenceError;
44 }
45 reportCompare(expect, actual, summary);