Bug 1228841 - Part 2: Remove testcases specific to conditional catch in js/. r=evilpie

This commit is contained in:
Tooru Fujisawa 2017-12-05 09:42:40 +09:00
Родитель d464aa8fa7
Коммит 9c49a02b67
28 изменённых файлов: 0 добавлений и 990 удалений

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| error: uncaught exception:
evalcx("\
try {\
throw\"\"\
} catch (\
x if (function(){\
x\
})()\
) {}\
", newGlobal(""))

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| error: uncaught exception:
eval("\
try {\
throw\"\"\
} catch (\
x if (function(){\
x\
})()\
) {}\
")

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| error: uncaught exception:
Function("\
try {\
throw\"\"\
} catch (\
x if (function(){\
x\
})()\
) {}\
")()

Просмотреть файл

@ -1,4 +0,0 @@
eval("\
try{}\
catch(w if(function(){})){4067286856}\
")

Просмотреть файл

@ -1,7 +0,0 @@
// |jit-test| error: TypeError
try {
h
} catch (x
if gc()) {} finally {
this.z.z
}

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| error: TypeError
try {
i
}
catch (x if (function() {})()) {}
catch (d) {
this.z.z
}

Просмотреть файл

@ -1,14 +0,0 @@
options('strict')
f = (function() {
for (var z = 0; z < 9; ++z) {
x = z
}
try {
i
} catch (x if null) {
let e
} catch (l) {
x.m
}
})
for (a in f()) {}

Просмотреть файл

@ -1,13 +0,0 @@
(function() {
do {
try {
return
}
catch(x if (c)) {
return
} (x)
} while (x)
})()
/* Don't assert. */

Просмотреть файл

@ -1,11 +0,0 @@
(function () {
try {
return
} catch (x if i) {
return
}
for (z in []);
})()
/* Don't assert */

Просмотреть файл

@ -1,20 +0,0 @@
//Bug 350712
function iterator () {
for (var i in []);
}
try {
try {
throw 5;
}
catch(error if iterator()) {
assertEq(false, true);
}
}
catch(error) {
assertEq(error, 5);
}
if (typeof reportCompare === "function")
reportCompare(true, true);

Просмотреть файл

@ -1,38 +0,0 @@
/* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
DESCRIPTION = " the non-guarded catch should HAVE to appear last";
test();
function test()
{
var EXCEPTION_DATA = "String exception";
var e;
printStatus ("Catchguard syntax negative test.");
try
{
throw EXCEPTION_DATA;
}
catch (e) /* the non-guarded catch should HAVE to appear last */
{
}
catch (e if true)
{
}
catch (e if false)
{
}
reportCompare('PASS', 'FAIL',
"Illegally constructed catchguard should have thrown " +
"an exception.");
}

Просмотреть файл

