Fix attributes of length property for builtin functions (#3689)

fix length property of builtin functions to be configurable (ECMA-262 v6, 19.2.4.1)

JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
This commit is contained in:
Hyukwoo Park
2020-04-22 15:36:23 +09:00
committed by GitHub
parent bcd5ff3f40
commit 1b1460e61f
15 changed files with 181 additions and 28 deletions
+11 -1
View File
@@ -13,7 +13,17 @@
// limitations under the License.
// check properties
assert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').configurable === false);
function length_configurable()
{
function is_es51() {
return (typeof g === "function");
{ function g() {} }
}
return is_es51() ? false : true;
}
assert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').configurable === length_configurable());
assert(Object.getOwnPropertyDescriptor(String.prototype.substring, 'length').enumerable === false);