Fix and tighten up cross realm %ThrowTypeError% test.

This commit is contained in:
duncan.macgregor 2025-10-22 11:28:08 +01:00 committed by Philip Chimento
parent e7ddbfac99
commit 15ab1bd12f

View File

@ -17,8 +17,15 @@ var localArgs = function() {
"use strict";
return arguments;
}();
var otherArgs = (new other.Function('return arguments;'))();
var otherArgs = (new other.Function('"use strict"; return arguments;'))();
var otherArgs2 = (new other.Function('"use strict"; return arguments;'))();
var localThrowTypeError = Object.getOwnPropertyDescriptor(localArgs, "callee").get;
var otherThrowTypeError = Object.getOwnPropertyDescriptor(otherArgs, "callee").get;
var otherThrowTypeError2 = Object.getOwnPropertyDescriptor(otherArgs, "callee").get;
assert.throws(TypeError, function() {
otherThrowTypeError();
});
assert.notSameValue(localThrowTypeError, otherThrowTypeError);
assert.sameValue(otherThrowTypeError, otherThrowTypeError2);