Debian Codegraph @

rhino/testsrc/tests/js1_7/iterable/regress-341510.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-341510.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 341510;
9 var summary = 'Iterators: crash in close handler with assignment to ' +
10 'non-existing name';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
13
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
16
17 function gen(i) {
18 try {
19 yield i;
20 } finally {
21 name_that_does_not_exist_in_the_scope_chain = 1;
22 }
23 }
24
25 var iter = gen(1);
26 iter.next();
27 iter = null;
28 gc();
29
30 reportCompare(expect, actual, summary);