UNPKG

737 BJavaScriptView Raw
1'use strict';
2var IS_PURE = require('../internals/is-pure');
3var global = require('../internals/global');
4var fails = require('../internals/fails');
5var WEBKIT = require('../internals/engine-webkit-version');
6
7// Forced replacement object prototype accessors methods
8module.exports = IS_PURE || !fails(function () {
9 // This feature detection crashes old WebKit
10 // https://github.com/zloirock/core-js/issues/232
11 if (WEBKIT && WEBKIT < 535) return;
12 var key = Math.random();
13 // In FF throws only define methods
14 // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing
15 __defineSetter__.call(null, key, function () { /* empty */ });
16 delete global[key];
17});