diff --git a/CHANGELOG.md b/CHANGELOG.md index 192346b746a3..fbe2ed120331 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Changelog ##### Unreleased +- No longer uses symbols from `get-own-property-symbols` third-party polyfill if it's installed since they cause a stack overflow, [#774](https://github.com/zloirock/core-js/issues/774) - 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 diff --git a/packages/core-js/internals/native-symbol.js b/packages/core-js/internals/native-symbol.js index e013965c4b80..8c85dd4b97e4 100644 --- a/packages/core-js/internals/native-symbol.js +++ b/packages/core-js/internals/native-symbol.js @@ -4,8 +4,10 @@ var fails = require('../internals/fails'); // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { - return !String(Symbol()) || - // Chrome 38 Symbol has incorrect toString conversion + var symbol = Symbol(); + // Chrome 38 Symbol has incorrect toString conversion + // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances + return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; });