@ -1,44 +0,0 @@
/* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
test();
function test()
{
var EXCEPTION_DATA = "String exception";
var e = "foo";
var caught = false;
printStatus ("Basic catchguard test.");
try
{
throw EXCEPTION_DATA;
}
catch (e if true)
{
caught = true;
e = "this change should not propagate outside of this scope";
}
catch (e if false)
{
reportCompare('PASS', 'FAIL', "Catch block (e if false) should not have executed.");
}
catch (e)
{
reportCompare('PASS', 'FAIL', "Catch block (e) should not have executed.");
}
if (!caught)
reportCompare('PASS', 'FAIL', "Exception was never caught.");
if (e != "foo")
reportCompare('PASS', 'FAIL', "Exception data modified inside catch() scope should " +
"not be visible in the function scope (e = '" +
e + "'.)");
reportCompare('PASS', 'PASS', '');
}

Просмотреть файл

@ -1,39 +0,0 @@
/* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
test();
function test()
{
var EXCEPTION_DATA = "String exception";
var e;
var caught = false;
printStatus ("Basic catchguard test.");
try
{
throw EXCEPTION_DATA;
}
catch (e if true)
{
caught = true;
}
catch (e if true)
{
reportCompare('PASS', 'FAIL',
"Second (e if true) catch block should not have executed.");
}
catch (e)
{
reportCompare('PASS', 'FAIL', "Catch block (e) should not have executed.");
}
if (!caught)
reportCompare('PASS', 'FAIL', "Exception was never caught.");
reportCompare('PASS', 'PASS', 'Basic catchguard test');
}

Просмотреть файл

@ -1,54 +0,0 @@
/* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
test();
function test()
{
var EXCEPTION_DATA = "String exception";
var e = "foo", x = "foo";
var caught = false;
printStatus ("Catchguard 'Common Scope' test.");
try
{
throw EXCEPTION_DATA;
}
catch (e if ((x = 1) && false))
{
reportCompare('PASS', 'FAIL',
"Catch block (e if ((x = 1) && false) should not " +
"have executed.");
}
catch (e if (x == 1))
{
caught = true;
}
catch (e)
{
reportCompare('PASS', 'FAIL',
"Same scope should be used across all catchguards.");
}
if (!caught)
reportCompare('PASS', 'FAIL',
"Exception was never caught.");
if (e != "foo")
reportCompare('PASS', 'FAIL',
"Exception data modified inside catch() scope should " +
"not be visible in the function scope (e ='" +
e + "'.)");
if (x != 1)
reportCompare('PASS', 'FAIL',
"Data modified in 'catchguard expression' should " +
"be visible in the function scope (x = '" +
x + "'.)");
reportCompare('PASS', 'PASS', 'Catchguard Common Scope test');
}

Просмотреть файл

@ -1,86 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 346494;
var summary = 'various try...catch tests';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var pfx = "(function (x) {try {throw x}",
cg1 = " catch (e if e === 42) {var v = 'catch guard 1 ' + e; actual += v + ','; print(v);}"
cg2 = " catch (e if e === 43) {var v = 'catch guard 2 ' + e; actual += v + ','; print(v);}"
cat = " catch (e) {var v = 'catch all ' + e; actual += v + ','; print(v);}"
fin = " finally{var v = 'fin'; actual += v + ','; print(v)}",
end = "})";
var exphash = {
pfx: "(function (y) { var result = ''; y = y + ',';",
cg1: "result += (y === '42,') ? ('catch guard 1 ' + y):'';",
cg2: "result += (y === '43,') ? ('catch guard 2 ' + y):'';",
cat: "result += /catch guard/.test(result) ? '': ('catch all ' + y);",
fin: "result += 'fin,';",
end: "return result;})"
};
var src = [
pfx + fin + end,
pfx + cat + end,
pfx + cat + fin + end,
pfx + cg1 + end,
pfx + cg1 + fin + end,
pfx + cg1 + cat + end,
pfx + cg1 + cat + fin + end,
pfx + cg1 + cg2 + end,
pfx + cg1 + cg2 + fin + end,
pfx + cg1 + cg2 + cat + end,
pfx + cg1 + cg2 + cat + fin + end,
];
var expsrc = [
exphash.pfx + exphash.fin + exphash.end,
exphash.pfx + exphash.cat + exphash.end,
exphash.pfx + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1 + exphash.end,
exphash.pfx + exphash.cg1 + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cg2 + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cg2 + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cg2 + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1 + exphash.cg2 + exphash.cat + exphash.fin + exphash.end,
];
for (var i in src) {
print("\n=== " + src[i]);
var f = eval(src[i]);
print(src[i]);
var exp = eval(expsrc[i]);
// dis(f);
print('decompiling: ' + f);
actual = '';
try { expect = exp(42); f(42) } catch (e) { print('tried f(42), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(43); f(43) } catch (e) { print('tried f(43), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(44); f(44) } catch (e) { print('tried f(44), caught ' + e) }
reportCompare(expect, actual, summary);
}
}

Просмотреть файл

@ -1,79 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 346494;
var summary = 'try-catch-finally scope';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
function g()
{
try
{
throw "foo";
}
catch(e if e == "bar")
{
}
catch(e if e == "baz")
{
}
finally
{
}
}
expect = "foo";
try
{
g();
actual = 'No Exception';
}
catch(ex)
{
actual = ex + '';
}
reportCompare(expect, actual, summary);
function h()
{
try
{
throw "foo";
}
catch(e if e == "bar")
{
}
catch(e)
{
}
finally
{
}
}
expect = "No Exception";
try
{
h();
actual = 'No Exception';
}
catch(ex)
{
actual = ex + '';
}
reportCompare(expect, actual, summary);
}

Просмотреть файл

@ -1,109 +0,0 @@
/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 350312;
var summary = 'Accessing wrong stack slot with nested catch/finally';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
function createPrint(obj)
{
return new Function("actual += " + obj + " + ','; " +
"print(" + obj + ");");
}
function createThrow(obj)
{
return new Function("throw " + obj + "; ");
}
function f(a, b, c)
{
try {
a();
} catch (e if e == null) {
b();
} finally {
c();
}
}
print('test 1');
expect = 'a,c,';
actual = '';
try
{
f(createPrint("'a'"), createPrint("'b'"), createPrint("'c'"));
}
catch(ex)
{
actual += 'caught ' + ex;
}
reportCompare(expect, actual, summary + ': 1');
print('test 2');
expect = 'c,caught a';
actual = '';
try
{
f(createThrow("'a'"), createPrint("'b'"), createPrint("'c'"));
}
catch(ex)
{
actual += 'caught ' + ex;
}
reportCompare(expect, actual, summary + ': 2');
print('test 3');
expect = 'b,c,';
actual = '';
try
{
f(createThrow("null"), createPrint("'b'"), createPrint("'c'"));
}
catch(ex)
{
actual += 'caught ' + ex;
}
reportCompare(expect, actual, summary + ': 3');
print('test 4');
expect = 'a,c,';
actual = '';
try
{
f(createPrint("'a'"), createThrow("'b'"), createPrint("'c'"));
}
catch(ex)
{
actual += 'caught ' + ex;
}
reportCompare(expect, actual, summary + ': 4');
print('test 5');
expect = 'c,caught b';
actual = '';
try
{
f(createThrow("null"), createThrow("'b'"), createPrint("'c'"));
}
catch(ex)
{
actual += 'caught ' + ex;
}
reportCompare(expect, actual, summary + ': 5');
}

Просмотреть файл

@ -1,113 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 350312;
var summary = 'Accessing wrong stack slot with nested catch/finally';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var pfx = "(function (x) {try {if (x > 41) throw x}",
cg1a = " catch (e if e === 42) {var v = 'catch guard 1 ' + e; actual += v + ',';print(v);}"
cg1b = " catch (e if e === 42) {var v = 'catch guard 1 + throw ' + e; actual += v + ',';print(v); throw e;}"
cg2 = " catch (e if e === 43) {var v = 'catch guard 2 ' + e; actual += v + ',';print(v)}"
cat = " catch (e) {var v = 'catch all ' + e; print(v); if (e == 44) throw e}"
fin = " finally{var v = 'fin'; actual += v + ',';print(v)}",
end = "})";
var exphash = {
pfx: "(function (y) { var result = ''; y = y + ',';",
cg1a: " result += (y === '42,') ? ('catch guard 1 ' + y):'';",
cg1b: " result += (y === '42,') ? ('catch guard 1 + throw ' + y):'';",
cg2: " result += (y === '43,') ? ('catch guard 2 ' + y):'';",
cat: " result += (y > 41) ? ('catch all ' + y):'';",
fin: " result += 'fin,';",
end: "return result;})"
};
var src = [
pfx + fin + end,
pfx + cat + end,
pfx + cat + fin + end,
pfx + cg1a + end,
pfx + cg1a + fin + end,
pfx + cg1a + cat + end,
pfx + cg1a + cat + fin + end,
pfx + cg1a + cg2 + end,
pfx + cg1a + cg2 + fin + end,
pfx + cg1a + cg2 + cat + end,
pfx + cg1a + cg2 + cat + fin + end,
pfx + cg1b + end,
pfx + cg1b + fin + end,
pfx + cg1b + cat + end,
pfx + cg1b + cat + fin + end,
pfx + cg1b + cg2 + end,
pfx + cg1b + cg2 + fin + end,
pfx + cg1b + cg2 + cat + end,
pfx + cg1b + cg2 + cat + fin + end,
];
var expsrc = [
exphash.pfx + exphash.fin + exphash.end,
exphash.pfx + exphash.cat + exphash.end,
exphash.pfx + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1a + exphash.end,
exphash.pfx + exphash.cg1a + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cg2 + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cg2 + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cg2 + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1a + exphash.cg2 + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1b + exphash.end,
exphash.pfx + exphash.cg1b + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cat + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cg2 + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cg2 + exphash.fin + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cg2 + exphash.cat + exphash.end,
exphash.pfx + exphash.cg1b + exphash.cg2 + exphash.cat + exphash.fin + exphash.end,
];
for (var i in src) {
print("\n=== " + i + ": " + src[i]);
var f = eval(src[i]);
var exp = eval(expsrc[i]);
// dis(f);
print('decompiling: ' + f);
//print('decompiling exp: ' + exp);
actual = '';
try { expect = exp(41); f(41) } catch (e) { print('tried f(41), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(42); f(42) } catch (e) { print('tried f(42), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(43); f(43) } catch (e) { print('tried f(43), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(44); f(44) } catch (e) { print('tried f(44), caught ' + e) }
reportCompare(expect, actual, summary);
actual = '';
try { expect = exp(45); f(45) } catch (e) { print('tried f(44), caught ' + e) }
reportCompare(expect, actual, summary);
}
}

Просмотреть файл

@ -1,36 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
f = function () {
try {
throw new Error('bad');
} catch (e if (e = null, gc(), false)) {
} catch (e) {
// e is dangling now
}
};
f();
reportCompare(expect, actual, summary + ': 1');
}

Просмотреть файл

@ -1,43 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
f = function ()
{
var a = null;
try {
a();
} catch (e) {
}
return false;
};
try {
throw 1;
} catch (e if f()) {
} catch (e if e == 1) {
print("GOOD");
} catch (e) {
print("BAD: "+e);
}
reportCompare(expect, actual, summary + ': 2');
}

Просмотреть файл

@ -1,31 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
try
{
try { null.a } catch(e if (e = null, gc())) { }
}
catch(ex)
{
}
reportCompare(expect, actual, summary + ': 6');
}

Просмотреть файл

@ -1,31 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 374589;
var summary = 'Do not assert decompiling try { } catch(x if true) { } ' +
'catch(y) { } finally { this.a.b; }';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f = function () {
try { } catch(x if true) { } catch(y) { } finally { this.a.b; } };
expect = 'function () {\n\
try { } catch(x if true) { } catch(y) { } finally { this.a.b; } }';
actual = f + '';
compareSource(expect, actual, summary);
}

Просмотреть файл

@ -1,41 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
f = function()
{
try
{
d.d.d;
}
catch({} if gc())
{
}
catch(y)
{
}
};
f();
f();
reportCompare(expect, actual, summary + ': 3');
}

Просмотреть файл

@ -1,32 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
try
{
try { foo() } catch([] if gc()) { }
}
catch(ex)
{
}
reportCompare(expect, actual, summary + ': 4');
}

Просмотреть файл

@ -1,31 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
try
{
try { d.d.d } catch([] if gc()) { }
}
catch(ex)
{
}
reportCompare(expect, actual, summary + ': 5');
}

Просмотреть файл

@ -1,40 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 351102;
var summary = 'try/catch-guard/finally GC issues';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
var f;
var obj = { get a() {
try {
throw 1;
} catch (e) {
}
return false;
}};
try {
throw obj;
} catch ({a: a} if a) {
throw "Unreachable";
} catch (e) {
if (e !== obj)
throw "Unexpected exception: "+uneval(e);
}
reportCompare(expect, actual, summary + ': 7');
}

Просмотреть файл

@ -1,24 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 375695;
var summary = 'Do not assert: !fp->blockChain || OBJ_GET_PARENT(cx, obj) == fp->blockChain';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
printBugNumber(BUGNUMBER);
printStatus (summary);
try { try { throw 1 } catch([] if false) { } } catch(ex) {}
reportCompare(expect, actual, summary);
}

Просмотреть файл

@ -1,10 +0,0 @@
// |reftest| skip-if(!xulRuntime.shell)
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
try {
clone(null); // don't crash
} catch (exc if exc instanceof TypeError) {
}
reportCompare(0, 0, 'ok');