Skip to content
Snippets Groups Projects
Commit a6fad62d authored by Jordan Harband's avatar Jordan Harband
Browse files

Last minute fixes

parent 6f05b008
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ function allowProxyTraps(overrides) { ...@@ -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) { ...@@ -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');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment