Skip to content

Commit

Permalink
added a workaround of possible browser crash on Object.prototype ac…
Browse files Browse the repository at this point in the history
…cessors method in WebKit ~ Android 4.0, close #232
  • Loading branch information
zloirock committed May 28, 2021
1 parent 991d46b commit 47d11d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,6 +1,6 @@
## Changelog
##### Unreleased
- Nothing
- Added a workaround of possible browser crash on `Object.prototype` accessors method in WebKit ~ Android 4.0, [#232](https://github.com/zloirock/core-js/issues/232)

##### 3.13.0 - 2021.05.26
- Accessible `Object#hasOwnProperty` (`Object.hasOwn`) proposal moved to the stage 3, [May 2021 TC39 meeting](https://github.com/babel/proposals/issues/74#issuecomment-848121673)
Expand Down
Expand Up @@ -2,9 +2,14 @@
var IS_PURE = require('../internals/is-pure');
var global = require('../internals/global');
var fails = require('../internals/fails');
var userAgent = require('../internals/engine-user-agent');

// Forced replacement object prototype accessors methods
module.exports = IS_PURE || !fails(function () {
// This feature detection crashes old WebKit
// https://github.com/zloirock/core-js/issues/232
var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
if (webkit && +webkit[1] < 535) return;
var key = Math.random();
// In FF throws only define methods
// eslint-disable-next-line no-undef, no-useless-call -- required for testing
Expand Down

0 comments on commit 47d11d0

Please sign in to comment.