aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-02-02 18:37:21 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-02-03 15:10:33 +0000
commit6653fdb6bfb538b601685966ad96e055bafbdbcf (patch)
treef74cff62762f2c427a7d9d9324dfa8203be576f0 /src/qml/jsruntime/qv4global_p.h
parentdd31156c6c6b120c88fff3be17ea1290a964e193 (diff)
FunctionObject: Mark name/length property configurable
In ES5, these were not configurable, but ES6 changed the behavior. For length, refer to: 9.2.4 (FunctionInitialize) 17 (ECMAScript Standard Built-in Objects): Unless otherwise specified, the length property of a built-in Function object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. 19.2.2.1 Function.length 19.2.3.2 (Function.prototype.bind) 19.2.4.1 (Function instances, length) For name, refer to: 9.2.11 (SetFunctionName) This does regress test262 for ES5 for me a little, but improves our es6 test coverage a bit (~682 more tests pass, +1.5%). Change-Id: Icda7c9068dc3e6e4e4aebbb0d359868a30343013 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4global_p.h')
-rw-r--r--src/qml/jsruntime/qv4global_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 66861bf697..b0d14fc2b4 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -258,6 +258,7 @@ enum PropertyFlag {
Attr_NotEnumerable = 0x4,
Attr_NotConfigurable = 0x8,
Attr_ReadOnly = Attr_NotWritable|Attr_NotEnumerable|Attr_NotConfigurable,
+ Attr_ReadOnly_ButConfigurable = Attr_NotWritable|Attr_NotEnumerable,
Attr_Invalid = 0xff
};