bug 469718 - followup to avoid accessing document properties outside a browser. r=bc

This commit is contained in:
Igor Bukanov 2009-09-28 16:08:15 +04:00
parent 7b20344b03
commit b1a5ae08fd

View File

@ -165,7 +165,8 @@ gFailureExpected = false;
TestCase.prototype.dump = function () {
// let reftest handle error reporting, otherwise
// output a summary line.
if (!document.location.href.match(/jsreftest.html/))
if (typeof document != "object" ||
!document.location.href.match(/jsreftest.html/))
{
dump('\njstest: ' + this.path + ' ' +
'bug: ' + this.bugnumber + ' ' +