call-parameters.js (745B)
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.3 5 description: > 6 The trap is called with handler on its context and the target object as the 7 first parabeter 8 info: | 9 [[IsExtensible]] ( ) 10 11 ... 12 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). 13 ... 14 15 features: [Proxy] 16 ---*/ 17 18 var _target, _handler; 19 var target = {}; 20 var handler = { 21 isExtensible: function(t) { 22 _handler = this; 23 _target = t; 24 return Object.isExtensible(t); 25 } 26 } 27 var p = new Proxy(target, handler); 28 29 Object.isExtensible(p); 30 31 assert.sameValue(_handler, handler); 32 assert.sameValue(_target, target); 33 34 reportCompare(0, 0);