mirror of https://github.com/tc39/test262.git
Last minute fixes
This commit is contained in:
parent
6f05b008dc
commit
a6fad62d7c
|
@ -3,7 +3,7 @@ function allowProxyTraps(overrides) {
|
||||||
return function () { throw new Test262Error(msg); };
|
return function () { throw new Test262Error(msg); };
|
||||||
}
|
}
|
||||||
if (!overrides) { overrides = {}; }
|
if (!overrides) { overrides = {}; }
|
||||||
var traps = {
|
return {
|
||||||
getPrototypeOf: overrides.getPrototypeOf || throwTest262Error('[[GetPrototypeOf]] trap called'),
|
getPrototypeOf: overrides.getPrototypeOf || throwTest262Error('[[GetPrototypeOf]] trap called'),
|
||||||
setPrototypeOf: overrides.setPrototypeOf || throwTest262Error('[[SetPrototypeOf]] trap called'),
|
setPrototypeOf: overrides.setPrototypeOf || throwTest262Error('[[SetPrototypeOf]] trap called'),
|
||||||
isExtensible: overrides.isExtensible || throwTest262Error('[[IsExtensible]] trap called'),
|
isExtensible: overrides.isExtensible || throwTest262Error('[[IsExtensible]] trap called'),
|
||||||
|
|
|
@ -35,8 +35,9 @@ function assertTrapSucceeds(trap) {
|
||||||
var threw = false;
|
var threw = false;
|
||||||
try {
|
try {
|
||||||
traps[trap]();
|
traps[trap]();
|
||||||
|
} catch (e) {
|
||||||
threw = true;
|
threw = true;
|
||||||
} catch (e) {}
|
}
|
||||||
if (threw) {
|
if (threw) {
|
||||||
throw new Test262Error('trap ' + trap + ' threw an error');
|
throw new Test262Error('trap ' + trap + ' threw an error');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue