Correctly release values in TypedArray's toLocaleString (#4156)

When the `toLocaleString` was called on a TypedArray's value
the resulting object's `toString/valueOf` invocations could
create errors. These error values were not released.

In addition the input element value for the toString operation
was released twice in case of an error.

Fixes: #4148.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2020-08-24 14:50:18 +02:00
committed by GitHub
parent 84bc1e03fb
commit f2ff0d082f
3 changed files with 45 additions and 4 deletions
-2
View File
@@ -2551,8 +2551,6 @@
<test id="built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toLocaleString/calls-tostring-from-each-value.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toLocaleString/calls-valueof-from-each-value.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toLocaleString/detached-buffer.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toString/BigInt/detached-buffer.js"><reason></reason></test>
<test id="built-ins/TypedArray/prototype/toString/detached-buffer.js"><reason></reason></test>