tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

trap-is-not-callable.js (562B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 9.5.10
      5 description: >
      6    Throws when trap is not callable.
      7 info: |
      8    9.5.10 [[Delete]] (P)
      9 
     10    6. Let trap be GetMethod(handler, "deleteProperty").
     11    ...
     12 
     13    7.3.9 GetMethod (O, P)
     14 
     15    5. If IsCallable(func) is false, throw a TypeError exception.
     16 features: [Proxy]
     17 ---*/
     18 
     19 var p = new Proxy({}, {
     20  deleteProperty: {}
     21 });
     22 
     23 assert.throws(TypeError, function() {
     24  delete p.attr;
     25 });
     26 
     27 reportCompare(0, 0);