Bug 406736: fixing the test to report the success with read-only Array. r=Bob Clary, not part of the build

This commit is contained in:
igor@mir2.org 2007-12-04 10:16:43 -08:00
Родитель ca30346b83
Коммит 87ceed0802
1 изменённых файлов: 25 добавлений и 18 удалений

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

@ -60,27 +60,34 @@ Redirector.__defineGetter__('prototype', function() {
});
//Array = Function('printStatus("Constructor")');
Array = Function('');
Array.prototype = 1;
Array.__defineGetter__('prototype', function() {
try {
Array = Function('');
} catch (e) { }
if (Array === SavedArray) {
// No test of the hazard possible as the array is read-only
actual = expect;
} else {
Array.prototype = 1;
Array.__defineGetter__('prototype', function() {
// printStatus("**** GETTER ****");
Array = Redirector;
gc();
new Object();
new Object();
return undefined;
});
Array = Redirector;
gc();
new Object();
new Object();
return undefined;
});
new Object();
new Object();
try
{
var y = "test".split('');
try
{
var y = "test".split('');
}
catch(ex)
{
printStatus(ex + '');
}
}
catch(ex)
{
printStatus(ex + '');
}
reportCompare(expect, actual, summary);