Skip to content

Commit

Permalink
fix conversion typed array constructors to string, fix #300
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jul 26, 2017
1 parent 58f9b11 commit 198fb53
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
- Fixed `%TypedArray%.from` Safari bug, [#285](https://github.com/zloirock/core-js/issues/285)
- Fixed compatibility with old version of Prototype.js, [#278](https://github.com/zloirock/core-js/issues/278), [#289](https://github.com/zloirock/core-js/issues/289)
- Added errors on incorrect context of collection methods, [#272](https://github.com/zloirock/core-js/issues/272)
- Fixed conversion typed array constructors to string, fix [#300](https://github.com/zloirock/core-js/issues/300)
- Fixed `Set#size` with debugger ReactNative for Android, [#297](https://github.com/zloirock/core-js/issues/297)
- Fixed an issue with Electron-based debugger, [#230](https://github.com/zloirock/core-js/issues/230)
- Fixed compatibility with incomplete third-party `WeakMap` polyfills, [#252](https://github.com/zloirock/core-js/pull/252)
Expand Down
2 changes: 1 addition & 1 deletion client/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ if (__webpack_require__(7)) {

$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString });
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
Expand Down
2 changes: 1 addition & 1 deletion client/core.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/core.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ if (__webpack_require__(8)) {

$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString });
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
Expand Down
6 changes: 3 additions & 3 deletions client/library.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/library.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ if (__webpack_require__(6)) {

$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString });
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
Expand Down
2 changes: 1 addition & 1 deletion client/shim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/shim.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion library/modules/_typed-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ if (require('./_descriptors')) {

$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString });
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
Expand Down
2 changes: 1 addition & 1 deletion modules/_typed-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ if (require('./_descriptors')) {

$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString });
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
Expand Down
5 changes: 5 additions & 0 deletions tests/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tests/tests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/tests/es6.typed.constructors.ls
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ if DESCRIPTORS
assert.throws (!-> Typed 1), TypeError, 'throws without `new`'
assert.same Typed[Symbol?species], Typed, '@@species'

assert.ok try Typed.toString!

test "#{name} descriptors" (assert)!->
typed = new Typed 2
# V8 ~ Chrome 44- bug - descriptor marked as configurable
Expand Down

0 comments on commit 198fb53

Please sign in to comment.