null-handler.js (469B)
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.8 5 description: > 6 [[Get]] (P, Receiver) 7 8 2. If handler is null, throw a TypeError exception. 9 features: [Proxy] 10 ---*/ 11 12 var p = Proxy.revocable({}, {}); 13 14 p.revoke(); 15 16 assert.throws(TypeError, function() { 17 p.proxy.attr; 18 }); 19 20 assert.throws(TypeError, function() { 21 p.proxy['attr']; 22 }); 23 24 reportCompare(0, 0);