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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user