Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-328443.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-328443.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 328443;
9 var summary = 'Uncatchable exception with |new (G.call) (F);| when F proto is null';
10 var actual = '';
11 var expect = 'Exception caught';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 var F = (function(){});
17 F.__proto__ = null;
18
19 var G = (function(){});
20
21 var z;
22
23 z = "uncatchable exception!!!";
24 try {
25 new (G.call) (F);
26
27 actual = "No exception";
28 } catch (er) {
29 actual = "Exception caught";
30 printStatus("Exception was caught: " + er);
31 }
32
33 reportCompare(expect, actual, summary);