summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js
blob: d8641fa8094402c89bc0968c173b0f46bd7562cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist
description: >
    Return is an abrupt completion
features: [Proxy]
---*/

var p = new Proxy(function() {
  throw 'not the Test262Error you are looking for';
}, {
  apply: function(t, c, args) {
    throw new Test262Error();
  }
});

assert.throws(Test262Error, function() {
  p.call();
});

reportCompare(0, 0);