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); };
|
||||
}
|
||||
if (!overrides) { overrides = {}; }
|
||||
var traps = {
|
||||
return {
|
||||
getPrototypeOf: overrides.getPrototypeOf || throwTest262Error('[[GetPrototypeOf]] trap called'),
|
||||
setPrototypeOf: overrides.setPrototypeOf || throwTest262Error('[[SetPrototypeOf]] trap called'),
|
||||
isExtensible: overrides.isExtensible || throwTest262Error('[[IsExtensible]] trap called'),
|
||||
|
|
|
@ -35,8 +35,9 @@ function assertTrapSucceeds(trap) {
|
|||
var threw = false;
|
||||
try {
|
||||
traps[trap]();
|
||||
} catch (e) {
|
||||
threw = true;
|
||||
} catch (e) {}
|
||||
}
|
||||
if (threw) {
|
||||
throw new Test262Error('trap ' + trap + ' threw an error');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue