mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			649 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			649 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // 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 the result from the trap method.
 | |
| info: |
 | |
|     [[Call]] (thisArgument, argumentsList)
 | |
| 
 | |
|     9. Return Call(trap, handler, «target, thisArgument, argArray»).
 | |
| features: [Proxy]
 | |
| ---*/
 | |
| 
 | |
| var result = {};
 | |
| var p = new Proxy(function() {
 | |
|   throw new Test262Error('target should not be called');
 | |
| }, {
 | |
|   apply: function(t, c, args) {
 | |
|     return result;
 | |
|   },
 | |
| });
 | |
| 
 | |
| assert.sameValue(p.call(), result);
 |