1// Flags: --unhandled-rejections=none 2'use strict'; 3const common = require('../common'); 4 5function throwErr() { 6 throw new Error('Error from proxy'); 7} 8 9const thorny = new Proxy({}, { 10 getPrototypeOf: throwErr, 11 setPrototypeOf: throwErr, 12 isExtensible: throwErr, 13 preventExtensions: throwErr, 14 getOwnPropertyDescriptor: throwErr, 15 defineProperty: throwErr, 16 has: throwErr, 17 get: throwErr, 18 set: throwErr, 19 deleteProperty: throwErr, 20 ownKeys: throwErr, 21 apply: throwErr, 22 construct: throwErr 23}); 24 25process.on('warning', common.mustNotCall()); 26 27// Ensure this doesn't crash 28Promise.reject(thorny); 29