| 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-452498-099.js'; |
| 7 | //----------------------------------------------------------------------------- |
| 8 | var BUGNUMBER = 452498; |
| 9 | var summary = 'TM: upvar2 regression tests'; |
| 10 | var actual = ''; |
| 11 | var expect = ''; |
| 12 | |
| 13 | |
| 14 | //----------------------------------------------------------------------------- |
| 15 | test(); |
| 16 | //----------------------------------------------------------------------------- |
| 17 | |
| 18 | function test() |
| 19 | { |
| 20 | enterFunc ('test'); |
| 21 | printBugNumber(BUGNUMBER); |
| 22 | printStatus (summary); |
| 23 | |
| 24 | // ------- Comment #99 From Gary Kwong [:nth10sd] |
| 25 | |
| 26 | try |
| 27 | { |
| 28 | eval("(function x(){x.(this)} )();"); |
| 29 | } |
| 30 | catch(ex) |
| 31 | { |
| 32 | } |
| 33 | |
| 34 | // Assertion failure: (uint32)(index_) < atoms_->length, at ../jsinterp.cpp:327 |
| 35 | // Crash [@ js_FullTestPropertyCache] at null in opt, -j not required. |
| 36 | |
| 37 | // ===== |
| 38 | |
| 39 | try |
| 40 | { |
| 41 | (function(){try {x} finally {}; ([x in []] for each (x in x))})(); |
| 42 | } |
| 43 | catch(ex) |
| 44 | { |
| 45 | } |
| 46 | |
| 47 | // Assertion failure: lexdep->frameLevel() <= funbox->level, at ../jsparse.cpp:1735 |
| 48 | // Crash [@ BindNameToSlot] near null in opt, -j not required. |
| 49 | |
| 50 | // ===== |
| 51 | |
| 52 | reportCompare(expect, actual, summary); |
| 53 | |
| 54 | exitFunc ('test'); |
| 55 | } |