array-buffer-non-extensible.js 444 B

12345678910
  1. // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
  2. var fails = require('../internals/fails');
  3. module.exports = fails(function () {
  4. if (typeof ArrayBuffer == 'function') {
  5. var buffer = new ArrayBuffer(8);
  6. // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-defineproperty -- safe
  7. if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
  8. }
  9. });